SKILL.state holds 0.94 accuracy at 200 steps on 122k tokens by dropping the transcript

SKILL.state: Scalable Long-Horizon Agent Skills

Sanket Badhe, Priyanka Tiwari, Jonghyun Chung

EMNLP

cs.AI, cs.MA

2026-08-27

SKILL.state keeps skill spec, structured state, and latest observation, dropping reasoning after each patch. Warehouse T=200: 0.94 accuracy, 122k tokens vs 6.2M for Memory.

What problem this solves

Most agent runtimes treat skill execution as a growing conversation. Each step appends reasoning, actions, observations, and tool outputs to the transcript. Prompt length then grows with the horizon, and cumulative tokens grow with its square. Stale thoughts and dead observations stay in context, so the model has to rebuild the current world from text that mattered many turns ago.

Memory systems such as MemGPT shrink that history with summaries or retrieval. LangGraph-style runtimes inject a structured state block, but still reason over the full transcript. The execution semantics do not change. Long-horizon procedural skills need a sufficient statistic, a representation that makes discarding history lossless. Compressing a transcript is the wrong fix if the transcript should not carry execution.

Method

SKILL.state recasts each step as a state transition. The model sees three inputs only: an immutable skill spec P, the current structured execution state Σt, and the latest observation Ot. It produces a within-step chain of thought, a JSON state patch, and an action. The runtime validates the patch, merges it with null-deletion semantics, then drops the reasoning forever. Later prompts never see prior observations, actions, or thoughts.

The loop is short:

Schemas are authored once per domain, not per task. All 100 InterCode CTF challenges share five fields: discoveredflags, testedhypotheses, activefiles, workingdir, cmdsummary. Invalid JSON cannot corrupt persistent state; the runtime rolls back and retries.

Within-step reasoning stays intact for multi-step deduction. Across steps, only structured state survives. Cumulative tokens therefore grow linearly with the horizon, and per-step prompt size does not depend on how many turns have already run.

Results

Primary runs use Gemini-3-Flash at temperature 0.0, with five generator seeds on synthetic tasks. Three main baselines: ReAct with a full transcript, Memory with a 3-turn window plus a rolling summary, and a LangGraph-style Stateful runtime that keeps structured state and the full transcript. Differences at T≥50 are significant under a paired t-test (p<0.01).

The warehouse environment tracks 500 independent shelves, scaled to T=200:

RuntimeT=200 accuracyMean promptTotal tokens
ReAct0.7448,0072.61M
Memory0.8484,3646.18M
Stateful0.8872,3055.04M
SKILL.state0.941,811122k

At T=100, SKILL.state uses 65,408 tokens against Stateful's 1,062,387, a 16.2× cut. Under T=50 noise with 50 distractor events per turn, ReAct falls to 0.53 while SKILL.state holds 0.98, because distractors are filtered at patch time and never re-enter the prompt. When the world is silently edited outside the agent loop, history runtimes hallucinate for 5 to 8 turns; SKILL.state recovers in zero steps.

Public benchmarks, still Gemini-3-Flash:

BenchmarkReActMemoryStatefulSKILL.state
InterCode CTF pass@143.2%46.4%41.8%54.2%
τ-Bench Retail48.2%29.9%51.7%58.3%
τ-Bench Airline21.8%23.6%28.1%32.4%

On CTF that is +7.8 points over the strongest baseline and 60.4% fewer tokens than ReAct (387k vs 977k). On Airline, baseline prompts peak above 11,000 tokens per step; SKILL.state stays near 2,800 and spends 2.88M tokens versus Stateful's 5.28M.

Budget-matched compression at about 1,800 tokens on warehouse T=100: sliding-window truncation scores 0.18, capped summaries 0.52, LLMLingua 0.22, SKILL.state 0.94. Shorter prompts are not enough. Structured state keeps slot identifiers that entropy pruning throws away.

Open-weight models shrink the accuracy gap. On Gemma-4-31B warehouse T=100, SKILL.state and Stateful both score 0.42; ReAct is at 0.21. Failure logs attribute 68% of errors to dropping existing keys during merge, 20% to nested type mistakes, 12% to JSON syntax. On the software-repo environment at T=25, SKILL.state scores 0.88 against Stateful's 0.94, then overtakes at T=50 and T=100 (0.86 vs 0.74, 0.78 vs 0.63). Dropping the transcript costs a bit when the horizon is short and the state graph is tangled.

Why it matters

This is a runtime swap, not a new model. Any ReAct loop can adopt it. Skill frameworks have spent a year packaging procedures as reusable skills, then still executing them as chats. If a domain can declare a schema up front, explicit state is a better execution semantics than summaries, sliding windows, or perplexity compression.

The practical fit is long tickets, slot-like inventories, terminal loops, and tool-using customer workflows, anywhere the current world is JSON-shaped. The savings are quadratic in tokens, and stale reasoning has fewer chances to steer the next action. The idea is old in dialogue state tracking: treat state as a sufficient statistic, then actually throw the history away.

Limitations

The paper lists three breaks. No schema is known in advance. An observation's later use is not recognized when it first arrives, so it is never committed. The task is the trajectory itself: audit, provenance, explaining past actions. The implementation is single-agent. Concurrent writes in a multi-agent setting would need conflict rules on the merge operator, which are not tested.

The synthetic warehouse is almost a memory exam over 500 shelves, which favors explicit state. Gains on public benchmarks are more convincing, but the five-field CTF schema is hand-written; a new domain needs a new schema. Small open-weight models fail at structured output, not at reasoning, and the authors point to grammar-constrained decoding. The Stateful baseline still carries a full transcript, so the "state plus history" control is fair. What is missing is whether schemas can be discovered rather than authored.

Terms

Source

What people are saying

Related papers

All paper explainers