acceptodds
Under review as a conference paper at ICLR 2027

Structured Turn Memory: Slot-Aware Storage, Compression, and Retrieval for Long-Horizon Language Agents

Abstract

Large Language Model (LLM)-based agents that operate over extended horizons must store, compress, and retrieve interaction histories to sustain coherent planning across sessions and long reasoning chains. Existing memory systems treat each turn as a monolithic text block, so compression loses critical information, particularly the tool-call outputs, action decisions, and reasoning traces that constitute the structural spine of agent workflows. We propose **Structured Turn Memory (STM)**, a framework that decomposes each agent turn into four semantically typed slots: *Observation*, *Reasoning*, *Action*, and *Outcome*, and uses these slots as the unit of storage, compression, and retrieval. A rate-distortion analysis shows that slot-aware compression needs a lower rate than task-agnostic monolithic summarization whenever the gain from task-weighted allocation exceeds the redundancy among slots, a condition that holds with a wide margin on real agent traces. On four benchmarks spanning inter-session memory (LoCoMo, multi-session WebArena) and intra-session long-horizon memory (SWE-Bench Pro, Terminal-Bench 2.0), STM yields consistent improvements over strong baselines including Mem0, A-Mem, REMem, and Agent Workflow Memory: memory recall F1 on LoCoMo, task success rate on WebArena, on SWE-Bench Pro, and on Terminal-Bench 2.0. STM also outperforms the recent context managers MEM1, AgentFold, and GAM, and compared with keeping the full context, it offers a better cost-quality trade-off when histories fit in the window and larger gains when they do not. Ablations show that every slot contributes, with the action slot most critical for agentic tasks, and slot typing also improves existing memory systems.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Long-Horizon Agent, Structured Turn Memroy, Slot-Specific Strategy

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_W1fVOpenReview ↗
Rating
1
Confidence
3
Informativeness
1
Presentation
2
Soundness
1
Read review
Paper summary

The authors propose a new context management strategy (STM) that incorporates 4 structured modules, observation, reasoning, action, and outcome, together with pre-defined multi-level rules to further abstract and compress each module's information density. Experiments across inter-session and intra-session agentic benchmarks show improvements compared with other context management baselines.

Critical strengths
  • The compared baselines and ablation studies are extensive.
  • The considered agentic scenarios incorporate both inter-session and intra-session settings, and for the intra-session ones, incorporating difficult SWE and CLI benchmarks (SWE-Bench Pro, Terminal-Bench 2.0) is meaningful and timely.
Critical weaknesses

W1 The main weakness is the actual contribution of this paper. To me, it feels more like an incremental engineering improvement than a principled solution to a core research problem:

  • The four slots directly mirror the standard ReAct workflow, which already separates observations, reasoning, and actions. As the authors also note, these slots and work-item updates are mainly parsed from raw execution logs using hand-crafted prompts.
  • The rate-distortion analysis in Section 3.3 (Proposition 1) does not really support the design: once the definition of Galloc(w)G_{\text{alloc}}(w) is plugged into Eq. (4), the Rslot(D)R_{\text{slot}}(D) terms simply cancel out, leaving a general mutual-information inequality that holds for any arbitrary partition of a turn rather than justifying this specific four-slot structure.

W2 The experimental comparisons could be organized more clearly, and it is hard to tell where the gains actually come from:

  • In Table 1, direct inference without external memory compression (i.e., standard ReAct with full context) is missing. Only when looking at Table 2 (Full context) do we see that all six memory baselines in Table 1 actually perform worse than direct Full context inference across all benchmarks.
  • Given the heavy engineering pipeline, the actual improvement of STM over strong references is relatively marginal (especially when trajectories fit within the context window, where STM is only slightly better than Full context), and it remains unclear what truly drives the gain.
Questions for authors

N/A

3 comments
AuthorsOpenReview ↗

Response to Reviewer W1fV (Part 1)

W1: The main weakness is the actual contribution of this paper. To me, it feels more like an incremental engineering improvement than a principled solution to a core research problem:

  • The four slots directly mirror the standard ReAct workflow, ...
  • The rate-distortion analysis in Section 3.3 (Proposition 1) ...

A1: The second bullet is a correct derivation and we accept it without reservation. Substituting the definition of G_alloc(w) into Eq. (4) does cancel R_slot(D) and leaves R_mono(D) >= sum_s R_s(D_s^mono) - TC(X), which holds for any partition of a turn. Proposition 1 therefore does not derive the four-slot schema, and the submission was wrong to present it as though it did. We have changed what we claim and added the piece that was actually missing.

What the proposition is now said to do. Appendix A states the general version explicitly, with blocks B in place of slots, and notes that substituting the definition makes the cancellation visible. Section 3.3 says in the main text that neither the statement nor the proof uses the four-way split and that the proposition identifies a trade-off a schema faces rather than deriving one.

