{"id":"4ed0473f-c5f6-4c00-83b7-c60d51b6e7d6","arxiv_id":"2609.31430","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":6.0,"correctness_risk":"medium","formal_verification":"none","parameter_count":6,"one_line_summary":"On SWE-bench Verified, compressing older tool observations into soft tokens while keeping a recent verbatim window and anchoring distillation to the base model cuts context per call by 43 to 57 percent at a resolve-rate cost of roughly 2 to 6 points.","lead":"Coding agents let tool output pile up in context, and careless compression can delete the exact strings a later edit needs. This paper splits each session into a short verbatim window plus compressed soft-token history for older observations, then trains the agent with a distillation anchored to its own unmodified behavior, cutting per-call context by 43 to 57 percent with a resolve-rate loss of a few points on SWE-bench.","discovery_kind":"new_method","skeptic_critique":{"model":"deepseek/deepseek-v4-flash","headline":"On Qwen3 at full window, LOHA matches trivial masking on resolve (12.1 vs 12.2) while using more context (24.8K vs 20.1K); the latent component's added value rests on multi-seed SWE-Master plus a single-run 32K result, so the differentiating claim is not yet robust.","rationale":"The reader's weakest_assumption (recency reliability) is a real mechanism risk but is largely price-tested by the paper itself: the Hard-Last-K sweep measures resolve across K in {0,1,2,3,4,8}, the fuzzy-match editor fallback (Section A.3) and tool re-retrieval absorb some recency misses, and the low exact-recitation figures of Appendix E.6 are openly reported. That makes recency a generalizability concern rather than a direct threat to the measured numbers. The load-bearing issue I find instead is the robustness of the latent-history component's marginal value over the trivial masking baseline, which is the paper's differentiator: at Qwen3 full window (Table 1), LOHA and masking are statistically indistinguishable on resolve (12.1 vs 12.2) with LOHA using more context (24.8K vs 20.1K); the advantage appears only on multi-seed SWE-Master and in a single-run 32K cell, where the same agent's 199-subset counts swing from 27.5 (262K mean) to 42 (32K run), indicating large per-run stochasticity. The concrete check, multi-seed replication of the 32K LOHA-vs-masking comparison with paired McNemar, would settle whether the central contribution holds or reduces to a setting-specific effect. The principal multi-seed claims (resolve rates, per-call context reduction, serving throughput) are well supported, and the paper openly discloses the single-run and subset-bias caveats the reader flagged (e.g., [b441] on encoder caching and the 20-instance diagnostic), so the CONDITIONAL verdict stands; my stress-test tightens the rationale rather than changing it.","tokens_in":26518,"tokens_out":12565,"duration_ms":88319,"concrete_test":"Replicate the 32K-token context-limit comparison (LOHA Hard-Last-3 vs masking vs adapted full-text on the same 199-instance subset) with three seeds per condition, reporting per-seed resolved counts and the paired McNemar p-value for LOHA vs masking (Section 3.2 currently reports one run, gap 16, p=0.0025). If the mean paired gap falls below about 8 instances or p>0.05 across seeds, the latent component's added value over deletion is unverified on Qwen3, and masking becomes the better default at that setting.","verdict_should_be":"UNCHANGED","load_bearing_attack":"Two claims anchor the paper: (1) LOHA+ACD cuts context per call 43%/57% with a modest resolve cost, and (2) retaining compressed latent history is better than deleting it (masking). Claim 1 is solid and multi-seeded. Claim 2, the actual differentiator over trivial masking, is where support is thinnest. On Qwen3 at the full 262K window (Table 1), LOHA Hard-Last-3 resolves 60.5±0.7 (12.1%) vs masking 61.0±5.3 (12.2%), while using more context (24.8K vs 20.1K in/call): the latent component buys nothing measurable on the flagship comparison. Its advantage appears only on SWE-Master (21.8 vs 17.6; per-seed 114/104 vs 88/87/89, with LOHA-vs-masking significance not directly reported) and on the Qwen3 32K cell (42 vs 26, p=0.0025), which is a single run. The same Qwen3 Hard-Last-3 agent resolves a 199-subset mean of 27.5 at 262K but 42 in the 32K single run, a ~50% swing, showing per-run stochasticity (temperature 0.7) is large enough that single-run gaps of this magnitude are not self-certifying. The recency sweep (Table 3a) is also single-run and non-monotonic (Qwen3: 68/76/72 at K=3/4/8), a spread of 8 instances within plausible noise. Paired McNemar handles instance-pairing but not between-condition seed luck. If the 32K latent-better-than-masking advantage does not replicate across seeds, the honest conclusion is that on Qwen3 masking is the better default and the latent contribution is setting-specific. The reader's recency-reliability concern is real but partly mitigated: the paper's own K-sweep prices recency failure, and the fuzzy-match editor fallback (Section A.3) plus tool re-retrieval absorb misses; that concern is a generalizability risk, less load-bearing than the robustness of the differentiating claim.","agreement_with_reader":"partial"},"referee_report":{"model":"deepseek/deepseek-v4-flash","summary":"The paper proposes a context-compression framework for software-engineering agents that combine two components: LOHA (Latent Observations, Hard Actions), a context layout that compresses older tool observations into soft tokens while keeping the agent's own turns, the system prompt, and the last K observations in raw text; and ACD (Anchored Context Distillation), a training method that distills the base model's full-text predictions into the latent view while anchoring the adapted model's full-text behavior to the same base model. On SWE-bench Verified, K=3 is claimed to reduce context per call by 43% (Qwen3-4B) and 57% (SWE-Master-4B-RL) with resolve rates of 12.1% and 21.8% versus 14.5% and 27.5% for the uncompressed bases (Section 3.1, Tables 1--2). Under a 32K-token limit on a 199-instance subset, Qwen3 with K=3 resolves 21.1% versus 11.1% for the adapted full-text agent, and concurrent single-GPU serving achieves 1.9x instance throughput (Sections 3.2, 3.4). The paper additionally reports a recency-window sweep, teacher/anchor ablations, and diagnostic measurements of latent-token readability. The central compression claim is well controlled, multi-seeded, and honestly disclosed; the differentiating claim that retaining a latent history beats deleting it is the part that is least robust.","tokens_in":27006,"tokens_out":6955,"duration_ms":45000,"significance":"If the results hold, the paper makes a useful contribution: a principled context layout for soft-token compression of agent observations, an honest separation of adaptation effects (K=infinity arm) from compression effects (K=3), multi-seed main comparisons with paired McNemar tests, a self-anchoring design choice validated by externally benchmarked resolve rates (which keeps the per-call savings claim from being circular), early-stop grading under context caps, and a genuinely informative negative result that better literal read-back does not imply better agent behavior (Table 6, Appendix B.4). The paper also discloses load-bearing caveats: per-call savings outrun per-trajectory savings for Qwen3, the serving server re-encodes observations on every call, and cached-distribution KL estimates are validated. The experimental design is a fair template for evaluating latent-history compression in coding agents. Its significance is limited by the fragility of the latent-better-than-masking claim, which currently rests on one multi-seed family and one single-run cell.","major_comments":[{"comment":"The paper's headline differentiator — retaining a compressed latent history rather than deleting it — is not supported by the flagship Qwen3 comparison. Hard-Last-3 resolves 60.5±0.7 versus masking's 61.0±5.3, a statistical tie within one standard deviation, while using 24.8K versus 20.1K tokens per call. The sentence 'retaining a latent history therefore preserves more task performance on this base' (SWE-Master paragraph of Section 3.1) rests entirely on the SWE-Master arm (109.0±7.1 versus 88.0±1.0), yet the direct LOHA-versus-masking paired test is not reported for either family; Appendix B.1 gives McNemar tests only against the base agent. Please report the direct paired comparisons (at minimum for the SWE-Master per-seed counts 114/104 versus 88/87/89 in Table 9) or reframe the contribution so that latent retention is presented as setting-specific rather than generally superior to masking; as written, the abstract and Section 3.1 overstate the evidence for the masking advantage.","section":"§3.1, Table 1, Appendix B.1","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"The 32K context-limit result that carries the Qwen3 latent-beats-masking claim (42 versus 26, p=0.0025) is a single run per condition, and the paper's own numbers show the gap sits inside the stochasticity band. On the same 199-instance subset at 262K (Table 4), Hard-Last-3 and masking are tied at 27.5 versus 27.7; the same Hard-Last-3 agent moves from a 27.5 mean at 262K to 42 in the 32K single run; and the single-run recency sweep (Table 3a) varies Qwen3's resolved count by 8 instances across K=3/4/8. With temperature-0.7 decoding, single-run differences of 16 instances are not self-certifying. Please add at least two further seeds to the 32K comparison, or explicitly downgrade the claim in Section 3.2 and the abstract to a single-run result. The distinction matters because this cell is the only Qwen3 evidence that latent history outperforms masking anywhere short of the full window.","section":"§3.2, Table 4","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"The design premise that recency is a reliable proxy for which observations later tool calls will quote verbatim is load-bearing but never directly tested. The paper's own probe (Appendix E.6) yields only 20.4%, 15.6%, and 15.1% exact recitation at 4x, 8x, and 16x compression, so any quoted literal that falls outside the Hard-Last-K window is effectively unrecoverable from latent history; the K=0 collapse to 37/499 (Qwen3) and 51/499 (SWE-Master) in Table 3a quantifies this failure mode, and Section 2.2 acknowledges that compression does not guarantee verbatim reconstruction. The only evidence for recency reliability is the K-sweep, which is single-run and non-monotonic (Qwen3: 68/76/72 at K=3/4/8). A direct measurement of the age distribution of quoted old_str literals in the CoderForge trajectories — the fraction that fall within a K-observation recency window — would confirm or bound the premise and should be reported. As it stands, the Hard-Last-K policy is plausible but unvalidated on its central assumption.","section":"§2.2, Appendix E.6, Table 3a","authors_acknowledge":null,"authors_acknowledge_p":null}],"minor_comments":[{"comment":"The masking standard deviation (5.3) is about seven times LOHA's (0.7), and B.1 notes masking's large seed-to-seed variation (99 versus 43 cap terminations on average). The masking mean is therefore the least stable number in the main table; a third LOHA seed (and ideally a fourth masking seed) would make the tie-or-favor comparison in the first major comment interpretable rather than variance-dominated.","section":"Table 1, Appendix B.1","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"The 1.9x throughput figure depends on the current server re-encoding every observation at each call (encoder estimate 1.64 PF versus 0.02 PF with per-observation caching, B.5) and on the 84th-completion cutoff. The paper discloses both, but with caching the total estimate (2.12 PF) is above the base's 1.82 PF, so the abstract's '1.9x instance throughput' should carry a pointer to these conditions to avoid implying an end-to-end compute win.","section":"§3.4, Appendix B.5, abstract","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"In Table 3b, the reference row uses top-16 cached teacher targets while all other teacher variants use top-64, and the cached-coarsening argument (D.4) depends on M. State explicitly whether this target-width difference could confound the teacher comparison, or re-run the reference row with top-64 targets.","section":"Table 3b, Table 7, Appendix D.4","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"The scaffold's editor has a bounded edit-distance fallback that can rescue non-matching old_str arguments. The fallback is shared across conditions, but its usage is only logged and never reported. A sentence reporting fallback frequency per condition would let the reader judge how much of the resolve gap is absorbed by the fallback rather than by the compressed or text history.","section":"Appendix A.3","authors_acknowledge":null,"authors_acknowledge_p":null},{"comment":"In panel (A), 'norm gains' is plotted with layer 0 labeled as the embedding output; clarify whether that point refers to the embedding normalization or to a separate quantity, since the embedding layer has no transformer normalization gain.","section":"Figure 2 caption","authors_acknowledge":null,"authors_acknowledge_p":null}],"recommendation":"major_revision"},"author_rebuttal":null,"desk_editor":{"model":"deepseek/deepseek-v4-flash","letter":"Two things to know. First, the core compression claim is real and externally verified: on SWE-bench Verified, LOHA+ACD cuts context per call by 43–57% at a moderate resolve cost, and under a 32K limit the compressed layout clearly beats the adapted full-text agent (21.1% vs 11.1%, paired McNemar). That is a genuine, useful result for coding-agent serving. Second, the actual differentiator over trivial masking — retaining latent history rather than deleting old observations — is the thinnest part, and the paper is only partly candid about how thin.\n\nThe design is sensible: recency-window verbatim text for exact tool arguments, soft-token latent history for everything older, and self-anchored distillation to teach latent reading without destroying the base policy. The low-rank patch initialized from the LCLM weight delta is a neat trick, and the read-back-vs-behavior dissociation (rank-256 reads better but acts worse) is worth knowing. The main claims are multi-seeded on both families, the per-call vs per-trajectory discrepancy for Qwen3 is disclosed plainly, and the self-anchoring is a design choice, not circularity — the outcomes are benchmarked resolve rates.\n\nNow the soft spots, in proportion. On Qwen3 at full window, LOHA Hard-Last-3 resolves 12.1% vs masking's 12.2% while using more context (24.8K vs 20.1K per call). That is not a latent advantage; masking is the better default there. The latent-better-than-masking case rests on SWE-Master (multi-seed, 21.8 vs 17.6) and the Qwen3 32K cell, which is a single run whose 42-resolve count sits against the same agent's 27.5-seed-mean on the 199-subset at 262K — a big enough swing that the single-run gap is not self-certifying. The recency sweep is single-run and non-monotonic. I also can't reproduce any of this: no code, no checkpoints.\n\nI'd push back gently on the reviewer instinct that recency-reliability is the load-bearing flaw. It's a real generalizability risk, but the paper prices it with the K-sweep, and the fuzzy-match editor fallback plus tool re-retrieval absorb the misses. The K=0 collapse (37/499 Qwen3, 51/499 SWE-Master) actually confirms their own thesis that latent history alone can't carry exact tool arguments. The robustness of the masking-vs-latent differentiation is the sharper concern.\n\nThis deserves a real referee. The compression claim is solid engineering, the 32K result is the most valuable externally measured thing in it, and the honesty about seed counts and caveats is above the field's average. I'd ask the authors to multi-seed the 32K cell and either report a direct LOHA-vs-masking paired test on SWE-Master or soften the claiming. Send it out.","headline":"Solid compression engineering with honest reporting, but the claim that latent history beats plain masking is thinner than the headline suggests and rests on single-run and SWE-Master-only cells.","tokens_in":27697,"tokens_out":1737,"duration_ms":12710},"pith_extraction":{"msc":[],"pacs":[],"model":"deepseek/deepseek-v4-flash","headline":"The paper claims that a software-engineering agent's tool-observation history can be compressed into soft tokens — its own turns and the last few observations kept verbatim — and, after self-anchored distillation training, cut per-call…","keywords":["software-engineering agents","context compression","soft tokens","latent memory","knowledge distillation","behavioral anchoring","recency window","SWE-bench"],"falsifier":"Collect successful trajectories and count how often a string-replacement old_str or quoted test identifier matches text older than the last $K=3$ observations; if exact quotes from beyond the window are common and the edited-distance fallback does not repair them, the recency premise is wrong. Concretely, run the $K=3$ agent on a task set engineered so the required patch must quote code first viewed more than three tool calls earlier and never revisited; the resolve rate should collapse toward the fully latent $K=0$ baseline (37/499 on Qwen3) if the verbatim window, not the distilled history, is what carries exact access.","tokens_in":27999,"feed_emoji":"🛠️","tokens_out":7562,"duration_ms":47555,"temperature":0.7,"pith_summary":"Software-engineering agents accumulate long contexts because every file view, search, and test log piles into the prompt. This paper claims you can shrink that history by compressing only the tool observations — the things the agent sees — while leaving the agent's own turns and the most recent observations in plain text, and that a training method called Anchored Context Distillation lets the agent read the compressed history without drifting from its original behavior. On SWE-bench Verified, keeping the last 3 observations verbatim cuts context per call by 43% (Qwen3-4B) and 57% (SWE-Master-4B-RL), with resolve rates dropping from 14.5% to 12.1% and from 27.5% to 21.8%. The payoff sharpens under tight memory: at a 32K-token cap the compressed agent resolves 21.1% of a 199-instance subset versus 11.1% for the same adapted agent using full text. The paper's point is that the right representation for an agent history is not all-latent or all-text but a deliberate split, reserving exact text for whatever a future tool call will quote.","feed_headline":"Tool-history compression cuts per-call context 43-57%","feed_subtitle":"Keep recent text verbatim, distill older output to soft tokens; bug-fix rate dips only slightly.","key_machinery":"The load-bearing object is the Hard-Last-$K$ recency policy inside LOHA: each observation enters as text, and once it slips past the window of the $K$ most recent observations it is re-rendered as soft tokens by a frozen long-document compressor's encoder–adapter (roughly one embedding per 16 text tokens), while the agent's own turns and anything shorter than 128 characters stay verbatim. Because exact recitation from latent history is poor — the paper's own probe measures 20.4%, 15.6%, and 15.1% exact recall of later-quoted literals at 4x, 8x, and 16x compression — the verbatim window is what lets string-replacement tools keep working. On top sits ACD, a two-term objective: a distillation term (forward KL from the base model's full-text predictions, plus read-back cross-entropy on substrings of the compressed observations) teaches latent reading, and an anchor term (KL on full-text inputs) regularizes against behavioral drift, both computed from cached top-64 teacher distributions. The student decoder is the base model plus a rank-64 low-rank patch initialized from the truncated SVD of the difference between the compressor decoder's weights and the base decoder's weights; only the patch, the adapter, and normalization gains are trained.","core_discovery":"The central claim is that exact text and semantic access make different demands on a compressed history, and an agent context layout should separate the two. LOHA (Latent Observations, Hard Actions) keeps the system prompt, issue description, and all assistant turns in ordinary text while encoding older tool-observation bodies as soft tokens at roughly one-sixteenth of their length, retaining the last $K$ observations ($K=3$ by default) verbatim so tool arguments that must match source text exactly still have their reference. ACD (Anchored Context Distillation) then trains the agent to read the latent view by matching its base model's full-text predictions with a distillation term — plus a small read-back term that directly supervises literal recovery — while an anchor term constrains predictions on plain-text inputs to stay close to the same base model. The paper argues this joint design preserves action-critical information at low cost: the recency window covers the common pattern where an edit follows a file view, and self-anchoring keeps the adapted agent behaving like the original. The evaluation shows the trade-off: roughly 43–57% fewer context tokens per call at the full window with a 2–6 point resolve-rate cost, and a decisive win over deletion-based compression when the context window is the binding constraint.","pith_inferences":["The same 'keep verbatim whatever an action will quote, make everything else latent' split should transfer to other tool-using agents — web automation, database clients, terminal shells — because the failure mode the paper documents (15–20% exact recitation from compressed history) is general, not specific to code editing.","The strongest practical case is not the full-window throughput gain but staying under a hard memory ceiling: the 21.1% versus 11.1% gap at 32K suggests the method's value compounds exactly where contexts overflow, which is also where per-token serving cost is highest.","A testable extension the paper gestures toward but does not build: replace the fixed recency window with a learned policy that predicts which observations a later tool call will quote verbatim and keeps those as text while compressing the rest — the ablation data ($K=4$ beating $K=8$ on Qwen3) shows window choice is not monotonic, so there is headroom for such allocation."],"forward_implications":["At the full context window, $K=3$ buys a 43–57% per-call context reduction at a resolve-rate cost of roughly 2–6 points on SWE-bench Verified, and larger windows ($K=8$) recover most of the lost performance at higher compute.","Retaining a compressed latent history beats deleting old observations: under a 32K-token cap LOHA resolves 21.1% of a 199-instance subset versus 11.1% for the adapted full-text agent and 13% for masking, with a paired McNemar p-value of 0.0002 against full text.","The fully latent policy ($K=0$) collapses because exact tool arguments cannot be recited from soft tokens, so a verbatim recent window is the component that preserves action fidelity.","Self-anchoring — the base model serving as both distillation teacher and behavioral anchor — preserves tool-use behavior where external teachers induce loop terminations and fewer patches, and better literal recall alone does not improve task performance."],"supporting_citations":[{"why":"Supplies the long-context compressor's encoder and decoder, whose weight difference from the base model seeds the low-rank reading patch.","marker":"(Li et al., 2026)"},{"why":"Provides the SWE-bench Verified benchmark that all task-performance comparisons run on.","marker":"(Jimenez et al., 2024)"},{"why":"The open software-engineering agent scaffold with native function calling that drives the evaluated agents.","marker":"(Wang et al., 2025)"},{"why":"Source of the training-trajectory corpus from which the 35,140 shortest successful trajectories are selected.","marker":"(Ariyak et al., 2026)"},{"why":"Observation masking, the direct deletion baseline that shares the same recency window while removing older content.","marker":"(Lindenbauer et al., 2025)"},{"why":"The low-rank adaptation parametrization used to build the reading patch.","marker":"(Hu et al., 2022)"},{"why":"The context-distillation lineage behind the latent-view distillation term.","marker":"(Snell et al., 2022)"},{"why":"The Qwen3 base model, from which both evaluated agents derive and which supplies the self-anchor teacher.","marker":"(Qwen Team, 2025)"}],"fun_headline_variants":["Separating soft from hard context shrinks agent memory 43-57%","Distilled tool history trims context, barely hurts bug-fix rate","Keep recent text, distill old observations: lower token cost","Agent context split cuts tokens 57%, resolve rate dips 2-6 points","LOHA+ACD: latent tool history at one-sixteenth length"],"cache_read_input_tokens":0,"weakest_assumption_plain":"Recency is assumed to be a reliable stand-in for 'which old text a future tool call will quote verbatim', so anything that leaves the last-$K$ window is compressed without predicting whether a later edit will need its exact string.","fun_headline_variants_meta":{"raw":{"variants":["Separating soft from hard context shrinks agent memory 43-57%","Distilled tool history trims context, barely hurts bug-fix rate","Keep recent text, distill old observations: lower token cost","Agent context split cuts tokens 57%, resolve rate dips 2-6 points","LOHA+ACD: latent tool history at one-sixteenth length"]},"model":"deepseek/deepseek-v4-flash","effort":"low","cost_usd":0.000201,"raw_usage":{"cost":0.000200928,"is_byok":false,"cost_details":{"upstream_inference_cost":0.000200928,"upstream_inference_prompt_cost":0.000131208,"upstream_inference_completions_cost":6.972e-05},"total_tokens":1391,"prompt_tokens":1142,"completion_tokens":249,"prompt_tokens_details":{"audio_tokens":0,"video_tokens":0,"cached_tokens":256,"cache_write_tokens":0},"completion_tokens_details":{"audio_tokens":0,"image_tokens":0,"reasoning_tokens":152}},"tokens_in":1142,"tokens_out":249,"cost_source":"openrouter_usage","duration_ms":3103,"image_pages":[],"temperature":1.0,"billed_attempts":1,"reasoning_tokens":152,"transport_provider":"openrouter","cache_read_input_tokens":0,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-09-28T04:13:18.969715+00:00","model_set":{"reader":"deepseek/deepseek-v4-flash"},"pipeline_version":"pith-pipeline@v1.4.1-daily-deepseek-or-medium","input_kind":null,"input_chars":null,"input_total_chars":null,"passes_missing":null,"published_standing":null,"published_confidence":null,"objection_audit":null,"run_record":null,"basis":{"kind":"not_recorded","source":null,"chars_given":null,"chars_total":null},"receipt":null,"falsifier":"Collect successful trajectories and count how often a string-replacement old_str or quoted test identifier matches text older than the last $K=3$ observations; if exact quotes from beyond the window are common and the edited-distance fallback does not repair them, the recency premise is wrong. Concretely, run the $K=3$ agent on a task set engineered so the required patch must quote code first viewed more than three tool calls earlier and never revisited; the resolve rate should collapse toward the fully latent $K=0$ baseline (37/499 on Qwen3) if the verbatim window, not the distilled history, is what carries exact access.","supporting_citations":[{"cited_title":"The last three observations remain in text, and older observations are removed","cited_arxiv_id":null,"evidence_quote":"Observation masking, the direct deletion baseline that shares the same recency window while removing older content."}],"lane_accuracy":{"status":"not yet measured","lane":{"model":"deepseek/deepseek-v4-flash","input_kind":null},"url":"https://pith.science/accuracy"},"review_version":1}