Parsing the Stream: A Live Trace Model for Long-Horizon Agents and Their Observers

Egor Pakhomov and Erik Nijkamp treat a long-horizon agent's trace as a shared resource with two consumers, the human watching the run and the agent whose bounded context the trace must fold back into, and build an append-only event ledger compiled into per-consumer views.
Ask this paper
One ledger, two compiled views. Events are appended, folded incrementally into typed run state, and compiled separately for the observer and for the agent. The state, not the raw trace, is what either consumer reads.
Large observer-side savings. With an LLM reader as proxy, the compiled view answers monitoring questions with roughly 14x to 15x fewer input tokens and 5-7x lower cost than a budget-capped single-call read of the raw trace, at 0.85-0.87 accuracy against 0.48.
Agent-side result is starker. On 120-link sequential-dependency tasks, maintaining the running statistic in per-step state succeeds 30/30 where full-context prompting manages 8/30.
The authors are careful about their own claims. Questions were co-designed with the schema, so the token and cost reduction is offered as the transferable result; the 30/30 comparison is labeled descriptive given benchmark-system co-development. A prompt scratchpad matches the fold's accuracy more cheaply, leaving deterministic auditability as the fold's residual value.
Deliverables. Eleven candidate requirements for trace folding derived from observed failures, plus code, benchmarks, a regenerable synthetic corpus, and all workbench traces.
Abstract
A long-horizon agent's trace outgrows both of its consumers: the human observer monitoring the run, and the agent itself, whose bounded context the trace must be folded back into. We present a live trace model, an append-only event ledger folded incrementally into typed run state and compiled into per-consumer views, and evaluate it for both consumers against deterministic ground truth. For the observer side, evaluated with an LLM reader as proxy, the compiled view answers monitoring questions using approximately 14x and 15x fewer input tokens (by reader) and at 5-7x lower cost than a budget-capped single-call reading of the raw trace, with higher accuracy (0.85-0.87 versus 0.48). Because the questions were co-designed with the view schema, we treat the token and cost reduction, conditional on schema coverage, as the transferable result. For the agent, on 120-link sequential-dependency tasks, mechanisms that maintain the task's running statistic in per-step state succeed where full-context prompting fails (30/30 versus 8/30 under a clean protocol, n=30, labeled descriptive owing to benchmark-system co-development); a prompt-level scratchpad matches the fold's accuracy at lower cost, and a two-arm decomposition attributes the fold's accuracy to its deterministic aggregate and its cost advantage to its compactness. The fold's remaining value over cheaper alternatives is deterministic auditability and serving the observer from the same state. We derive eleven candidate requirements for trace folding from observed failures and delimit them with an order-sensitive task family on which the fold ceases to help. Code, benchmarks, a regenerable synthetic corpus, and all workbench traces are released.