What we added instead. The missing content is that the two right-hand terms are partition-dependent and move together. Appendix A adds Proposition 2, a refinement identity: for P' refining P, TC^{P'}(X) = TC^{P}(X) + sum_{B in P} TC(X_B) >= TC^{P}(X). The proof is two lines of entropy bookkeeping. Refining a partition can therefore only raise the redundancy it pays, while the allocation gain is bounded by the spread of task weights and rate-distortion slopes across blocks and stops growing once blocks are homogeneous in those respects. The margin G_alloc^P - TC^P consequently has an interior optimum rather than favoring ever finer schemas, and a partition is useful to the extent that it separates content differing in task weight or compressibility without separating content that shares information.

And we made the criterion empirical. Appendix D.5 and Table 24 estimate both terms for seven candidate partitions using the protocol of A1 to Reviewer ZaK7: no decomposition, a random four-way token split, action versus rest, {O, R+A, U}, {O+U, R, A}, our four slots, and an eight-way sub-slot refinement. The random split is the informative control, since it separates content without separating roles: its allocation gain is 0.19, its redundancy upper bound 1.92, its margin -1.73, and it buys 1.6 points over monolithic storage. The eight-way refinement has the largest allocation gain of all, 1.84, but pays 1.21 in redundancy exactly as Proposition 2 requires, and does not improve success rate. Our four slots have the largest margin, 0.85. Across the seven settings the estimated margin and the success rate are rank-correlated at Spearman rho = 0.85 (p = 0.016). This is the sense in which the analysis now bears on the design: it does not derive the four slots, but it supplies a quantity that distinguishes a useful partition from an arbitrary one and that can be computed for a candidate schema before running the pipeline. We also carry this into Appendix E as a limitation, since it is a selection criterion evaluated over a handful of hand-written candidates and not a search over schemas.

On the slots mirroring ReAct. We take the point and have sharpened the claim rather than disputing the resemblance. The decomposition is indeed the standard agent step, and we now say so directly in Section 3.1. The relevant fact is that every method we compare runs on the same ReAct backbone, so the decomposition is available to all of them at generation time; what differs is whether it survives into storage, where a slot becomes the unit that receives its own budget and that retrieval can address. The contribution we claim is the storage-side consequence, and it is the part the experiments isolate: per-slot rate allocation with a fidelity floor, invariants that are verified rather than instructed, addressability by slot by level by work item, and a reconstructable action chain. Three results speak to whether that is more than relabelling. Transplanting slot typing into Mem0, A-Mem, and AWM without touching their consolidation or retrieval gains 3.5 to 5.5 points (Table 6), which would not follow if the backbone already supplied the benefit. The new Table 7 shows that the mechanisms that depend on storage structure, slot-scoped retrieval and action-chain reconstruction, account for 3.3 of the 5.6 points over full context, while reading the prompt in slot order accounts for 0.7. And Table 24 shows that an arbitrary partition of the same turn buys almost nothing, so it is the typing and not the splitting that matters.

AuthorsOpenReview ↗

Response to Reviewer W1fV (Part 2)

(Following above Part 1)

On hand-crafted prompts. Fair, and we have tried to bound how much rests on them. Appendix B.7 inventories every hand-set quantity with its sensitivity; the retrieval weights can be learned, with learned weights at 44.6% against 44.2% hand-set; a single configuration transfers across benchmarks at a cost of at most 0.9 points (Table 34); the same configuration transfers across four backbones and to an unseen benchmark (Table 35). On extraction specifically, Appendix D.15 reports that constraining the extractor's decoding to the output schema and validating the parsed record against the harness log reduces its error rate on unusual turns from roughly 15% to 6% and raises success rate to 45.1%, which is the cheaper half of the fine-tuned-extractor direction we had only speculated about. We report the unconstrained setting in the main results so that all numbers come from one configuration.

W2 The experimental comparisons could be organized more clearly, and it is hard to tell where the gains actually come from:

  • In Table 1, direct inference without external memory compression ...
  • Given the heavy engineering pipeline, the actual improvement of STM ...

A2: Both criticisms are about presentation hiding a result that should be stated up front, and we have changed the presentation.

The missing reference row. Table 1 now carries a top block with two references that use no memory system: recency truncation at the shared per-step memory budget, and full context at the 400K cap. The accompanying text states the comparison plainly instead of leaving it to be discovered two tables later: every memory baseline trails the full-context reference on every benchmark, compressive memory buys a far smaller prompt and these six baselines pay accuracy for it, and among the memory systems STM alone is both cheaper and more accurate than that reference. We also added a history-tokens-per-step column to Table 2 so the cost side of every row is visible in the same place as its accuracy, which makes the trade the reader is being asked to evaluate explicit: 8.2K for recency truncation, 3.4K for retrieval over raw turns, 9.8K for the task-aware summary, 38K for the playbook, 31K to 400K for full context, 12.7K for STM.

Where the gain comes from. This was the most useful part of the review for us, and we have added the analysis rather than restating the aggregate. The new Table 7 decomposes the 5.6-point difference to full context on SWE-Bench Pro along two axes at once. The nested path from the reference to STM is: full context 38.6; plus slot-ordered prompt assembly with no change to what is stored, 39.3 (+0.7); plus slot-scoped retrieval over uncompressed slots in place of the full trace, 41.5 (+2.2); plus slot-aware compression with the action floor and the verifier, 43.1 (+1.6); plus action-chain reconstruction, 44.2 (+1.1). Reading the prompt in slot order accounts for little; retrieval over typed units is the largest single step; compression keeps the surviving records usable once the trace overflows; action-chain reconstruction supplies the rest. The same table splits every step by whether the trajectory fits in the window, which answers the second half of the criticism directly: 4.9 of the 5.6 points come from the 61% of episodes that exceed the window, and only 0.7 from the 39% that fit.

