Source-linked AI summary
SKILL.state: Scalable Long-Horizon Agent Skills
Sanket Badhe, Priyanka Tiwari, Jonghyun Chung
TL;DR
Long-horizon agent runtimes accumulate conversational histories, increasing prompt growth and forcing models to reconstruct execution state from obsolete text. SKILL.state replaces that history with explicit structured state and discards intermediate reasoning after validated updates. Across controlled and public benchmarks, it maintains or improves task accuracy while reducing prompt growth and cumulative token consumption.
Problem
Existing runtimes condition future decisions on ever-growing textual histories, making execution increasingly dependent on reconstructing current state from historical observations and reasoning.
Method
SKILL.state supplies the immutable procedural specification, current structured execution state, and latest observation, retaining only validated state updates while discarding intermediate reasoning.
Results
Across controlled diagnostic tasks and public interactive benchmarks, SKILL.state consistently improves task accuracy while substantially reducing prompt growth and token consumption.
Takeaways & Limitations
Explicit execution state maintains a bounded O(1) prompt footprint and scales linearly O(T) in cumulative tokens for long-horizon procedural execution.
Takeaways & Limitations
The approach assumes execution state is a sufficient statistic for future actions and fails when relevant state must be discovered dynamically, missed earlier information becomes retrospectively important, or objectives depend on historical trajectories.
Abstract
from arXiv · showhide
Large Language Models (LLMs) increasingly act as autonomous agents executing complex, long-running procedural skills. Existing agent runtimes maintain execution by continually appending observations, actions, and intermediate reasoning traces to an ever-growing conversation history, causing latency degradation and context-poisoning failures over long horizons. We present SKILL.state, a runtime architecture that replaces append-only conversational history with an explicit, mutable execution state. At each execution step, the model receives only the immutable skill specification, the current structured execution state, and the latest observation. Intermediate reasoning is discarded immediately after producing a validated state update, preventing prompt growth with execution history. Across diverse datasets, models, and execution environments, SKILL.state improves task accuracy while substantially reducing cumulative token consumption. Our results demonstrate that explicit execution state is an effective and architecture-agnostic abstraction for scalable long-horizon agent skills.
1 Introduction
SKILL.state replaces conversational-history execution with explicit structured state, retaining only information needed for future steps. Evaluations across benchmarks and models show competitive or improved performance with reduced prompt growth and token consumption.
- Motivation: Existing runtimes append reasoning, actions, observations, and tool outputs to conversational histories that grow throughout execution.This makes future decisions depend on textual reconstructions of past execution.
- Approach: SKILL.state gives the model the immutable procedural specification, structured execution state, and latest environment observation at each step.After a validated state update, the intermediate reasoning trace is discarded.
- Evaluation: The runtime is evaluated on SkillExecBench, InterCode CTF, and Sierra τ-Bench across synthetic and real-world procedural tasks.These benchmarks cover scaling, noise, state recovery, terminal exploitation, and customer-service workflows.
- Complexity: SKILL.state provides a bounded O(1) prompt footprint and O(T) cumulative token complexity by discarding intermediate reasoning after each step.Only the updated execution state is retained across interactions.
- Results: Explicit execution state maintains competitive task performance while substantially reducing prompt growth and cumulative token consumption across runtime baselines and model families.The reported comparison spans multiple execution horizons, proprietary models, and open-weight models.
2 Related Work
Prior work studies procedural-skill discovery and long-horizon memory largely through conversational histories or auxiliary structured state. SKILL.state instead targets execution mechanics by making explicit structured state canonical and preventing history accumulation.
- Procedural skills: Existing procedural-skill research primarily addresses discovery, representation, composition, and security threat modeling.This paper focuses on execution after a skill has been selected.
- Agent memory: Long-horizon architectures preserve conversational semantics through episodic retrieval or persistent storage, leaving execution state distributed across accumulated logs.SKILL.state isolates execution into an explicit mutable runtime state.
- Dialogue state tracking: Dialogue State Tracking maintains structured slot values alongside full conversational transcripts in quasi-static task-oriented dialogues.SKILL.state differs by treating structured state as the canonical execution representation.
- Long-context reasoning: Long-context methods use streaming attention or prompt compression to process extended histories, whereas SKILL.state prevents history accumulation entirely.The runtime maintains the canonical state required for the next computation.
3 SKILL.state
SKILL.state replaces append-only conversational execution with explicit, validated state transitions. The runtime retains only the procedural specification, structured execution state, and latest observation while discarding intermediate reasoning after each update.
- Motivation: Current LLM runtimes implicitly represent execution state in growing conversational histories that accumulate obsolete information.This makes execution increasingly dependent on reconstructing the current world state from historical text.
- Runtime architecture: SKILL.state defines each execution step using the immutable procedural specification, current structured state, and latest environment observation.Previous observations, actions, and reasoning traces are not provided to the model.
- Runtime architecture: The runtime validates the proposed transition, updates the execution state, executes the selected action, and repeats with the updated state.This establishes an explicit execution cycle rather than append-only conversational accumulation.
- Reasoning and state transitions: Intermediate reasoning supports within-step planning but is discarded permanently after the state transition is validated and applied.Only structured updates required for future execution survive across interactions, using dictionary merge with null-deletion semantics.
- Complexity analysis: O(1) prompt footprint and O(T) cumulative token complexity replace conversational execution's O(T^2) cumulative prompt complexity.SKILL.state keeps the prompt asymptotically bounded and independent of previously executed turns, yielding linear cumulative prompt growth.
4 Evaluation Benchmarks
The evaluation spans controlled procedural tasks and two real-world interactive benchmarks. It measures task success, average prompt size, and total token cost across these settings.
- SkillExecBench: SkillExecBench isolates execution mechanics with sequential procedural tasks and deterministic ground-truth world transitions.Its environments include warehouse inventory management and a relational software repository with dependent branches, pull requests, and CI statuses.
- SkillExecBench: SkillExecBench's warehouse environment tracks 500 independent shelves through Store, Ship, Move, and Wait actions.The setting tests maintenance of independent, nonoverlapping state variables over extended horizons.
- Real-world benchmarks: InterCode CTF provides 100 Linux bash Capture-The-Flag challenges spanning reverse engineering, forensics, cryptography, and binary exploitation.Agents execute commands in Docker containers and iteratively test hypotheses to discover hidden flags.
- Real-world benchmarks: Sierra τ-Bench evaluates tool-agent-user interaction in retail and airline customer-service workflows over relational SQLite databases.Agents perform transactional actions such as flight rebooking and refunds under business policy constraints.
- Evaluation dimensions: The evaluation measures task accuracy or success rate, average prompt size, and total token cost.Success is defined through benchmark-specific evaluators, while prompt size and token cost capture invocation and execution-horizon resource use.
5 Experiments and Results
Experiments across synthetic scaling, noise, state recovery, public interactive benchmarks, and budget-matched controls show that SKILL.state preserves or improves performance while limiting prompt and token growth.
- Long-Horizon Scaling: Across horizons T = 10 to T = 200, SKILL.state matches or exceeds baseline accuracy while maintaining a flat prompt size of ∼1,736–1,905 tokens.At T = 100, it consumes 65,408 tokens versus 1,062,387 for Stateful, a 16.2× reduction.
- Long-Horizon Scaling: At T = 200, SKILL.state maintains 0.94 accuracy while consuming 122k tokens, compared with 6.1M tokens for Memory.
- Noise Robustness: At high noise, SKILL.state maintains task completion of ≥0.97, whereas Prompt declines from 0.68 at low noise to 0.53.Distractors are filtered during state patch generation and excluded from subsequent prompts.
- State Recovery: During silent state drift, SKILL.state requires zero recovery steps, while history-based baselines hallucinate for 5 to 8 consecutive turns.The structured state updates immediately after a corrective alert.
- Public Interactive Benchmarks: On InterCode CTF, SKILL.state reaches 54.2% pass@1, improving 7.8 points over the strongest baseline while reducing total tokens by 60.4% versus ReAct.It also leads τ-Bench Retail at 58.3% and achieves 32.4% on τ-Bench Airline with a ∼2,800-token-per-step footprint.
- Budget-Matched Controls: With a ∼1,800-token budget, SKILL.state scores 0.94, while sliding-window truncation and LLMLingua score 0.18 and 0.22.The results indicate that structured state preserves relational dependencies that statistical compression removes.
- Open-Weight Model Errors: On Gemma-4-31B at T = 100, premature state overwrite or deletion accounts for 68% of errors, followed by schema or type inconsistencies at 20% and JSON slips at 12%.The paper attributes small-model degradation to structured-output adherence and motivates constrained decoding.
6 Conclusion
The conclusion presents SKILL.state as a runtime that replaces conversational history with structured execution state. By discarding validated intermediate reasoning, it maintains bounded prompt size and linear cumulative token growth while improving accuracy across evaluated environments.
- SKILL.state replaces append-only conversational history with explicit, structured execution state.
- Discarding intermediate reasoning after each validated transition yields a bounded O(1) prompt footprint and O(T) cumulative token complexity.
- Across controlled diagnostic tasks and public interactive benchmarks, explicit execution state improves task accuracy while reducing prompt growth and token consumption.
7 Limitations
SKILL.state is limited by its reliance on a sufficient structured state and by assumptions that are not exercised in the single-agent implementation. It also depends on valid model-proposed state patches, though runtime validation prevents malformed outputs from corrupting persistent state.
- SKILL.state is lossless only when all past information relevant to future actions can be projected into structured state as it becomes known.This sufficient-statistic assumption fails when schemas must be discovered dynamically, earlier relevance is missed, or historical trajectories are themselves the task output.
- The approach fails for dynamically discovered schemas, missed earlier observations, and objectives requiring historical trajectories such as auditing or provenance.These settings require information that cannot be reliably recovered from the retained operational state alone.
- The current implementation evaluates only single-agent procedural execution, leaving concurrent multi-agent state writes and deterministic merge semantics untested.The abstraction may extend to shared state, but multi-agent environments require conflict-resolution semantics in the merge operator ⊕.
- The runtime relies on the language model to propose valid structured state patches, while deterministic schema ownership and validation reject malformed patches through rollback and retry.Grammar-constrained decoding can eliminate syntactic formatting errors for smaller open-weight models, but semantic state transitions remain model-generated.
Appendix B. SkillExecBench Implementation Details
SkillExecBench specifies deterministic warehouse and software-engineering environments with explicit state representations, action spaces, observations, transition rules, and task-specific success criteria.
- Warehouse Environment: The warehouse environment represents 500 independent shelves, each holding one item identifier or null.Its actions include Store, Ship, Move, and Wait, while observations report shipments, orders, and maintenance events.
- Warehouse Environment: Warehouse transitions validate shelf occupancy for Store, destroy shipped items, and reject invalid actions with local error observations.Rejected actions do not change the environment state.
- Warehouse Environment: Warehouse success is measured as Successful Actions / Total Actionable Events against the ground-truth deterministic simulation.
- Software Environment: The software environment tracks Git branches, file contents, pull requests, and CI statuses, with actions for committing, creating or merging PRs, fixing CI, and waiting.Observations include CI/CD webhooks, code-review comments, and issue assignments.
- Software Environment: Software success is the percentage of feature requests correctly merged into master without breaking CI checks.Merging a PR updates master and deletes the feature branch.
B.2 Task Generation
Task generation uses deterministic procedural simulation to expose agents to identical event sequences, with horizon length controlling the number of sequential events. A warehouse trajectory illustrates state-guided action selection and update.
- Deterministic random seeds give all evaluated runtimes the same event sequence, enabling fair comparisons across task generations.The horizon length determines how many sequential events the agent must handle.
- The warehouse generator adds Order and Maintenance events when occupied shelves are available, constructs observations, and updates ground truth after each event.
- A customer order for item_12 prompts the runtime to locate the item on shelf_42 and issue Ship item_12 shelf_42.The example shows the agent consulting Skill Execution State before selecting and executing the action.
- After shipping, the environment reports success and the state removes item_12 from shelf_42.
Appendix C. Noise Construction (Experiment 2)
Experiment 2 constructs irrelevant-context noise to test attention drag in warehouse and software tasks. The injected telemetry is random, task-irrelevant, and does not alter the underlying world state.
- Experiment 2 evaluates resilience to dense irrelevant contextual noise because real-world observations can include telemetry, sensor logs, and system chatter.The evaluation exclusively targets Condition 1: Irrelevant Context.
- Injected noise values are randomly sampled at each execution step and have no bearing on the primary task.
- Noise events never change ground-truth state and are appended under a BACKGROUND TELEMETRY header as observational distractors.
- Warehouse Noise: Warehouse noise simulates robot pings, ambient HVAC and sensor readings, and security-camera detections.Examples include battery, temperature, CPU-load, humidity, light, CO2, and object-detection messages.
- Software Noise: Software noise consists of cloud-infrastructure syslog telemetry representing passive health checks and CPU-load warnings from disconnected servers.An example combines a CI failure with telemetry from three servers.
Appendix D. Additional Results
Additional results cover software-repository scaling, noise robustness, state recovery, and warehouse-scaling evaluations across multiple model settings.
- Software Repository Scaling: Software-repository scaling compares baseline runtimes with SKILL.state using Gemini-3-Flash.The comparison concerns long-horizon execution scaling and reports baseline O(N^2) context collapse versus SKILL.state's O(1) prompt footprint.
- Warehouse Scaling: Warehouse-scaling results include separate evaluations with Gemma-4-31b-it and Qwen 3-8b-it.
- Robustness and State Recovery: Additional software-repository experiments evaluate resilience to irrelevant syslog telemetry and recovery after unstructured alerts alter repository state.The noise-robustness evaluation uses a 50-step horizon with Gemini-3-Flash, while the recovery experiment measures hallucination lag in recovery steps.