Long-Horizon State Tracking in LLMs: Executing MD5 through a Deep Sequence of Dependent Tool Calls
Not on the map. Why?
Abstract (arXiv)
Long-horizon tasks remain uncommon in large language model (LLM) evaluation, and for a reason: when each step depends on the last, per-step accuracy that looks excellent in isolation decays catastrophically, as errors cascade and the end-to-end failure probability grows sharply with length. Existing agentic benchmarks report end-to-end success but confound this state-tracking difficulty with instruction interpretation, give no control group that isolates it, and are vulnerable to shortcuts such as a hallucinated final answer, so they cannot say why a long run fails. Whether an LLM can carry exact intermediate state across many tool calls at all is itself not well established. We test this cleanly by having the model compute a cryptographic hash, MD5, step by step: a sequence of 196 dependent tool calls over 64 rounds while it carries four 32-bit words (a,b,c,d) in its own context from one call to the next. Interpretation is trivial and, because we implement MD5 from scratch (RFC~1321), we align every call to the ground-truth trace and check the digest to the bit, so any failure is pure bookkeeping. gpt-oss-120b, a mixture-of-experts model with only ~5.5B active parameters per token, at temperature 0 with a short fixed prompt, carries the full state across all 196 calls and returns the correct digest on a majority of completed runs. In the strongest setting we replace every primitive tool with a second LLM, so a driver and a worker compute the whole hash from scratch with no exact-arithmetic oracle in the loop. Two ingredients decide success and neither changes the weights: keeping the model's own reasoning in its context each turn, and voting over a thinking-enabled worker to remove its modular-arithmetic slips. We localize the residual failures by origin, separating state-carrying from arithmetic and from serving.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 5 of its 9 references that are in the map. First posted on arXiv 2 Aug 2026.
Builds on
5 of 9 references.
References · 5
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025When Refusals Fail: Unstable Safety Mechanisms in Long-Context LLM Agents
- 2026ToolGate: Contract-Grounded and Verified Tool Execution for LLMs
- 2026Verified Tool Calls Improve LLM Agent Reliability Under Non-Atomic Failures
- 2026Nexus: Depth-Adaptive KV-Cache Splicing and Retrieval-Decoupled Tool Routing for Agentic LLMs on Unified Memory
- 2025Exploring State Tracking Capabilities of Large Language Models
- 2026Forgetting Without Restarting: Execution-State Unlearning for Stateful LLM Agents
- 2026Beyond Max Tokens: Stealthy Resource Amplification via Tool Calling Chains in LLM Agents
- 2026TraceSafe: A Systematic Assessment of LLM Guardrails on Multi-Step Tool-Calling Trajectories