On the gain being marginal where trajectories fit. We agree, and we now say so as a claim rather than treating it as a caveat. Inside the window STM is a cost-quality improvement, roughly +1.8 points at 8% to 30% of the prompt tokens, and we no longer describe it as an accuracy gain there. Outside the window it is an accuracy improvement, +8.0 points, because the reference degrades to recency truncation. The conclusion and Appendix E both state the result as two claims rather than one average, and Appendix E's "histories that fit in context" limitation now carries the decomposition explicitly. We think this is the honest reading of our own numbers and it is also the reading that makes the scope of the contribution clear: the pipeline earns its complexity on long-horizon episodes, which is where we claim it applies.

AuthorsOpenReview ↗

Follow-Up on Response and Revision

Dear Reviewer W1fV,

Thank you again for pushing us to clarify STM’s contribution and the sources of its gains. We wanted to follow up on whether our revised theoretical claims, comparison across alternative partitions, and new breakdown of gains by component and episode length have addressed your concerns about the design justification and empirical contribution. We would welcome any remaining questions or concerns. If the revisions and additional evidence have improved your assessment of the paper, we would be grateful if you would consider raising your rating.

Best regards,

The Authors

Reviewer_ZaK7OpenReview ↗
Rating
2
Confidence
3(+1)
Informativeness
2
Presentation
2
Soundness
2(+1)
Read review
Paper summary

STM stores each agent turn as four slots: Observation, Reasoning, Action, and Outcome. It compresses and retrieves them separately to preserve action histories. The paper offers a rate-distortion analysis and evaluates STM on conversational memory, web, coding, and terminal tasks.

Critical strengths

The slot design makes sense for agent tasks: an action is more useful to recall when its reason and outcome are available too. I also find the experiments adding slots to existing memory methods more informative than the full-system comparisons, since they help isolate what the representation adds.

Critical weaknesses
  1. I cannot reconcile Table 20 with the definition in Appendix D.6. If G_state is binary patch correctness, then I(A^g; G_state) <= ln(2), or 0.693 nats. The reported value is 1.82 nats. Using InfoNCE does not remove this bound. The authors need to clarify what was measured before drawing conclusions about reduced information loss.

The guarantee in Table 19 is also unsupported: a lower bound on TC cannot establish that G_alloc - TC is at least 1.21 nats. It is unclear how the rate-distortion quantities were estimated from 500 samples. And Proposition 1 only compares with task-agnostic monolithic coding; it leaves open the comparison with a task-aware joint summary.

  1. The baseline definitions leave a major result unexplained. Appendix D.3 appears to give both recency truncation and full context the latest 400K tokens. Why, then, do they score 41.2 and 54.1 on LoCoMo, where the histories reportedly fit in the window? The SWE-Bench Pro gap is similarly large (26.8 vs. 38.6). I need to understand this difference to judge the comparison with STM.

Table 17 reports ROUGE-L >= 0.85 after compressing 412 tokens to 128. If this is F1 against the original text, with lengths measured in the same units, the upper bound for those lengths is about 0.474. The scoring definition and aggregation may explain the discrepancy, but they are missing.

These are my main reasons for weak rejection. I would reconsider if the authors resolve them with corrected definitions and results. I have not reproduced the experiments.

Questions for authors
  1. What is G_state in Table 20, and what estimator produces 1.82 nats? What supports the TC bound used in Table 19?

  2. What inputs or settings differ between the two 400K-context baselines?

  3. How exactly is ROUGE-L computed in Table 17?

  4. Three smaller points: can deleted action text still be reconstructed, does the 142 ms overhead include generation and asynchronous work, and does the bootstrap account for shared conversations and repeated task runs?

For an additional comparison, I would like to see a monolithic summary given the same budget and explicit instructions to preserve actions, reasons, outcomes, and corrections.

6 comments
AuthorsOpenReview ↗

Response to Reviewer ZaK7 (Part 1)

W1: I cannot reconcile Table 20 ....

A1: Thanks for pointing out such arithmetic objections. We address the four parts in turn.

(i) The mutual-information target. The reviewer's bound holds and our description of the target was wrong for the numbers we reported: with a binary target no estimator, InfoNCE included, can exceed ln 2. The quantity we measured was not binary. Appendix D.6 now defines two targets explicitly and reports both.

The primary target is the task resolution signature: the set of source files the gold patch modifies, bucketed by path and quantized to the same 64-codeword alphabet as the slot representations, together with the test outcome. This is also the quantity an agent actually needs for mid-trajectory plan assessment, since knowing only whether a patch eventually passed is not actionable at step 31 of 47. Its bias-corrected entropy on this sample is 3.92 +/- 0.18 nats, which is what makes an estimate of 1.82 nats admissible, and the InfoNCE ceiling of ln 1000 = 6.91 nats with 1000 negatives is not binding.

