Plate IIAgent SystemsHOWARDISM

Working-Context Compaction Fidelity

Whether an LLM-written summary of an agent's history still lets the agent finish the task. CompAct-Bench (Chen et al., Fudan / Tencent Hunyuan / Tsinghua SIGS, 200 pass^3-screened tasks, 12 compactors, 10% character retention, matched action budget) finds 46.0–68.5% post-compaction success (mean 56.7%, Claude Opus 5 best). The stage effect reverses by domain because of where task state lives: Search falls 52.9→34.6% at later boundaries while Coding rises 64.0→86.1% once edits sit in the repository. Over 90% of failures exhaust the budget re-acquiring lost state, and the same fact can pass or fail depending on whether the summary records it as settled or open.

Article metadata
Publication details
Published:
Filed:Concept
Domain:Agent Systems
Tags:Context ManagementCompactionLong Horizon AgentsBenchmarksEmpirical
Reading:20 min
Source:AI-synthesised
About this piece

Articles in this journal are synthesised by AI agents from a curated wiki and are refreshed automatically as new concepts arrive. Topics, framing, and editorial direction are curated by Howardism.

Illustration for Working-Context Compaction Fidelity

Sources#

Summary#

When an agent's history nears its context limit, most harnesses (Claude Code's /compact, DeepSeek's harness) ask an LLM to rewrite it into a shorter working context and continue from that. The question this page tracks is whether the rewrite keeps what the rest of the task needs, scored by whether the agent then finishes, not by whether the summary resembles the history.

CompAct-Bench (Jiayi Chen, Lizhe Chen et al., Fudan University, Tencent Hunyuan and Tsinghua SIGS, arXiv 2611.25673, 2026-11-19, empirical) is the first benchmark in the corpus that scores compaction this way across many models. Its findings:

  1. Compaction stays lossy at the frontier. On tasks the executor had solved in all three uncompacted screening runs, post-compaction success ranges from 46.0% to 68.5% across twelve compactors, with a mean of 56.7%. Claude Opus 5 is best.
  2. Where task state lives decides whether late compaction hurts. Late Search compaction loses (52.9% → 42.6% → 34.6% at the 25/50/75% boundaries, mean over compactors). Late Coding compaction gains (64.0% → 72.7% → 86.1%). The paper's explanation: Coding progress has been written into the repository by then, and Search progress exists only in the history.
  3. Failures are mostly slow, not wrong. 91.6–97.7% of failed continuations exhaust their action budget, most of it spent re-acquiring state the summary dropped.
  4. Summaries distort status as well as dropping content. The same fact, present in all twelve summaries, separates fast success from total budget exhaustion according to whether the summary wrote it as a decision or as an open question.

What is measured#

The benchmark starts from successful runs and breaks them. The fixed executor runs each candidate task three times, and only tasks solved in all three runs (pass³) with at least eight rounds are kept. That leaves 79 BrowseComp (Search), 96 SWE-bench Verified (Coding) and 25 CompanyBench (Workspace, an internal suite) tasks, with mean reference trajectories of 35.3K, 8.8K and 122.8K tokens. One successful rollout per task becomes the reference trajectory. Each trajectory is assigned one boundary at 25%, 50% or 75% of its actions, stratified by length.

At the boundary, the compactor under test rewrites the history H_b into M_b. The executor gets the system prompt and task verbatim (a "retained head" outside the length budget), plus M_b and a continuation instruction. It resumes from the environment state the reference run had reached, rebuilt by replaying the recorded tool calls, and it gets at most the T − b actions the reference run used. The executors are Claude Opus 4.8 (Claude Opus 4.8) on Search and Coding and GPT-5.5 Codex on Workspace. Each summary is generated once and continued three times (Avg@3). Success means accepted by the source benchmark's evaluator within budget.

Two controls hold length and prompt fixed. Every compactor gets one generic instruction: "Please summarize the above history concisely… Preserve key facts, decisions, tool call results, and context needed for continuing the conversation." An Iterative Ratio Calibration loop (IRC) then shrinks and re-edits the candidate until its length is within 3% of a 10% character-retention target. The paper's B.5 prose says 86.7% of the 2,400 compactions land inside the band and its Table 9 "All" row says 86.0%. Every model's interquartile range sits within 0.097–0.104, so length is matched.

The headline: lossy even at the top#

Post-compaction task accuracy at 10% retention (Table 2, reconciled against the PDF):

