Typed trace folding helps agents and observers manage long runs

An append-only event ledger compiled into consumer-specific views reduced monitoring costs and preserved key state across 120-step agent tasks.

PaperIndustrycs.AIarXiv:2609.01466v1
Egor Pakhomov · Erik Nijkamp

Salesforce AI Research

Research Digest··2 min read
Pakhomov and Nijkamp built a live trace system that incrementally converts an agent’s event history into typed state and separate views for agents and human observers. In synthetic evaluations, these views made monitoring more accurate and economical, while deterministic state aggregation prevented failures on long sequential-dependency tasks.

What they did

The authors implemented an append-only event ledger that is incrementally folded into structured run state, then compiled into views tailored to different consumers. They evaluated an LLM reader as a proxy for a human observer, comparing its answers from compiled views with answers from a budget-capped reading of the raw trace.

For the agent evaluation, they constructed 120-link sequential-dependency tasks and compared full-context prompting with mechanisms that preserve a running statistic in per-step state. They also tested a prompt-level scratchpad and separated the effects of deterministic aggregation from those of compact representation.

Key findings

  • Observer views achieved 0.85–0.87 accuracy on monitoring questions, compared with 0.48 for a budget-capped single-call reading of the raw trace.
  • Depending on the reader, compiled views used roughly 14–15 times fewer input tokens and cost 5–7 times less.
  • On the 120-link tasks, deterministic state maintenance completed 30 of 30 runs under the clean protocol, versus 8 of 30 for full-context prompting.
  • A prompt-level scratchpad matched the fold’s task accuracy at lower cost; the authors attribute the fold’s accuracy to deterministic aggregation and its cost advantage over full context to compactness.

Why it matters

The work treats an agent trace as structured operational state rather than an ever-growing transcript. A shared, auditable state layer could help long-running systems retain task-relevant information while giving observers compact monitoring views, without requiring both consumers to repeatedly process the full history.

Caveats

The monitoring questions were co-designed with the view schema, so the reported accuracy may not extend to questions the schema does not cover; the authors identify token and cost reductions conditional on schema coverage as the more transferable result. The observer was an LLM proxy rather than a human, the agent benchmark was co-developed with the system and is labeled descriptive, and an order-sensitive task family showed that folding does not help universally. A cheaper scratchpad also matched the fold’s accuracy, leaving auditability and shared observer support as its main demonstrated advantages.

§

Analysis

The paper’s contribution is primarily architectural: it formalizes trace handling as incremental state maintenance plus view compilation. Its results support deterministic aggregation when a task has a compact sufficient statistic, but do not establish that typed folding is superior to simpler memory mechanisms across general long-horizon agent workloads.

A central open question is how these schemas are created and maintained for less predictable environments. Future evaluations would need independently designed tasks, human monitoring studies, and tests of whether important but unforeseen events survive the folding process.

newspaper

Research Digest

Articles published under the Zotpaper byline are synthesized from multiple source publications by our AI editor and reviewed by our editorial process. Each story combines reporting from credible outlets to give readers a balanced, comprehensive view.