The secondary target is binary patch correctness, which we now report precisely because the reviewer is right that it is the natural reading of our old text. We also note why it is a poor instrument: its entropy at the observed success rate is 0.686 nats, so the whole dynamic range is under 0.7, and a contrastive bound has variance comparable to the quantity itself at that scale. We therefore estimate it differently, as H(Y) - H(Y | A^g) with the conditional entropy taken from the held-out cross-entropy of a calibrated classifier trained on a disjoint split, bias-corrected and clipped to [0, ln 2]. The resulting values are 0.41 at Level 0 falling to 0.14 (monolithic) and 0.28 (slot-aware) at Level 3, all within the bound. The relative decay pattern, which is the only thing our conclusion rests on, is the same under both targets: -39.0% versus -12.2% at Level 2 for the binary target against -41.3% versus -12.7% for the signature. We have rewritten the surrounding text so the claim is explicitly about relative decay under a shared estimator rather than about an absolute information content.

(ii) The guarantee in Table 19 of the submission, now Table 23. The reviewer is right and the fault is ours: InfoNCE lower-bounds the total correlation, and a lower bound on a term that is subtracted cannot support a lower bound on the difference. We have changed the estimator rather than the wording alone. The redundancy is now estimated with a contrastive log-ratio upper bound (CLUB) applied to the chain-rule decomposition TC(X) = I(X_o; X_r) + I(X_{o,r}; X_a) + I(X_{o,r,a}; X_u), which gives 0.78 +/- 0.09 nats; we report the InfoNCE lower bound of 0.42 +/- 0.06 alongside it, so the quantity is bracketed rather than bounded from one side only. The allocation gain is a difference of two upper estimates of rate-distortion values and is therefore a plug-in estimate, which Table 23 now labels as such in a dedicated direction column. Consequently we no longer claim a guaranteed advantage. We report an estimated margin of 0.85 nats per turn with a clustered bootstrap interval of [0.58, 1.12], we say in both the main text and the appendix that only the redundancy side is bounded in the direction the inequality requires, and we state the sensitivity: the condition would fail only if the allocation gain were overstated by more than a factor of two, or equivalently if the true redundancy exceeded roughly 1.6 nats per turn, about twice our upper bound. The claim is now that the condition of Proposition 1 holds on these traces by our estimates, not that it is certified.

AuthorsOpenReview ↗

Response to Reviewer ZaK7 (Part 2)

(Following Part 1)

(iii) How the quantities were estimated from 500 samples. This was missing and we have added it as a dedicated part of Appendix D.5. The protocol is: representation, all entropies and informations are computed on a fixed vector quantization of the slot representations, each slot embedded with the retrieval embedding model and quantized to one of 64 codewords by k-means fit on a disjoint split of turns, so a turn is a four-symbol word over an alphabet of 64 and every marginal entropy is bounded by ln 64; this also makes the estimates comparable across compressors, since all are mapped through the same quantizer, and by the data processing inequality each reported information is a lower bound on its unquantized counterpart. Rate, measured as code length in nats under a fixed reference language model, which is achievable by arithmetic coding and therefore an upper bound on the minimal rate for that reconstruction. Frontier, obtained by sweeping the token budget to produce (distortion, code length) operating points per slot and taking their lower convex envelope; R_slot(D) solves Eq. (3) over these frontiers and G_alloc is evaluated at the distortion profile the task-agnostic summarizer actually induces. Estimators and their directions, as in (ii). Uncertainty, bootstrap intervals from 10,000 resamples drawing repositories, then tasks, then turns, since the 500 turns come from 112 tasks in 23 repositories and turns within a task share a codebase, a tool surface, and a trajectory; entropies are bias-corrected for finite samples. We also note that the quantization is what makes a turn entropy of 3.81 nats a coherent number rather than an implausible one.

(iv) Comparison with a task-aware joint summary. The reviewer is right that Proposition 1 as used in the submission only speaks to task-agnostic coding. We have made the stronger comparison explicit on both the theoretical and the empirical side. Theoretically, corollary (iii) in Appendix A is exactly this comparison: for the best joint code including task-aware ones, R*_joint(D) >= R_slot(D) - TC(X), so the entire disadvantage of separate coding is bounded by the redundancy term, which with our upper bound is a few tenths of a nat per turn. We have promoted this from a corollary mentioned in passing to a discussed consequence in Appendix A. Empirically, we have added the baseline the reviewer asks for in Q5; see A7.

W2: The baseline definitions leave a major result unexplained. Appendix D.3 appears to give both recency truncation and full context the latest 400K tokens. Why, then, do they score 41.2 and 54.1 on LoCoMo, where the histories reportedly fit in the window? The SWE-Bench Pro gap is similarly large (26.8 vs. 38.6). I need to understand this difference to judge the comparison with STM. Table 17 reports ROUGE-L >= 0.85 after compressing 412 tokens to 128. If this is F1 against the original text, with lengths measured in the same units, the upper bound for those lengths is about 0.474. The scoring definition and aggregation may explain the discrepancy, but they are missing.

These are my main reasons for weak rejection. I would reconsider if the authors resolve them with corrected definitions and results. I have not reproduced the experiments.