CompactorSearchCodingWorkspaceOverall
Claude Opus 5 (Max)62.081.240.068.5
Gemini 3.8 Flash (High)57.075.056.065.5
Kimi K3 (Max)50.679.232.062.0
GPT-5.6-Sol (Max)51.976.020.059.5
Doubao Seed 2.1 Pro (High)31.667.78.046.0

The bootstrap 95% intervals of the top and bottom compactor do not overlap (Overall [62.0, 74.5] vs [40.0, 52.5]), so the benchmark separates strong from weak compactors. Strength does not cover the failures, though. The four strongest compactors jointly fail 15.2% of Search, 7.3% of Coding and 32.0% of Workspace tasks, and the case studies show them making the same qualitative errors as the weak ones. Rankings partly transfer across domains: compactor-level Spearman correlations are 0.62 (Search–Coding), 0.53 (Search–Workspace) and 0.26 (Coding–Workspace), so a single-domain score would mis-rank models.

Workspace numbers are the least reliable: there are 25 tasks, and intervals run 40 points wide (Opus 5: 40.0 [20.0, 60.0]).

Where the state lives decides the stage effect#

Compaction input grows toward later boundaries in every domain: Search 8.2K → 29.3K tokens, Coding 2.3K → 5.5K, Workspace 41.2K → 90.0K. Accuracy moves in opposite directions anyway. On Search, 11 of 12 compactors do worse at 75% than at 25%. On Coding, every compactor is best at 75%. Workspace peaks at 50% for 9 of 12. Within each domain, prefix length is essentially uncorrelated with success (|ρ| ≤ 0.03). The amount of history does not predict compaction difficulty.

A without-history arm locates the effect (Table 14, reconciled). The executor gets the boundary environment state and the task, with neither H_b nor M_b:

25%50%75%
Coding, no history, initial repo48.535.515.6
Coding, no history, boundary repo66.758.171.9
Coding, with M_b (mean of 12)64.072.786.1
Search, no history26.915.47.4
Search, with M_b52.942.634.6

On Search, the open web keeps no task state, so the summary is the only carrier of progress and adds 26–27 points at every boundary. On Coding, the replayed repository alone carries most of the value. At the 25% boundary the summary adds nothing (−2.7), and later it adds about 14 points on top of the repository. The strongest single predictor of Coding success is whether a file edit had been written before the boundary: 86.9% vs 53.0% (Mann-Whitney p = 3×10⁻⁸). Prior test runs add nothing once an edit exists (86.5% vs 87.2%). The written change, not prior verification, is what the environment remembers. The paper's Case G marks the limit. In that Coding task the executor had located the needed helper but not yet edited anything. Continuations from the four summaries that omitted the helper all failed while rediscovering it, using four of their eight actions.

The design rule this supports is the one Agent Documentation Behavior infers from agents' own note-writing: put state into the environment, and the summary only has to carry what the environment cannot. The paper names that residue as prior decisions, rejected alternatives and unresolved next steps.

Failures are budget exhaustion, not wrong answers#

Failed continuations exhaust their T − b budget in 91.6% (Search), 92.0% (Coding) and 97.7% (Workspace) of cases. Early failures concentrate at the 25% boundary (20.8% of Search and 14.8% of Coding failures there, ≤4% elsewhere). The annotated failures show where the actions go. The executor attempts information recovery in 95.1% of applicable failed continuations and repeats completed work in 54.8%. Critical omission raises repeated work by 18.2 points, and progress/state loss by 13.8. A dropped fact does not make the agent give up. It sends the agent back to re-derive the fact, under a budget that was sized for not having to.

This is the success-rate side of the result Context Edits Under Prefix Caching (the Price-Dependent Sign) finds on the cost side. There, masked agents re-fetch what was removed and run ~23 steps longer, and the saving turns into a premium. Here, with the step count capped, the re-acquisition turns into a failure.

Compaction changes status, not only content#

The paper annotates each failed case with six non-exclusive error labels. An LLM annotator (GPT-5.6-Sol) works in three blinded stages against a per-task inventory of continuation-relevant units, averaging 27.9 per task. Across all unit judgments, 69.1% are preserved, 25.3% omitted and 5.6% distorted. The error prevalences (Table 16, reconciled):

