What Coding Agents Leave Unsaid: Measuring Task-State Gaps Between Execution and Reports
Organizations: Tencent
Abstract
Human supervisors rely on coding agents' reports to assess progress, verify repairs, and decide when to intervene. But a supervisor cannot investigate a failure they were never told occurred. Failed attempts, workarounds, and unresolved risks may disappear from routine reports, leaving supervisors unaware of issues that warrant scrutiny. We conduct CTXGAP, a measurement study quantifying the gap in task-state recoverability between agents' accumulated user-facing reports and their full recorded execution contexts. Across 37 coding tasks and 4,799 valid probes, agents answer 93.6% of task-state questions on demand; full-context readers recover 92.7%, while report-only readers recover 52.0%, a 40.7-point gap. At the final checkpoints of 30 verified fixes, the gap remains 34.8 points. Human annotation identifies states mentioned without enough supporting detail as the largest category of unrecovered information, and model-assessed supervision-relevant states retain substantial gaps. Full terminal scrollback improves recovery to 73.6% but still trails full context. Under matched report lengths, context-informed rewrites improve recovery by about eight points, without a detectable targeted-over-natural advantage. Positive gaps persist across harnesses and independent DeepSeek execution and measurement. CTXGAP establishes report-based task-state recoverability as a complementary evaluation dimension.
Figures & tables
| View / setting | Accuracy | Gap | 95% CI | |
| Main measurement (37 tasks; 4,799 probes) | ||||
| Reports | .520 | .927 | .407 | [.373, .438] |
| Scrollback | .736 | .927 | .191 | — |
| Actor fork (aux.) | [ ] | |||
| Fixed at † | .571 | .919 | .348 | [.282, .413] |
| Cross-harness check (12 shared issues) | ||||
| Component | Validity evidence | Study scope |
|---|---|---|
| Probe eligibility | 4,799 of 4,855 retained; filter changes by +0.56 pp | Eligibility determined after full-context scoring |
| Answer scoring | Alternative rubric: +1.1 pp [ , +3.6]; dual-rater machine–human difference: +1.39 pp [ , +4.54] | Rubric and dual-rater audits on separate samples |
| Conveyance validity | 195 stratified atoms: mention , sufficiency | Mentioned but insufficient: 55.4% / 59.2% of weighted gap mass |
| Report | NI recovery | Overall | Chars | |||
|---|---|---|---|---|---|---|
| Reports only | 0.017 | 54 | 0.512 | 120 | 8,480.5 | 120 |
| Natural | 0.031 | 54 | 0.518 | 120 | 1,573 | 120 |
| Structured | 0.281 | 54 | 0.597 | 120 | 3,184 | 120 |
| Targeted (matched) | 0.110 | 50 | 0.564 | 112 | 1,460.5 | 112 |
| Targeted | 0.602 | 50 | 0.686 | 112 | 5,693.5 | 112 |
Appendix figures & tables66 assets
Supplementary material from the paper’s appendix.
Appendix
| Experiment | Tasks | Units |
|---|---|---|
| Main sample | 37 | 148 checkpoints |
| State probes | 37 | 4,799 probes |
| Supervision contrast | 72 | 284 probe-linked units |
| Reporting development | 46 | 184 checkpoints |
| Reporting held-out | 30 | 120 checkpoints |
| Cross-harness | 12 | 36 trajectories |
| Measurement | Estimate | 95% CI |
|---|---|---|
| Actor | 0.936 | [0.929, 0.944] |
| Full context | 0.927 | [0.913, 0.938] |
| Reports | 0.520 | [0.491, 0.551] |
| 0.416 | [0.386, 0.444] | |
| 0.407 | [0.373, 0.438] |
| Checkpoint | Instruction |
|---|---|
| 1 | Investigate; do not modify code |
| 2 | Implement a fix |
| 3 | Run tests and report the result |
| 4 | Assess remaining risk |
| Parameter | Value |
|---|---|
| Minimum atom importance | 2 |
| Full / partial / no credit | 1 / 0.5 / 0 |
| Probe answer samples per view | 3 |
| Measurement thinking mode | Disabled |
| Headline view-gap bootstrap resamples | 10,000 |
| Confidence level | 95% |
| Checked stage | Runs checked | Distinct windows |
|---|---|---|
| Atom extraction | 32 | 1 |
| Probe generation | 32 | 1 |
| Judge | 32 | 1 |
| Observer: reports ( ) | 32 | 1 |
| Observer: execution ( ) | 32 | 1 |
| Observer: task prior | 32 | 1 |
| Subset | Valid probes | |||
|---|---|---|---|---|
| Frozen 37 | 4,799 | .5205 | .9271 | .4066 |
| Additional 39 | 5,387 | .4748 | .9372 | .4624 |
| Expanded 76 | 10,186 | .4950 | .9328 | .4378 |
| Subset | Valid | [95% CI] | |
|---|---|---|---|
| Fixed; all | 3,914 | .5129 | .4118 [.3716,.4478] |
| Fixed; | 1,172 | .5705 | .3479 [.2816,.4126] |
| All runs; | 1,450 | – | .3451 [.2902,.3979] |
| Subset | Valid | Tasks | [95% CI] |
|---|---|---|---|
| Primary cohort | 4,799 | 37 | .4066 [.3733,.4381] |
| Drop affected run | 4,653 | 36 | .4141 [.3824,.4439] |
| Drop 86 mismatches | 4,713 | 37 | .4110 [.3796,.4404] |
| Recorded stage | Calls | Explicit temperature |
|---|---|---|
| Atom extraction | 226 | none (226 unknown) |
| Probe + reference generation | 520 | 0.0 (211); 309 unknown |
| Observer answers | 8,258 | 0.7 (697); 7,561 unknown |
| Judge / coverage / audits | 9,929 | 0.0 (1,064); 8,865 unknown |
| View (weighted micro) | Accuracy | Share [95% CI] |
|---|---|---|
| Reports | .5205 | – |
| Terminal scrollback | .7359 | 53.0% [47.6, 57.8] |
| Execution, no reasoning | .8902 | 37.9% [33.1, 43.7] |
| Full execution | .9271 | 9.1% [6.0, 12.1] |
| Full-minus-report gap | .4066 | 100% |
| View | Mean chars | Accuracy | 95% CI | |
|---|---|---|---|---|
| Latest report | 2,565.1 | 0.239 | [0.219, 0.263] | 0.697 |
| All turn reports | 6,564.4 | 0.520 | [0.491, 0.551] | 0.416 |
| + Narration | 7,532.8 | 0.545 | [0.520, 0.574] | 0.391 |
| + Exec. headers | 13,064.8 | 0.639 | [0.610, 0.669] | 0.297 |
| + Last 3 outputs | 14,553.5 | 0.657 | [0.635, 0.683] | 0.279 |
| + Last 10 outputs | 18,256.3 | 0.690 | [0.666, 0.715] | 0.247 |
| Fresh | Earlier | Unaligned | 95% CI | ||
|---|---|---|---|---|---|
| 1 | 9.423 | 0.014 | 9.436 | 0.426 | [0.375, 0.480] |
| 2 | 11.546 | 7.480 | 19.027 | 0.472 | [0.439, 0.505] |
| 3 | 3.057 | 17.984 | 21.041 | 0.436 | [0.390, 0.482] |
| 4 | 3.411 | 18.869 | 22.280 | 0.359 | [0.317, 0.403] |
| Component | Share | Atoms |
|---|---|---|
| Not conveyed | 0.711 | 1397 |
| Reported, not recovered | 0.151 | 294 |
| Wrong report answer ∗ | 0.108 | 213 |
| Latest-only partial † | 0.028 | 65 |
| Stale | 0.002 | 5 |
| Total | 1.000 | 1974 |
| Source class | Semantic | Provenance-flag split |
|---|---|---|
| Not conveyed | 0.711 | 0.867 |
| Reported, not recovered | 0.151 | 0.020 |
| Wrong report answer | 0.108 | 0.108 |
| Latest-only partial | 0.028 | 0.002 |
| Stale | 0.002 | 0.002 |
| Quantity | Share |
|---|---|
| Old gap mass | 0.620 |
| Old, not traced to assistant_text | 0.979 |
| Old, judged not conveyed | 0.942 |
| Category | Atoms | Total share | Not conveyed | Reported, unrecovered | Wrong report answer | Latest-only partial | Stale |
|---|---|---|---|---|---|---|---|
| Facts | 632 | 0.428 | 0.687 | 0.187 | 0.098 | 0.028 | 0.000 |
| Failures | 373 | 0.166 | 0.894 | 0.028 | 0.074 | 0.004 | 0.000 |
| Progress | 332 | 0.159 | 0.545 | 0.221 | 0.169 | 0.052 | 0.012 |
| Environment | 205 | 0.082 | 0.825 | 0.068 | 0.090 | 0.014 | 0.004 |
| Risks | 128 | 0.050 | 0.666 | 0.157 | 0.149 | 0.027 | 0.000 |
| Decisions | 99 | 0.037 | 0.678 | 0.177 | 0.094 | 0.051 | 0.000 |
| Type | Frozen share ( ) | Omission first ( ) |
|---|---|---|
| Not conveyed | .7112 (1397) | .7984 (1568) |
| Wrong report answer | .1082 (213) | .0211 (42) |
| Reported, not recovered | .1506 (294) | .1506 (294) |
| Latest-only partial | .0277 (65) | .0277 (65) |
| Stale | .0022 (5) | .0022 (5) |
| Operational rule | “Decay” | Mass (%) | Residual |
|---|---|---|---|
| Frozen latest-only | 65 | 2.77 | 294 |
| Zero included | 307 | 16.04 | 52 |
| Prior recovery lost | 121 | 6.29 | 238 † |
| Annotator A | Annotator B | |||
|---|---|---|---|---|
| State for report-only probe | Mass share | 95% CI | Mass share | 95% CI |
| Not mentioned | .4205 | [.314,.535] | .3371 | [.247,.426] |
| Mentioned, insufficient | .5543 | [.439,.658] | .5917 | [.493,.691] |
| Sufficient, not recovered | .0252 | [.011,.045] | .0371 | [.019,.061] |
| Uncertain | .0000 | — | .0341 | [.004,.073] |
| A | B | |||
|---|---|---|---|---|
| Frozen omitted | Share | CI | Share | CI |
| Not mentioned | .5254 | [.385,.669] | .3927 | [.273,.517] |
| Mentioned, insufficient | .4746 | [.332,.616] | .5748 | [.445,.700] |
| Sufficient | .0000 | — | .0000 | — |
| Group | Gap [95% CI] | |||
|---|---|---|---|---|
| HY4 relevant | 151 | .553 | .906 | .353 [.266,.435] |
| HY4 irrelevant | 42 | .368 | .900 | .532 [.421,.627] |
| DS relevant | 135 | .546 | .910 | .364 [.259,.463] |
| DS irrelevant | 49 | .377 | .873 | .496 [.379,.606] |
| Both relevant | 125 | .553 | .914 | .361 [.260,.462] |
| All scored | 195 | .508 | .901 | .393 [.316,.467] |
| Observer | [95% CI] | [95% CI] | |||
|---|---|---|---|---|---|
| HY4-preview | .303 | .258 | .535 | +.278 [.205,.347] | -.045 [-.111,.020] |
| DeepSeek | .323 | .343 | .525 | +.182 [.119,.245] | +.020 [-.016,.056] |
| GLM | .475 | .495 | .601 | +.106 [.037,.177] | +.020 [-.043,.077] |
| Quartile | Mean overlap | 95% CI | |
|---|---|---|---|
| Q1 | .005 | +.028 | [-.036,.086] |
| Q2 | .053 | +.113 | [.018,.213] |
| Q3 | .208 | +.167 | [.080,.257] |
| Q4 | .479 | +.440 | [.300,.594] |
| Metric | Frozen | Adjusted | [95% CI] |
|---|---|---|---|
| .4159 | .4244 | +.0085 [.0018, .0154] | |
| .4066 | .4153 | +.0088 [.0021, .0153] |
| Harness | Orig. | Adjusted | CI ( ) |
|---|---|---|---|
| Claude Code | .4070 | .4216 | [.0053, .0260] |
| Pi | .3903 | .4026 | [-.0003, .0238] |
| DSH | .4898 | .5144 | [.0130, .0362] |
| Audit | Items | Annotators |
|---|---|---|
| Conveyance wave 1 | 20 | 3 |
| Probe-sufficiency machine audit | 403 | — |
| Stratified human sufficiency | 45 | 2 |
| Human-consensus subset | 32 | 2 |
| Question-aligned re-scoring | 240 | — |
| Disputed items retained as errata | 14 | — |
| Audit label | Class share | Gap share | Items |
|---|---|---|---|
| Partial support | 0.797 | 0.120 | 235 |
| Full support | 0.173 | 0.026 | 50 |
| No support | 0.024 | 0.004 | 8 |
| Contradictory | 0.005 | 0.001 | 1 |
| Total | 0.999 | 0.151 | 294 |
| Comparison | Agreement | |
|---|---|---|
| Human–human | 0.711 | 0.441 |
| Machine–annotator 1 | 0.822 | 0.554 |
| Machine–annotator 2 | 0.711 | 0.447 |
| Machine–human consensus | 0.875 | 0.721 |
| Annotator / subset | Upgrades | Partial items | Rate |
|---|---|---|---|
| Annotator 1 | 5 | 35 | 0.143 |
| Annotator 2 | 11 | 35 | 0.314 |
| Consensus | 3 | 24 | 0.125 |
| Mean annotator rate | — | — | 0.229 |
| Diagnostic | Value |
|---|---|
| Wave-1 Fleiss kappa | 0.565 |
| Annotator 1: stricter / looser | 5 / 2 |
| Annotator 1: exact p | 0.453125 |
| Annotator 2: stricter / looser | 11 / 0 |
| Annotator 2: exact p | 0.000977 |
| Scenario | Upgrade rate | Gap share |
|---|---|---|
| Machine | 0.000 | 0.034 |
| Consensus adjustment | 0.125 | 0.054 |
| Mean-annotator adjustment | 0.229 | 0.070 |
| Quantity | Original | Re-scored | Change |
|---|---|---|---|
| 0.514 | 0.540 | +0.026 | |
| 0.935 | 0.972 | +0.037 | |
| Gap | 0.421 | 0.432 | +0.011 |
| Gap 95% CI | — | — | [-0.013, +0.036] |
| Human rule | Task-paired | 95% CI |
|---|---|---|
| Two-rater mean (partial=0.5) | +0.0139 |
| Measurement | Estimate | 95% CI |
|---|---|---|
| Restored omission | 0.718 | — |
| Matched-known | 0.525 | — |
| Paired | 0.189 | [0.102, 0.280] |
| Quantity | Count | Base | Rate |
|---|---|---|---|
| Non-inferable omissions | 241 | 286 | 0.843 |
| Instructions changed | 206 | 286 | 0.720 |
| Uptake flag | 149 | 286 | 0.521 |
| Changed + uptake | 138 | 286 | 0.483 |
| Fact-targeting check | 1 | 7 | 0.143 |
| Behavior: informed wins | 4 | 14 | — |
| Report condition | Accuracy |
|---|---|
| : original accumulated | .6716 |
| : natural rewrite | .7545 |
| : targeted rewrite | .7566 |
| Parameter | Value |
| Development gap atoms | 2,116 |
| Target category coverage threshold | 0.70 |
| Selected category coverage | 0.764 |
| Matched generation budget (tokens) | 1,032 |
| Observed matched median tokens | 951 |
| Development / held-out checkpoints | 184 / 120 |
| Contrast | Units | Tasks | 95% CI | |
|---|---|---|---|---|
| TM Nat | 50 | 25 | 0.077 | [0.030, 0.133] |
| Targeted Nat | 50 | 25 | 0.568 | [0.455, 0.672] |
| Struct Nat | 54 | 27 | 0.250 | [0.164, 0.347] |
| TM Struct | 50 | 25 | -0.188 | [-0.292, -0.097] |
| Targeted TM | 50 | 25 | 0.492 | [0.378, 0.597] |
| Targeted Struct | 50 | 25 | 0.303 | [0.167, 0.420] |
| Contrast | Units | Tasks | Delta | 95% CI |
|---|---|---|---|---|
| matched – nat | 112 | 28 | 0.049 | [0.036, 0.062] |
| targeted – nat | 112 | 28 | 0.171 | [0.149, 0.194] |
| Category | Probes | Before | After |
|---|---|---|---|
| Failures | 437 | 0.823 | 0.810 |
| Rejected options | 120 | 0.643 | 0.640 |
| Environment | 326 | 0.617 | 0.576 |
| Progress | 987 | 0.390 | 0.369 |
| Assumptions | 102 | 0.384 | 0.394 |
| Facts | 1866 | 0.376 | 0.377 |
| Tolerance | Units | Tasks | Natural | Targeted | [95% CI] |
|---|---|---|---|---|---|
| % | 47 | 25 | .6728 | .6967 | +.0239 [.0105,.0357] |
| % | 79 | 30 | .6811 | .7063 | +.0252 [.0145,.0349] |
| Probe | Observer | |||
|---|---|---|---|---|
| HY4 | HY4 | .5206 | .8995 | .3789 |
| HY4 | DeepSeek | .5012 | .8462 | .3450 |
| DeepSeek | HY4 | .4879 | .8874 | .3995 |
| DeepSeek | DeepSeek | .4564 | .8547 | .3983 |
| Within-atom contrast (second first) | 95% CI | |
|---|---|---|
| DS vs. HY4 probe; HY4 observer | +.0206 | [ ,.0644] |
| DS vs. HY4 probe; DS observer | +.0533 | [.0049,.1076] |
| DS vs. HY4 observer; HY4 probe | [ ,.0048] | |
| DS vs. HY4 observer; DS probe | [ ,.0351] |
| Aligned-pair contrast | 95% CI | |
|---|---|---|
| DS vs. HY4 probe; HY4 observer | +.0174 | [ ,.0615] |
| DS vs. HY4 probe; DS observer | +.0348 | [ ,.0892] |
| DS vs. HY4 observer; HY4 probe | [ ,.0090] | |
| DS vs. HY4 observer; DS probe | [ ,.0247] |
| LLM label | Probe/task | 95% CI | |
|---|---|---|---|
| Literal-dependent | 85/19 | .4785 | [.4011,.5509] |
| Non-literal | 74/19 | .3690 | [.2902,.4436] |
| Pipeline (tasks) | 95% task CI | |
|---|---|---|
| HY4 measurement (37) | .4066 | [.373,.438] |
| DS measurement (37) | .3985 | [.348,.456] |
| HY4 on DS execution (12) | .5468 | [.462,.643] |
| DS on DS execution (12) | .4885 | [.431,.549] |
| DeepSeek independent measurement | HY4 frozen measurement | |||||||
| Checkpoint | Valid | Valid | ||||||
| 829 | .557 | .933 | .376 | 789 | .496 | .917 | .421 | |
| 1,215 | .506 | .937 | .431 | 1,223 | .468 | .922 | .453 | |
| 1,340 | .507 | .932 | .425 | 1,337 | .501 | .940 | .439 | |
| 1,416 | .574 | .938 | .364 | 1,450 | .579 | .924 | .345 | |
| Subset (DS HY4) | Pooled | Task-equal |
|---|---|---|
| 37 tasks | [ ] | [ ] |
| 12 DS-executor tasks | [ ] | [ ] |
| Harness | 95% CI | |||
|---|---|---|---|---|
| Claude Code | .525 | .932 | .407 | [.336, .478] |
| Pi | .550 | .940 | .390 | [.289, .491] |
| DSH | .429 | .919 | .490 | [.417, .563] |
| Pair | Difference | 95% CI |
|---|---|---|
| ClaudeCode – Pi | 0.017 | [-0.122, 0.155] |
| ClaudeCode – DSH | -0.083 | [-0.172, 0.006] |
| Pi – DSH | -0.100 | [-0.207, 0.008] |
| Executing model | |||
|---|---|---|---|
| HY4-preview ( ) | .4264 | .9487 | .5223 |
| DeepSeek-v4-flash ( ) | .4212 | .9482 | .5270 |
| Quantity | Claude Code | Pi | DSH |
|---|---|---|---|
| View gap | 0.407 | 0.390 | 0.490 |
| Not conveyed | 0.251 | 0.194 | 0.284 |
| Reported, unrecovered | 0.075 | 0.074 | 0.105 |
| Wrong answer | 0.030 | 0.053 | 0.049 |
| Partial recovery | 0.060 | 0.075 | 0.058 |
| Unclassified | 0.001 | 0.000 | 0.000 |
| Pair | Difference | 95% CI |
|---|---|---|
| ClaudeCode – Pi | 0.057 | [-0.073, 0.186] |
| ClaudeCode – DSH | -0.033 | [-0.121, 0.055] |
| Pi – DSH | -0.089 | [-0.198, 0.019] |
| Pair | Difference | 95% CI |
|---|---|---|
| ClaudeCode – Pi | 0.104 | [-0.011, 0.218] |
| ClaudeCode – DSH | -0.036 | [-0.146, 0.074] |
| Pi – DSH | -0.140 | [-0.239, -0.040] |
| Pair | Difference | 95% CI |
|---|---|---|
| ClaudeCode – Pi | -0.001 | [-0.087, 0.085] |
| ClaudeCode – DSH | -0.067 | [-0.136, 0.001] |
| Pi – DSH | -0.066 | [-0.161, 0.029] |
| Quantity | Count |
|---|---|
| Cells with available usage | 34 |
| Cells with partial usage | 2 |
| Cells with unavailable usage | 0 |
| Partial cell: usable / total logs | 628 / 631 |
| Partial cell: usable / total logs | 530 / 531 |
| Collection unique requests | 2,545 |
| Actor | Eff. input | Eff. output | Cache read |
|---|---|---|---|
| Claude Code | 1,554,998 | 846,179 | 40,115,328 |
| DSH | 1,520,598 | 649,127 | 40,074,112 |
| Pi | 3,482,598 | 1,867,266 | 34,649,536 |
| Total | 6,558,194 | 3,362,572 | 114,838,976 |
| Stage | Input | Output | Cache read |
|---|---|---|---|
| Judge | 22,134,005 | 925,035 | 3,107,264 |
| Probes | 21,678,906 | 814,186 | 941,440 |
| Observer | 17,420,919 | 5,541,630 | 32,200,704 |
| Atoms | 5,524,555 | 588,513 | 536,576 |
| Semantic conveyance | 2,266,075 | 492,617 | 168,000 |
| Coverage | 1,294,524 | 167,853 | 1,078,784 |
| Purpose | Input | Output |
|---|---|---|
| Core | 53,491,784 | 3,674,329 |
| Sensitivity | 16,827,200 | 4,855,505 |
| Other | 2,813,018 | 150,674 |
| Supervision | 310,177 | 13,422 |
| Audit overhead | 218,783 | 1,021,353 |
| Metric | Collection | Measurement | Total |
|---|---|---|---|
| Input | 6,558,194 | 73,660,962 | 80,219,156 |
| Output | 3,362,572 | 9,715,283 | 13,077,855 |
| Input+output | 9,920,766 | 83,376,245 | 93,297,011 |
| Cache read | 114,838,976 | 41,607,360 | 156,446,336 |
Coding Agents
Coding agents use language models, tools, and feedback to modify software and complete engineering tasks.
See all 139 papers