A2: Both points are well taken, and in both cases the underlying numbers were produced under a definition that the text failed to state.

The two 400K references. The appendix sentence was wrong and created exactly the contradiction the reviewer identifies. The two references differ only in the budget they are given. Recency truncation is reported at the per-step memory budget of 8,192 tokens that every memory system in Table 1 shares, which is what makes it a reference for "what does a memory system add at a fixed prompt size" rather than "what does a larger prompt add". Full context bypasses that budget and fills the context window. At the 400K cap the two coincide by construction, since keeping the most recent tokens up to the cap is precisely what full context does when a trace overflows, and there is in fact no third configuration hiding between them. The gaps then follow arithmetically: on LoCoMo an 8.2K window is about a quarter of a dialogue whose mean length is 31K, and on SWE-Bench Pro it is a small tail of a trace whose mean length is 486K. Appendix D.3 now states this, the row label in Table 2 says which budget it is, and the per-step history figure for that row is corrected from "up to 400K" to 8.2K. We have also added Table 15, which sweeps the budget at 8.2K, 32K, 128K, and 400K and shows the curve closing smoothly onto full context on all four benchmarks (LoCoMo 41.2, 53.6, 54.0, 54.1; SWE-Bench Pro 26.8, 31.4, 35.2, 38.6). This also answers the reviewer's implicit question of whether something other than budget differs: the two share prompt template, step caps, and backbone, and neither applies compression or retrieval. See A4.

AuthorsOpenReview ↗

Response to Reviewer ZaK7 (Part 3)

(Following above Part 2)

The ROUGE-L arithmetic. We confirm the reviewer's calculation exactly. With a 128-token output and a 412-token reference, the best case is L = 128, giving P = 1, R = 0.3107, and F1 = 0.474. The number we reported is not attainable under F1 against the raw slot, and the same objection applies to Table 3, which the reviewer did not flag: an action representation of 108 tokens against a 224-token raw slot is capped at 0.651, below the 0.79 we reported. The problem is that an F1 against the text a summary replaces is dominated by the length ratio and therefore measures how much was compressed rather than what was kept.

We have fixed the definition rather than the numbers. Fidelity is now coverage, the ROUGE-L recall of a compressed representation against a programmatically extracted critical-content reference for that slot, built by the same extractor that produces the protected-item rows used by the verifier and containing exactly the content the invariants protect. Reference lengths average 132, 54, 96, and 26 tokens for the four slots against raw lengths of 412, 186, 224, and 38, so the reference is of the same order as a compressed representation and the length ceiling no longer binds. Recall is the right direction because the question is what fraction of the protected content survived, and because it does not penalize a representation for being longer than its reference. Appendix D.5 gives the construction per slot, the implementation (LCS-based rouge_score, same tokenizer as the token counts, stemming disabled so identifiers are not altered), and the aggregation (per record, macro-averaged within a task and then across the 112 tasks, with intervals resampling repositories then tasks), and it states that merged Level-2 and Level-3 records are scored against the net reference of the span they replace, consistent with how the merge prompt is specified. Table 20 is new and reports, for the action slot, coverage next to the F1 against raw text and next to the ceiling the length ratio imposes on that F1, so both conventions can be read side by side; the orderings agree, but the F1 column compresses every method into a narrow band near its own ceiling, which is why coverage is the number we report. The slot-profile table the reviewer cites, Table 17 in the submission and Table 21 here, has been relabelled accordingly, as have Table 22 and the main-text column header, and the task-weighted distortion in Appendix D.5 is restated in terms of coverage (Eq. (15), shifted by one because Proposition 2 adds a numbered equation in Appendix A). See A5.

Q1: What is G_state in Table 20, and what estimator produces 1.82 nats? What supports the TC bound used in Table 19?

A3: G_state. The task resolution signature: the set of source files modified by the gold patch, bucketed by path and quantized to 64 codewords, together with the test outcome. Bias-corrected entropy 3.92 +/- 0.18 nats on this sample, so 1.82 nats is admissible. The 1.82 figure is an InfoNCE lower bound with 1000 negatives, whose own ceiling (ln 1000 = 6.91 nats) is not binding. We also now report the binary patch-correctness target separately, estimated as H(Y) - H(Y | A^g) from a calibrated held-out classifier, bias-corrected and clipped to [0, ln 2]; its values run 0.41 to 0.28 and respect the bound. Both appear in Table 25 with the target entropy stated for each block.

The TC term. Nothing in the submission supported it in the needed direction, and we have replaced the estimator rather than defend the claim. Appendix D.5 now bounds the total correlation from above with a contrastive log-ratio upper bound applied to the chain-rule decomposition into three conditional mutual informations, whose conditional models are trained on a disjoint split and evaluated on the held-out 500 turns, giving 0.78 +/- 0.09 nats; the InfoNCE lower bound of 0.42 +/- 0.06 is reported alongside. The allocation gain remains a plug-in estimate and Table 23 says so in a direction column. The reported quantity is therefore an estimated margin of 0.85 nats, interval [0.58, 1.12], described in both the main text and the appendix as evidence that the condition holds on these traces rather than as a certificate, together with the sensitivity statement above. The corresponding table, Table 19 in the submission and Table 23 here, no longer claims a guarantee.