ErrorEarly failureBudget exhaustion
Critical omission47.848.8
Factual distortion40.335.2
Premature commitment (open hypothesis stated as settled)56.746.0
Lost resolution (settled question dropped or reopened)0.03.6
Progress/state loss55.244.6
Constraint/goal distortion25.424.3
Any of the six92.585.8

Premature commitment and progress/state loss are the two errors more common in early failures. The paper reads this as two pathways: omission leads to redoing work, and distortion leads to acting on a wrong picture of the task. The case studies make the status mechanism concrete:

  • Case F, one fact with two statuses. Before the boundary the executor finds a candidate article, sees it has eight authors where seven are required, and moves on. All twelve summaries contain that fact. The four that record it as a settled exclusion, or list the discrepancy without asking for a re-check, all succeed, some in four to six rounds. The eight that leave it open either succeed after 22–36 actions (three) or spend all 39 actions re-verifying the rejected article (five). A fact-counting fidelity metric scores all twelve alike.
  • Case C, a doubted candidate promoted. One tool result names a school that fits two clues and violates two. The source executor kept searching for 31 more actions. The summaries headed "Answer Identified" produced two-action wrong submissions, and overall accuracy was 16.7% with 83.3% early failure. Every summary also inherited a "gold-rush town" framing that the executor had introduced in its own queries and that the question never states. Compaction promoted the agent's own assumption into the task.
  • Case D, a lost verification policy. With 140 actions left, eleven of twelve continuations submitted after 29–70 actions (8.3% accuracy). The summaries were factually faithful. What they did not carry was the source run's habit of testing a candidate chain against the one discriminating clue before answering. All four strongest compactors were among the eleven. General "prefer official sources" advice in the summary did not act as a stopping rule.
  • Case E, the answer sitting among labelled noise. In a seven-round prefix with 35.8K characters, mostly raw search results, the answer string sat beside spam that the executor had correctly flagged. Nine summaries dropped it and three filed it as spam, and every continuation exhausted its budget. What gets cut first at 10% is whatever the agent labelled noise.

This is the population-scale measurement of a claim Context Lifecycle Management previously carried on one AISI incident: compaction is lossy about epistemic status, not just content. Two cases show compaction helping. In Case A (small, fully settled state) continuations finished in 2–5 actions where the source used 11. In Case B (145 rounds, ~700K characters, no candidate yet held) 91.7% of continuations succeeded in a median 14 actions where the source needed 49. In Case B one compactor (GPT-5.6-Sol) noticed two answer-bearing results the executor had never opened and promoted them, labelled unconfirmed. Promotion with the status attached helped. Promotion without it, in Case C, failed.

Limitations#

  • The 100% baseline is a screen, not a matched control. Tasks pass three uncompacted runs, but no condition continues from the replayed boundary state with the full history. Some of the loss attributed to compaction could be continuation variance or replay drift, which the paper argues is small but does not measure.
  • A generic prompt, not a production one. The single instruction asks for a concise summary. Harness compaction prompts with typed sections (decisions, rejected approaches, pending obligations; see Orchestration Sets Token Economics) are not tested. Neither is object-level folding (Self-GC) or truncation.
  • IRC is iterated re-summarization. Opus 5 averages 11.8 compactor calls per instance, shrinking its own previous candidate each time, which may compound loss in a way a single-shot production compaction would not. The paper does not ablate IRC against one-shot compaction.
  • Ten percent of characters is aggressive. The authors justify it (length control is reliable at 5–20% and breaks down above 40%), but every result is at one ratio.
  • Compactor and executor families overlap. Claude Opus 5 compacts for a Claude Opus 4.8 executor on Search and Coding, where it ranks first. On Workspace, with a GPT-5.5 Codex executor, GPT-5.6-Sol scores 20.0%, so same-family advantage is not uniform. Nobody has run the swap.
  • The error statistics cover failed continuations only. No base rate of the same six errors in successful continuations is reported, so "92.5% of early failures contain an error" says nothing yet about whether errors cause failure. The annotator is GPT-5.6-Sol, which is also one of the compactors being judged, and the human review of a subset is described but not quantified.
  • No attention-quality benefit is possible. Executor contexts are short (Coding histories average 8.8K tokens), so the Context Window Smart Zone gain a cleaner window might bring cannot show up. The benchmark measures only what compaction loses.
  • COI. Two corresponding authors are at Tencent Hunyuan, and Tencent's HY3 is one of the compactors. It ranks sixth (57.5%), and no claim leans on it. CompanyBench is internal and unreleased.

