Context Clash: the prevalence of cross-tool instruction conflicts in coding agents and the limits of lightweight detectorsContext Clash: Prevalence and Limits of Lightweight Detectors for Cross-Tool Coding-Agent Instruction Conflicts
The authors estimate cross-tool coding agent instruction conflicts and evaluate three lightweight screeners: the weighted conflict rate is 20.83%, and at frozen thresholds each detects at most 1 held-out conflict.
- Repository instructions maintained in parallel by different coding tools may each be reasonable, yet give requirements for the same operation that cannot be satisfied simultaneously. The authors want to estimate the incidence of such conflicts and test whether a lightweight screener can distinguish conflicts from reasonable tool-specific differences.
- The authors draw 128 repositories from a probability sample, have two annotators independently review all eligible file pairs and adjudicate, and construct the Context Clash benchmark; they then compare three screeners—lexical similarity, NLI, and structured-atom—on a repository-disjoint held-out set.
- The weighted conflict rate is estimated at 20.83%, with a conservative one-sided 95% lower bound of 14.01%. At frozen thresholds, each of the three methods detects at most 1 held-out conflict; in the post-hoc analysis, the top 37 NLI-ranked pairs contain 13 of the 23 conflicts.
- The authors note that the estimate applies only to a sampling frame consisting of public, active GitHub projects and the like, and that a single snapshot cannot explain when or why disagreements arise; the 23 held-out positive examples make the F1 difference imprecise. Separate evaluation of the full-document LLM judge and candidate retrieval remains to be done.
- Metrics
- design-weighted prevalenceCohen’s κprecisionrecallF1AUROCaverage precision (AP)
Researchers quantified the prevalence of cross-tool instruction conflicts in coding agents and tested lightweight detectors, finding such conflicts in about one fifth of eligible repositories. Two annotators independently reviewed all eligible file pairs in a probability sample of 128 repositories and adjudicated evidence; conflicts most often involved commands or tool chains, and the lower confidence bound under either annotator's independent labels was above one tenth. On a held-out benchmark with non-overlapping repositories, lexical similarity, natural language inference (NLI) and a structured atomic model each recovered at most one held-out conflict at high-precision thresholds; in an exploratory post-hoc analysis, the 37 pairs ranked highest by NLI contained 13 of the 23 held-out conflicts, suggesting NLI can help prioritize manual review. The paper establishes cross-tool inconsistency as a measurable maintenance problem and provides a benchmark dataset that distinguishes conflicts from legitimate tool differences.
Related events and news
1 events · 0 news mentions
- This event's paper
跨工具编码智能体指令冲突的普遍程度与轻量检测器的局限
Paper analysis
What problem does this paper attempt to solve?
Estimate the incidence of cross-tool repository instruction conflicts and test whether lightweight screeners can identify them on unseen repositories.
The core question is: how often do repository instructions maintained in parallel for different coding tools contain operational conflicts that cannot be satisfied simultaneously, and can lightweight detectors reliably screen for them?
- Problem setting: Views such as AGENTS.md, Claude, Copilot, Cursor, and Gemini are often loaded as persistent context. The authors argue that parallel files in the same repository may each be reasonable yet give incompatible requirements for commands, toolchains, or architecture.
- Gap in existing research: Prior work has studied adoption, maintenance, task effects, and instruction following for context files; Shanto et al. compare matched sections. The authors take complete cross-tool file pairs and repository-level conflict incidence as their object of study.
- Core definition: Textual difference does not equal conflict, and tool-specific configuration can be complementary. A conflict counts only when the subject of the statement is the same, the operational scope overlaps, and a competent agent cannot satisfy both simultaneously.
- Research questions: RQ1 asks about the incidence and forms of human-confirmed conflicts; RQ2 asks whether lightweight screeners can accurately detect conflicts while avoiding labeling intentional tool specialization as conflict.
- Paper outputs: The authors provide design-weighted incidence estimates, conflict classification and sensitivity analyses, construct the Context Clash benchmark with adjudicated labels and frozen detection scores, and compare three reproducible lightweight screeners.
What related research exists?
Related work covers repository context, configuration consistency, and contradiction detection; this paper turns to naturally coexisting complete cross-tool file pairs.
Repository context and maintenance
- Chatlatanagulchai et al. (2026), Mohsenimofidi et al. (2026), Galster et al. (2026): Characterize 2,303 context files, study repository context engineering, and compare the configuration mechanisms of five coding tools, respectively; Galster et al.'s public dataset forms this paper's sampling frame.
- Voria et al. (2026), Sun et al. (2026), Chakrabarti (2026): Study commit-level evolution of instruction files, 12,110 .cursorrules files and maintenance patterns, and the growth of agentic instruction files over the lifecycle, respectively.
- Gloaguen et al. (2026), Khatri (2026), Lulla et al. (2026), Zhang et al. (2026): Evaluate the effects of context on task success, correctness, runtime efficiency, and rule replacement, respectively; the paper states that these results do not address consistency among parallel tool files.
Quality, staleness, and conflicts
- Treude and Baltes (2026), Dos Santos et al. (2026): The former studies stale inconsistencies between configuration file references and code as context rot; the latter examines six categories of smells in 100 configuration files, including contradictions within a single file.
- Shanto et al. (2026): Found 62 instances of divergent guidance and no explicit contradictions in 386 matched section pairs; this paper compares complete files, including rules under different headings, and estimates the frequency with which a repository contains at least one operational conflict.
- McMillan (2026), Yan (2026): Use synthetic instructions to study contradictions between adjacent files and instruction following, and compare CLAUDE.md safety rules with built-in execution controls, respectively.
Inconsistency and automated contradiction detection
- Nuseibeh et al. (2001), van Lamsweerde et al. (1998), Egyed (2011): Treat inconsistency as a relationship between overlapping views, distinguish divergence from true conflict, or check design models when engineers provide formal rules.
- de Marneffe et al. (2008), ALICE (2024), Wang et al. (2026): Study textual contradiction and requirement conflict detection combining formal logic with LLMs or dual encoders; the paper notes that the latter two do not evaluate parallel repository instruction files.
- Mason's Arbiter (2026): Combines formal rules and multi-model LLM review to detect interference with vendor system prompts; the paper describes it as the closest precursor detection method, but its unit of study is not naturally coexisting repository files, and it does not estimate repository-level incidence.
Baselines and positioning of this paper
- Baseline methods: Lexical similarity, frozen DeBERTa-v3 NLI, and an eight-feature structured-atom logistic model, compared on a repository-disjoint held-out set of the Context Clash benchmark constructed by the authors.
The authors position this paper as a probability-sampling study of naturally coexisting, complete cross-tool file pairs, using human conflict judgments on complete files as the detection gold standard (Table 1).
How does the paper address this problem?
Estimate the conflict rate using probability sampling and two-person full-text annotation, then compare three lightweight screeners with frozen settings on repository-isolated data.
The overall approach is to first establish a human-adjudicated Context Clash gold standard, then separate repository-level incidence estimation from file-pair-level detection evaluation; detector predictions were generated after the full-document labels were locked.
Sampling frame and conflict definition
- Data source: Uses the frozen A Dataset of Agentic AI Coding Tool Configurations, containing a sampling frame of 40,585 repositories and configuration files for 4,738 repositories; conclusions apply to the eligible repositories within it.
- Inclusion criteria: Retain engineering projects that provide readable, non-empty, English, non-reference files for at least two tools, selecting one canonical file per tool. This yielded 516 repositories, 1,112 files, and 687 cross-tool file pairs; after excluding 3 feasibility-check repositories, the confirmatory sampling frame was 513 repositories and 684 pairs.
- Conflict condition: Two statements must have the same subject, overlapping operational scope, and be impossible for a competent agent to satisfy simultaneously. Confirmed conflicts were further divided into eight types including polarity, command/toolchain, and version/dependency.
Human annotation and incidence estimation
- Probability sampling: Stratified by the exact combination of tools a repository has, 128 repositories were sampled; small strata were taken in full, and the rest were sampled proportionally with a minimum allocation. All 241 eligible file pairs among them were reviewed, involving 307 files and 285 distinct file contents.
- Independent annotation: The authors and an external software engineer first calibrated on 30 pairs outside the confirmatory and pilot sets, then independently read each complete file pair and recorded conflicting passages and their common scope; both were blind to each other and to detector outputs.
- Adjudication and estimation: Pre-adjudication raw agreement and Cohen's κ are reported; the authors resolved disagreements and reviewed all positive lists. Each repository was weighted by the inverse of its inclusion probability, using a fixed within-stratum repository percentile bootstrap.
- H1 determination: When all unclear repositories are treated as non-conflicting, the one-sided 95% bootstrap lower bound must exceed 10%. Estimates were also rerun as a post hoc sensitivity analysis using each annotator's full independent labels.
Atom extraction and candidate retrieval
- Instruction atoms: Extract minimal and independently meaningful canonical statements or concrete repository facts, recording the exact source span, modality, subject, action or fact, guidance category, and entities, commands, versions, and explicit scope.
- Extraction results: The OpenAI atom extractor viewed one document at a time and produced 20,675 source-verified atoms in total; 52 of 2,193 extraction units failed evidence verification, and the affected file pairs were retained in the end-to-end evaluation.
- Candidate generation: Without knowing the outcome labels, candidate atom pairs were retrieved based on shared entities or commands, version and modality differences, and within-category similarity, up to 20 per file pair.
Three screeners and frozen evaluation
- Lexical: Takes the maximum lexical or normalized subject similarity among candidates. NLI: A frozen DeBERTa-v3 model evaluates candidates bidirectionally, taking the larger contradiction probability. Structured-atom: Fits an L2-regularized logistic model on aggregated features for eight predefined file-pair features.
- Data split: Development and test sets are separated by repository and stratified by whether they contain conflicts; model fitting and threshold selection use only development repositories. Each held-out file pair is equally weighted in RQ2 metrics, while RQ1 uses sampling weights.
- Threshold rule: The development-set target precision is 0.80, and an alert is possible only with a non-empty candidate list; if no threshold meets the target, the cutoff is set above the highest score among development pairs with candidates, and test pairs must exceed that score to alert.
- H2 and ranking analysis: H2 requires that the paired bootstrap 95% lower bounds of Structured-atom's held-out F1 relative to Lexical and NLI both be positive. A post hoc NLI manual-review ranking analysis was also done with a fixed split, ranking, and top-quartile cutoff (37 pairs).
What experiments did the paper conduct?
The weighted conflict rate is 20.83%; at frozen thresholds, each of the three screeners detects at most 1 held-out conflict, and H2 is not supported.
Experimental setup
- Manual annotation of the sample: All 241 file pairs from 128 probability-sampled repositories were reviewed; the authors and an external software engineer annotated independently, after which the authors adjudicated, and there were no unclear pairs.
- Final labels: 38 conflicting pairs and 203 non-conflicting pairs; conflicts are distributed across 28 of the 128 repositories, and 54 independent incompatibilities were recorded (Section 4.1).
- Detection split: The development set is 92 pairs from 51 repositories with 15 conflicts; the held-out test set is 149 pairs from another 77 repositories with 23 conflicts. Retrieval selected 4,082 candidates in total; 11 test pairs had empty candidate lists and all were non-conflicting.
- Compared methods: Lexical, frozen DeBERTa-v3 NLI, and an eight-feature L2-regularized Structured-atom logistic model; all three use frozen operating points selected on the development set.
- Metrics and decisions: Incidence uses design-weighted estimates and repository-clustered bootstrap; detection reports P/R/F1, AUROC, AP, and TP/FP/FN. H1 checks whether the conservative one-sided lower bound exceeds 10%, and H2 checks whether the lower bound of the F1 gain interval is positive.
- Repetition and review: All conflict labels were made by humans, and generative AI was not used as ground-truth labels; the paper does not report the number of repeated runs for detection scores.
Main results
According to Table 7, the following are the frozen detection results on the 149 held-out file pairs; AUROC and AP do not depend on a threshold.
Swipe horizontally to read the table
Method (TP/FP/FN) P/R/F1 AUROC [95% CI] AP Lexical (0/0/23) 0/0/0 0.526 [0.410, 0.629] 0.156 NLI (1/6/22) 0.143/0.043/0.067 0.736 [0.601, 0.835] 0.275 Structured-atom (1/2/22) 0.333/0.043/0.077 0.606 [0.479, 0.724] 0.204 - High-precision target not met: None of the three methods reached 0.80 precision on the development set, so all used the fallback cutoff; on the test set they flagged 0, 7, and 3 pairs, respectively, each identifying 1 conflict.
- H2 not supported: The paired F1 gains of Structured-atom over Lexical and NLI are 0.077 and 0.010, with 95% intervals of [0, 0.250] and [−0.162, 0.222], respectively; neither lower bound is positive.
- Authors' interpretation: The authors state that NLI has a signal usable for ranking, but that all three scores are poorly calibrated and should not be read as probabilities; 23 positives make differences imprecise, and a null result does not prove the methods are equivalent.
Conflict incidence and types
- Overall estimate: The design-weighted conflict rate is 20.83%, with a repository-clustered bootstrap 95% CI of 12.87–29.44%; the conservative one-sided 95% lower bound of 14.01% is above the H1 threshold of 10%. Estimates under the prespecified filter conditions range from 18.48% to 24.50%.
- Annotator sensitivity: Under the authors' complete independent labels the rate is 17.30% (one-sided lower bound 11.59%), and under the external annotator's labels it is 21.88% (lower bound 14.78%); H1 holds under both label sets.
- Tool combinations and forms: In Table 3, estimates for the five common combinations range from 9.66% to 21.77%, most intervals are wide, and the authors state this is insufficient to rank tool combinations. Of the 58 type mentions in Table 4, command/toolchain accounts for 16, style/API for 11, and safety/permission for 1.
Post-hoc NLI ranking and robustness
- Top-quarter review: After fixing the NLI ranking, the top 37 pairs contain 13 of the 23 held-out conflicts, corresponding to 56.5% recall and 35.1% precision; the repository-clustered 95% CI for recall is 35.0–74.1%; the authors consider this to support triage rather than automatic warnings.
- Independent-label review: The two annotators each judged 25 test pairs as conflicting; the same top 37 pairs cover 13 under the authors' labels and 14 under the external annotator's labels.
- AUROC ranking: Under the authors' labels, NLI, Structured-atom, and Lexical are 0.666, 0.625, and 0.520, respectively; under the external annotator's labels they are 0.731, 0.573, and 0.520, with the same method order.
Error analysis and exploratory associations
- Missed cases: All three methods miss the test-script conflict in Table 5 at the frozen threshold; NLI ranks the complete file pair 29th out of 149 pairs, so it falls within the top-quarter review range but is not flagged.
- Composition of misses: Of Structured-atom's 22 misses, style/API, command/toolchain, and polarity are mentioned 8, 6, and 6 times, respectively, covering all types among the held-out positives; for 21 of these pairs the candidate list was full.
- Exploratory associations: In Table 6, the ORs for mean instruction file length, number of configured tools, and cross-file commit asymmetry are 2.38, 1.87, and 1.35, respectively, and their robust 95% CIs all exclude 1; the ORs for repository size and project age are 0.99 and 1.00, respectively. The authors state that these are separately fitted design-weighted models, not causal effects or a multivariable risk model.
Other ablations and analyses
- Annotation agreement: Of the 241 pairs, independent decisions agreed on 216 (89.63%), and Cohen's κ before adjudication was 0.629.
- Adjudication of disagreements: Of the 25 inconsistent labels, 12 were adjudicated as conflicting and 13 as non-conflicting; the full positive review also overturned 2 agreed positives.
- Extraction evidence validation: Of 2,193 extracted units, 52 were rejected, accounting for 2.37%.
- F1 intervals: The repository-clustered 95% intervals for Lexical, NLI, and Structured-atom are [0, 0], [0, 0.188], and [0, 0.250], respectively.
- Figure 2: The caption gives a test-set conflict rate of 0.154; the text conversion did not preserve readable curve values, so no curve positions are written beyond the metrics in Table 7.
- Retrieval error not decomposable: File-level labels do not annotate each candidate, and the authors state that they cannot estimate how often retrieval misses decisive passages or predict whether expanding the candidate list would help.
What are some points that can be further explored?
The authors list limitations on the sampling frame, snapshots, and label equivalence, and propose an independent-validation NLI review process and a full-text LLM judge for evaluation.
Limitations and future directions noted by the authors
- Effect scope not measured: The study measured written rule incompatibility and did not measure effects within a single agent session; the latter requires client version, settings, task, and loaded context, and maintainer intent was also not observed (Section 6, Construct validity).
- Extraction and adjudication limitations: LLM extraction may be uncertain, and atomization may remove context; author adjudication of disagreements may introduce residual bias, and small positive classes limit model complexity and precision (Section 6, Internal validity).
- Extrapolation boundaries: The weights cannot correct for upstream data being limited to publicly active GitHub projects in ten languages, and for this paper's requirement of English instructions readable by multiple tools; private projects, configuration outside the repository, and monorepos with dependency-subtree policies may have different incidence rates (Section 6, External validity).
- Snapshot limitation: Only one canonical file was selected per tool, and a single snapshot cannot determine when or why files diverged; residual label noise sets an upper bound on measurable detection performance, especially with only 23 held-out positives (Section 6).
- Future detection research: The authors propose annotating decisive passages to separately measure retrieval and classification errors, and evaluating a full-document LLM judge that bypasses candidate retrieval on the same human labels (Section 5).
- Future pipeline validation: The authors state that the post-hoc NLI ranking pipeline needs to be tested on an independent sample while measuring missed conflicts and reviewer time; the benchmark could also be used to test whether prioritization reduces the time maintainers spend handling incompatible guidance (Sections 5, 8).
Experimental coverage
- Human sample: The confirmatory sample is 128 repositories and 241 complete cross-tool file pairs; the final set is 38 conflicting pairs and 203 non-conflicting pairs, with two annotators plus author adjudication (Sections 3.4, 4.1).
- Detection sample: The development set has 15 positives and 92 pairs; the held-out set has 23 positives and 149 pairs, with disjoint repositories; the paper does not report the number of repeated runs for detection scores (Section 4.2).
- Detection methods: The experiments compare Lexical, DeBERTa-v3 NLI, and Structured-atom; the full-document LLM judge is left for future comparison and is not included in these results (Section 3.5).
- Extraction setup: The OpenAI atom extractor receives one document at a time; the paper records the model identifier, prompt, schema, token usage, and run date, but the main text does not give the specific model name (Sections 3.1, 3.5, 6).
- Nature of the analysis: Table 6 presents five prespecified, separately fitted exploratory associations; the paper does not treat them as causal effects or a multivariable risk model (Section 4.1).
Summarize the main content of the paper
Context Clash provides a benchmark of cross-tool instruction conflicts: the conflict rate is estimated at 20.83%, and lightweight detection is not yet suitable for automatic blocking.
Context Clash is a repository-mining and detection feasibility study focused on when persistent instructions maintained in parallel by different coding tools produce operational conflicts, and whether a lightweight screener can identify them.
- Problem definition: The authors treat repository context files as distributed configuration, counting as conflicts only rules with the same subject, overlapping operational scope, and that cannot be satisfied simultaneously, avoiding treating reasonable tool-specific differences as contradictions.
- Method and data: 128 repositories were probabilistically sampled from a frozen public dataset, and two annotators independently reviewed 241 complete file pairs and adjudicated; detection evaluation used 92 development pairs and 149 held-out pairs from disjoint repositories.
- Incidence: The design-weighted conflict rate was 20.83%, with a 95% CI of 12.87–29.44%, and a conservative one-sided 95% lower bound of 14.01%; estimates under the independent labels of the authors and the external annotator were 17.30% and 21.88% respectively, and H1 held in both.
- Conflict forms: 38 conflict pairs were distributed across 28 repositories; among 58 type mentions, command/toolchain accounted for 16 and style/API for 11, indicating the list also covers types such as polarity, architecture, version, validation, and permissions.
- Detection results: In Table 7, Lexical, NLI, and Structured-atom flagged 0, 7, and 3 pairs respectively at the frozen threshold, each finding at most 1 held-out conflict; the lower bound of Structured-atom's F1 gain interval was not positive, and H2 was not supported.
- Authors' conclusion: The authors consider cross-tool inconsistency a measurable maintenance problem, but current results are insufficient for a screener to automatically block commits or rewrite files. Post hoc, the top 37 NLI pairs covered 13 of 23 conflicts, which the authors view as a manual-review ranking approach worth validating on an independent sample.