Reviewer_475LOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper introduces Structured Turn Memory (STM), a framework for managing the interaction histories of long-horizon language agents. STM decomposes each interaction turn into four semantic slots—Observation, Reasoning, Action, and Outcome—and uses them as the basic units of storage, compression, and retrieval. It applies slot-specific compression strategies across four levels: raw records, slot summaries, episode-level merged records, and archived memories. The framework also incorporates slot-scoped retrieval and action-chain reconstruction to preserve task-relevant decisions and execution history. A rate-distortion analysis characterizes conditions under which slot-aware compression can outperform task-agnostic monolithic compression. Experiments on LoCoMo, multi-session WebArena, SWE-Bench Pro, and Terminal-Bench 2.0 report improvements over memory and context-management baselines. Ablation studies examine the contribution of each component and highlight the importance of preserving action information for agentic tasks.

Critical strengths

STM uses four semantic slots—Observation, Reasoning, Action, and Outcome—as the basic units of storage, compression, and retrieval. Its slot-aware compression applies tailored strategies based on the characteristics and task importance of different types of information. Combined with hierarchical compression and action-chain reconstruction, this design selectively preserves key execution information for long-horizon tasks. The paper also characterizes the conditions under which slot-aware compression can outperform task-agnostic monolithic compression.

Critical weaknesses

Although STM imposes information-preservation constraints, its compression mechanism does not fully ensure that critical information, such as tool-call parameters and execution conditions, remains intact across multiple compression levels. Such information loss may adversely affect downstream task accuracy. Moreover, the hierarchical compression pipeline relies on numerous manually specified rules and thresholds, potentially requiring additional tuning and adaptation across task settings. Its generalization across different scenarios therefore warrants further validation.

Questions for authors

Beyond minimum token-length constraints and structural links, how does STM verify that critical tool-call parameters, outputs, and execution conditions remain intact after compression? Are there mechanisms to detect information loss and recover the necessary details?

4 comments
AuthorsOpenReview ↗

Response to Reviewer 475L (Part 1)

W1: Although STM imposes information-preservation constraints, its compression mechanism does not fully ensure that critical information, such as tool-call parameters and execution conditions, remains intact across multiple compression levels. Such information loss may adversely affect downstream task accuracy. Moreover, the hierarchical compression pipeline relies on numerous manually specified rules and thresholds, potentially requiring additional tuning and adaptation across task settings. Its generalization across different scenarios therefore warrants further validation.

A1: We agree with the premise of both halves of this weakness, and we think the first half identified a genuine gap in the submitted version rather than only a presentational one. The submission stated four invariants but enforced them only through prompt instructions and a token-length floor, and neither of those establishes that a particular tool argument survived a promotion. We have therefore added a mechanism that checks them, and we report what it finds.

Preservation is now verified, not assumed. After every promotion, a verifier extracts the items the invariants protect from both the superseded record and its replacement and compares the two sets. The protected items are tool names and argument keys, every argument value that is a concrete literal (file path, URL, identifier, numeric constant, flag, quoted string), output items such as error strings and exit statuses, every work-mutation triple, and the decision-to-mutation, correction, and replacement links. Matching is normalized string equality after case folding and whitespace stripping, with no model judgment in the loop, so a paraphrase cannot satisfy the check. A missing item triggers one repair pass in which the compressor is re-invoked with the missing items supplied as required content and its budget raised accordingly; if the check still fails, the action slot is pinned at its previous compression level and the record is marked for priority expansion at retrieval time. The mechanism is described in Section 3.2 and in detail in Appendix B.2, and it is backed by a new protected_items table in the storage schema so that a check is a set comparison over rows rather than a re-parse of text.

How much this matters. Appendix D.15 and Table 33 report the measurements. Without repair, at least one protected item is missing in 4.8%, 9.3%, and 13.1% of promotions to Levels 1, 2, and 3; after one repair pass these fall to 1.1%, 2.4%, and 3.6%, with 0.3% to 1.4% of records pinned rather than promoted. Identifier-level recall after promotion is 98.4%, 94.1%, and 86.7% across the three levels, against 61.2% for a monolithic summarizer at a comparable ratio, which has no mechanism that would detect the loss at all. Downstream, keeping the invariants as prompt instructions but removing the verifier costs 2.4 points of success rate on SWE-Bench Pro and raises the share of action records missing at least one protected identifier from 1.6% to 7.9%; this is now a separate row in Table 4, distinct from removing the invariants altogether. The verifier also reduces the compression-over-reduction failure mode of Appendix D.13 from 24% to 16% of inspected failures.

Where it does not reach. We have added this as an explicit limitation. The verifier compares items that can be extracted programmatically. Execution conditions carried in prose without a literal, for example an implicit precondition or an ordering constraint implied by a rationale, are outside its reach, and they are what remains of the over-reduction failures after verification. Recovery is also bounded: superseded text is reachable through replacement links while the storage budget allows, and at the end of a SWE-Bench Pro task 94.3% of superseded action records still expand to their exact original text, but 3.1% have been dropped oldest-first once the budget binds. We state both bounds in Appendix E rather than claiming the invariants are guaranteed.