Where it sits in the wiki#

  • It qualifies Context Window Smart Zone's "compaction is worse than clearing." The without-history arm is a clear with no written record. Against it, 10% summarization wins by 26–27 points on Search and ~14 on mid and late Coding, and ties at early Coding. That does not contradict Pocock, because his clear comes with a written plan and buys back attention quality, and neither is present here. The paper does measure his "sediment": distortion and premature commitment are present in 35–57% of failures, and Case C shows compaction adding a false framing. Recorded as a scope condition, like the ML-engineering result on that page.
  • It moves Context Lifecycle Management's epistemic-status claim from hypothesis to measured association, and partially answers that page's validated-compaction question. Crude summarization's downstream loss is now measured by a non-vendor team. The validated arm still is not: IRC validates length, not fidelity.
  • It is an L8 measurement in Layerwise Omission Attribution's terms: history compaction as the layer where the fact died, scored by outcome rather than by canary.
  • It extends Harness-Induced Belief Divergence's verification mask. Case D's lost item is a verification obligation. Whether a candidate has been checked against the discriminating clue is state the summary has to carry.
  • It prices the mechanism behind Compute Extrapolation. Tillman (practitioner-opinion) argues that compaction is how frontier models learned to keep improving past their per-task training budget. On MirrorCode, Opus 4.6 was still improving after tens of compactions inside a billion-token run. A model can spend that far only if each compaction keeps what the remaining task needs, and CompAct-Bench's 46–69% shows that generic compaction does not yet do this reliably.
  • It sits beside Long-Horizon Agent Failure Signature's persistence result. Agents there keep acting after a mistake in 72.6% of runs. Here, failed continuations run to budget in over 90% of cases, attempting recovery 95.1% of the time.

A prover's reflector: when it runs matters more than what it reads (h1, 2026-10)#

h1: A Taste of the Bitter Lesson in Automated Theorem Proving (empirical) compacts a Lean prover's transcript into a reflection summary after every rejected submission. Two of its ablations bear on this page. Input: giving the reflector a distilled final attempt instead of the full transcript cuts its input cost by 95% (Putnam100) and 90% (FATE-X), raises prover-call cost by 9.6% and 7.3%, and leaves solves flat (69 against 67, 63 against 64, one run each). Cadence: compacting after every turn gives 50/39 solves at about twice the cost per solve; every ten turns gives 72/65; every 200 gives 60/52. The durable state is a kernel-checked file that the next iteration resumes from. That fits the finding above that where the state lives decides how much compaction hurts. Detail on Simple-Loop Lean Harness (h1).

Connections#

  • Simple-Loop Lean Harness (h1) — compaction inside a Lean prover: the reflector's input barely matters when the state lives in a checked file, and the reset interval decides both solves and cost
  • Compute Extrapolation — compaction as the route past the per-task training budget, in Tillman's account; this page measures the per-boundary loss that would cap it
  • Context Lifecycle Management — the parent page; its object-level GC is the design CompAct-Bench does not test, and its "lossy about epistemic status" claim is the one this page measures across 12 models
  • Context Window Smart Zone — the clear-versus-compact debate; the without-history arm is a measured clear-without-record, which loses to summarization wherever state is not in the environment
  • Long-Horizon Agent Failure Signature — persistence after failure, seen at the compaction boundary: failed continuations rarely stop early, they run out of budget re-acquiring state
  • Context Edits Under Prefix Caching (the Price-Dependent Sign) — the same re-acquisition reaction to removed context, priced as cost there and capped into failure here
  • Layerwise Omission Attribution — CompAct-Bench measures one of its nine layers (L8 history compaction) end to end
  • Harness-Induced Belief Divergence — verification status as state worth carrying; Case D is the verification mask lost across a compaction
  • Agent Documentation Behavior — the externalization hypothesis, with a measured payoff: a materialized repository edit is the strongest predictor of post-compaction Coding success
  • Minimal Harness for Autonomous ML Engineering (Malena) — the 24-hour run where forced compaction cost little because durable state lived on disk; this page supplies the mechanism
  • Orchestration Sets Token Economics — a production compaction contract with typed sections for decisions and rejected approaches, which is the structured prompt CompAct-Bench did not test
  • Claude Opus 5 — the top-ranked compactor (68.5% overall)
  • Claude Opus 4.8 — the fixed Search and Coding executor
  • Claude Code — named as the reference harness for model-based compaction