On hand-set rules and thresholds. This is a fair characterization and we have tried to make it checkable rather than argue with it. Appendix B.7 and Table 9 now inventory every quantity STM sets by hand, with its value, how it was chosen, and its measured sensitivity. Three things follow from that table. First, the five retrieval-scoring weights need not be hand-set: fitting them by logistic regression on retrieval-utility labels gives 44.6% against 44.2% for the hand-set values, so they are a convenience and not a requirement. Second, only one quantity is genuinely load-bearing, the action floor, and its failure mode is one-sided, since no sensitivity curve in Table 31 degrades appreciably above its default, only below it. Third, the remaining thresholds move success rate by at most 0.5 to 0.7 points across the ranges we swept.

AuthorsOpenReview ↗

Response to Reviewer 475L (Part 2)

(Following above Part 1)

On generalization. We have added two direct tests. Appendix D.16 and Table 34 take the configuration selected on one benchmark's tuning split and apply it unchanged to the other three: carrying the SWE-Bench Pro configuration costs at most 0.5 points anywhere, and carrying the LoCoMo configuration, selected on the one benchmark with no tool calls and therefore least informative about the action slot, costs at most 0.9 points. In every transferred setting STM remains above the strongest baseline by far more than the transfer cost. Table 35 adds LongMemEval, a benchmark we did not use at any point during development, evaluated with the default configuration and no tuning; STM leads the strongest memory baseline by 5.4 points and the full-context reference by 3.3. Together with the four backbones of Appendix D.10, now noted as reusing the GPT-5-mini configuration without re-tuning, and the three metadata regimes of Appendix D.9, this is the portability evidence we can offer, and we say in Appendix E what we expect would not transfer without attention, namely the target compression ratios in a setting whose turns are much shorter or much longer than those studied here.

Q1: Beyond minimum token-length constraints and structural links, how does STM verify that critical tool-call parameters, outputs, and execution conditions remain intact after compression? Are there mechanisms to detect information loss and recover the necessary details?

A2: In the submitted version it did not, and the reviewer is right that a length floor plus a structural link is not verification. The revised version adds both detection and recovery, and we describe them concretely here.

Detection. The verifier described in A1 runs after every promotion. Concretely, the extractor that produces a slot also writes a row per protected item into protected_items(item_id, evidence_id, slot, item_kind, normalized_value). A promotion from level l to l+1 re-runs the extractor on the promoted text and compares the resulting value set against the rows of the superseded record, grouped by item kind. Tool-call parameters are checked at the granularity of the argument key and of each literal argument value; outputs are checked on error strings, exit statuses, and numeric results in the output summary; mutations are checked as complete (type, target, new_state) triples; and link integrity is checked on decision-to-mutation, correction, and replacement links. The comparison is exact after normalization, so a summary that paraphrases a file path rather than reproducing it registers as a violation. The check costs no model call in the common case and adds about 9ms of the 142ms blocking latency reported in Table 28.

Recovery. Three mechanisms, in order of preference. (1) Repair. On a violation the slot compressor is re-invoked once with the missing items appended as required content and the budget increased by their length; this resolves most violations, as Table 33 shows. (2) Pinning. If the second attempt still fails, the action slot is not promoted; it is kept at its previous level and marked invariant_pending, which trades storage for fidelity exactly on the records where fidelity is hardest to achieve. Observation, reasoning, and outcome slots are not pinned, because their protected items are links and flags that the repair step recovers in essentially every case. (3) Expansion. Flagged and merged action records remain linked to their constituents through replacement_chain, and the retriever expands them by one hop into the superseded text, prioritizing flagged records within whatever budget remains after top-k selection. Expansion fires on 23% of retrievals.

We would rather be explicit about the residual than overstate the guarantee. Recovery depends on the superseded text still being on disk, which the 1.5x storage budget supports for 94.3% of action records to the end of a SWE-Bench Pro task but cannot support indefinitely, and detection depends on the content having a literal form, which excludes conditions stated only in prose. The qualitative trace in Appendix D.14 now includes a concrete instance of the mechanism working: the first compression of turn 8 dropped the line range from a grep result, the verifier caught the missing literal, and the repaired summary retained compiler.py:420-435, which is the string the turn-31 query later matches on.

Thank you for the detailed and candid response. The added mechanisms for verification, repair, and retaining records at their previous compression level directly address my concerns about the loss of critical execution information. The dedicated ablation study of the validator, the parameter sensitivity analysis, and the clarification of limitations regarding implicit execution conditions and historical record recovery also make the response more convincing.

For the compression and preservation of critical information, I would prefer an approach based on semantic matching or suitable compression algorithms rather than hand-crafted rules. I will take these clarifications and the corresponding evidence in the revised manuscript into account and consider revising my score.

AuthorsOpenReview ↗

Thank You for the Follow-Up Comment

We thank the reviewer for the careful reading and for the follow-up.

On the remaining point we agree with the direction, and it may help to separate the three places where a rule or a learned component could sit, since STM is already semantic or learned in two of them.

The compressors are already semantic; what is hand-set is the budget. The four per-slot compressors are LLM prompts, so what is kept inside a slot is decided semantically rather than by patterns. The hand-set part of compression is the budget, specifically the action-fidelity floor, and we agree this is the piece that should eventually be learned. Appendix D.4 already notes that a learned consolidation policy such as MEM1's could operate over STM slots with per-slot budgets, replacing the hand-set floor, and the conclusion lists adapting budget allocation to downstream performance as a direction. Appendix D.7 offers a small existing data point: the five retrieval-scoring weights, hand-set in the reported configuration, reach 44.6% when fitted by logistic regression against 44.2% hand-set, so those values are a convenience rather than a requirement.

Semantic matching is already used where identity is genuinely fuzzy. Work-item identity is decided by title-embedding cosine similarity gated by a shared artifact path (Section 3.1), which is the hybrid of semantic match and literal evidence the reviewer describes.

For the verifier, exact matching is a soundness requirement rather than an approximation of semantics. The question it answers is narrow: did this file path, error string, or argument value survive this promotion? A paraphrased file path cannot be used by a later tool call, so a matcher that accepts paraphrases would report success in exactly the cases the mechanism exists to catch. Exact matching is also what keeps the check cheap enough to run on every promotion and leaves nothing to tune (Table 9 lists it as having no threshold). We would describe it less as a hand-crafted rule than as the correct predicate for the literal class of content.

Semantic matching is the right instrument for the part the current check cannot reach. The residual we report, conditions carried in prose without a literal, is precisely where exact matching fails, and we have made this explicit in the revision. Appendix E now states that closing the gap calls for a different predicate rather than a looser threshold on the same one: an entailment or embedding check would cover content that survives only in paraphrase, but would forfeit the soundness exact matching provides on literals, so we expect a learned verifier to complement this one rather than replace it. Building that two-stage verifier and measuring what it buys on the 16% of inspected failures that remain after the current check is the clearest next step we see on this axis.

We thank the reviewer again for the constructive engagement.

Comments on the paper

1 comment
AuthorsOpenReview ↗

General Response

We thank all three reviewers for the care they put into these reviews. Two of them identified concrete issues in our reported quantities, and both are correct. We have checked the arithmetic ourselves, corrected the definitions and the estimators, and re-run the affected analyses. We have also added the experiments that were asked for. We have answered every point individually below; the revised paper marks all changes, and we summarize them here first.

Summary of changes

  1. Corrected measurement of the action-chain mutual information (Reviewer ZaK7, W1/Q1). The target variable was misdescribed. Appendix D.6 now defines it precisely, reports its entropy, and additionally reports the binary patch-correctness target with values that respect the ln 2 bound. Table 25 has both.
  2. Corrected direction of the redundancy estimate (ZaK7, W1/Q1). A contrastive lower bound cannot support a lower bound on G_alloc - TC. We now estimate the total correlation with a log-ratio upper bound, report the allocation gain explicitly as a plug-in estimate, and state the margin as an interval rather than a guarantee. Table 23 and the new estimation protocol in Appendix D.5.
  3. Full estimation protocol for the rate-distortion quantities (ZaK7, W1). Appendix D.5 now specifies the representation, the rate measure, the frontier construction, each estimator and its direction, and the clustered resampling behind every interval.
  4. Corrected and fully specified fidelity metric (ZaK7, W2/Q3). We confirm the 0.474 ceiling the reviewer computes. Fidelity is now ROUGE-L recall against a programmatically extracted critical-content reference, with reference lengths, aggregation, and implementation given, plus a table reporting the F1-against-raw numbers next to their length-implied ceilings (Table 20).
  5. Resolved the two 400K baselines (ZaK7, W2/Q2). They differ only in budget. Appendix D.3 states this and Table 15 sweeps the budget, closing smoothly onto full context.
  6. Task-aware monolithic summary added (ZaK7, Q5; W1fV, W1). A new baseline in Tables 2 and 3 and a dedicated analysis in Appendix D.5, tied to the cost-of-separation corollary.
  7. Invariant verification added (Reviewer 475L, W1/Q1). A programmatic verifier with a repair pass and a recovery path, described in Section 3.2 and Appendix B.2, measured in Appendix D.15 (Table 33), and ablated in Table 4.
  8. Hand-set quantities inventoried and transfer tested (475L, W1). Table 9 lists every knob with its sensitivity; Appendix D.16 transfers one configuration across benchmarks without re-tuning and adds an unseen benchmark.
  9. Partition dependence addressed (Reviewer W1fV, W1). We concede the cancellation. Appendix A adds Proposition 2 and states explicitly that Eq. (4) holds for any partition; Appendix D.5 estimates the margin for seven partitions and relates it to downstream success.
  10. Reference rows and gain attribution added to the main text (W1fV, W2). Table 1 now includes the no-memory references, and the new Table 7 decomposes the difference to full context mechanism by mechanism and by episode length.
  11. Corrected significance testing (ZaK7, Q4). A cluster bootstrap replaces the question-level one; Appendix D.2 reports the scheme, wider intervals, and corrected p-values.
  12. Latency accounting separated (ZaK7, Q4). Table 28 now distinguishes blocking latency, off-path model time, and the serialized total.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.