Open Questions#

  • Does a compaction prompt that types each item's epistemic status (confirmed / rejected / hypothesized / pending obligation) close the premature-commitment and lost-status failures that CompAct-Bench's generic "summarize concisely" prompt produces? Settler: a CompAct-Bench rerun with the same compactors at 10% retention, generic prompt vs a status-typed template (or Claude Code's /compact prompt), scored on post-compaction success. Case F predicts the gain concentrates on budget-exhaustion failures.
  • Are the six compaction errors actually more frequent in failed continuations than in successful ones? The paper reports error prevalence only among failures (92.5% of early failures and 85.8% of budget exhaustions carry at least one), so the causal reading is untested. Settler: the Stage B labels for successful continuations, from the authors' released annotations or a re-annotation of the public BrowseComp/SWE-bench instances.

Sources#

  • CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks — Jiayi Chen, Lizhe Chen, Yujia Chen, Shihan Dou, Ming Zhang, Chendi Ge, Shiguang Ni, Tao Gui, Qi Zhang, Xuanjing Huang & Maxm Pan (Fudan University / Tencent Hunyuan / Tsinghua SIGS), CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks, arXiv 2611.25673, 2026-11-19, 61pp, empirical. Cited: Abstract and §1; §2 construction, protocol and Table 1; §3.2 and Table 2; §3.3 stage results and Figure 3 input lengths; §3.4 and Figure 4; §3.5 and Figure 5; App. A.2 (prompt and retained head), A.3 (executors), A.4 (strict-success and failure classes); App. B.5–B.6 (retention adherence, other ratios); App. C.2–C.4 and Table 11; App. D.1 (bootstrap) and D.2 (Spearman); App. E.1–E.4 and Table 13; App. F.3–F.5 and Table 14; App. G.1–G.4 and Tables 15–18; App. H Cases A–G (narratives and discussions only). COI: Tencent Hunyuan co-authors, with Tencent's HY3 among the compactors (ranked sixth). Parse warning: PDF-derived (docling 2.126.0 / docling-mlx 0.1.1), and ingest verify reported soft table-collapse (20 cells) and table-split-row (10 orphan rows). The collapsed cells sampled are the appendix table of contents' dot leaders and Table 3's model roster (twelve models welded into one cell; cited nowhere). Tables 2, 13, 14, 16 and 17 were reconciled cell-for-cell against pdftotext -layout on the local PDF (pages 5, 29, 35, 37–38) and match; the cited Table 9 "All" row (page 23) and Table 12 Claude Opus 5 row (page 27) were spot-checked the same way. One internal inconsistency: B.5 prose gives 86.7% of compactions in tolerance, Table 9's "All" row 86.0%.
  • Two Kinds of Test-Time Scaling — James Tillman, Two Kinds of Test-Time Scaling, Forethought newsletter, 2026-11-09 (practitioner-opinion, conceptual essay): cited for the compute-extrapolation distinction and the claim that compaction is how frontier models learned to keep improving past their per-task training budget (MirrorCode observations relayed, not in raw/)
  • h1: A Taste of the Bitter Lesson in Automated Theorem Proving — Moalla, Rammal, Patel, Munos & Kempe (FAIR at Meta), arXiv 2610.35962 v2, 2026-10-30, empirical. Cited for the reflection-input ablation (Figure 24 caption and §F prose; Table 16's cells are split by the parser, so its numbers come from the prose) and the reflection-interval sweep. Detail on Simple-Loop Lean Harness (h1).
§ end
Cited by 14
Related articles
  • Context Lifecycle Management

    Treating an agent's active context as indexed runtime objects with a lifecycle (fold/mask/prune, recoverable sidecars,…

  • Harness Shrinkage as Models Improve

    Prompt scaffolding shrinks each model release; Cat Wu's pruning discipline; Boris Cherny "100 lines of code a year from…

  • Open Questions Backlog

    Generated by `_system/lint.py --write-backlog`. Do not hand-edit. Domain and Watching sections carry one row per page —…

  • Parallel Agent Orchestration

    One human overseeing a team of concurrent agents: OpenAI Codex telemetry's first hard numbers (28.6% of staff peaked at…

  • Cache-Aware Agent-Loop Cost (TurnCost)

    Kumar & Pandey (Penn State, POVC '26 at ASE 2026): re-scoring 600 public coding-agent trajectories under an exact prefi…