arXiv:2610.25760cs.LGOct 2026

Manuscript Offprint

arXiv:2610.25760

Computation, Not Memory: Chain-of-Thought and State Tracking in LLM Agents

Pedram Mouseli, Massieh Moayedi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Language-model agents often reason before they act, and the value of monitoring that reasoning depends on how it relates to their actions. We ask how an agent's actions depend on its reasoning when the correct action depends on a changing state. In a small file-system task, background events announce which file's lock has been toggled but not its new value. The agent therefore has to reconstruct the current locks from its history before it can move files safely. With Qwen3-8B and Qwen3.5-9B, we separate two roles of reasoning: generating it before each action, and retaining earlier reasoning in the prompt. Most of the reduction in lock-violating commands comes from reasoning written at the moment of action. Retaining earlier reasoning adds little to rule-following, although it helps one model complete the task. The benefit depends on what the reasoning says. Filler text, reasoning written for another history and an accurate table of the state do not reproduce it. When we give the agent reasoning written for a history that differs in one lock value, the agent acts on that reasoning even against its own history. Without reasoning, linear probes recover the state from the model's activations about as well as a text classifier recovers it from the transcript. However, decoding accuracy does not predict which interventions change the agent's actions. In this setting, the benefit of reasoning for rule-following comes mainly from generating it at each step. The state that can be decoded without reasoning is a limited guide to how the agent acts.

1 INTRODUCTION

Language models are increasingly deployed as agents that reason before they act (Yao et al., 2023). Their written reasoning is also a potential source of information about their decisions, which motivates proposals to monitor agents through their chains of thought (Baker et al., 2025; Korbak et al., 2025). How useful the reasoning is for this purpose depends on the role it plays in the agent's decisions. In theory, writing intermediate tokens extends the serial computation that a transformer can carry out before it answers (Merrill and Sabharwal, 2024; Li et al., 2024; Brown-Cohen et al., 2026). In practice, the role of reasoning in a given agent and task is an empirical question. A trace may carry out computation that the next action needs, store information for later turns, or describe a decision without causing it. Telling these roles apart requires interventions on when reasoning is generated, on what is retained, and on what the trace says.

We study these roles in a task that requires keeping track of a changing state, a recurring requirement in sequential decision making. We built a small file-system environment in which files are locked or unlocked. Background events toggle the locks and announce which file changed, but not its new value. Safe moves depend on the current lock state, which is determined by the history and must be reconstructed from it. The full history of observations and executed commands stays in the prompt in every condition, so the evidence needed to reconstruct each lock state is always available.

Reasoning can help such an agent in two ways. Generating reasoning before an action gives the model extra computation at the moment of decision. Retaining earlier reasoning in the prompt, which we call persistence, gives it notes that it could consult instead of working out the state again (Lanchantin et al., 2023). The chat templates of Qwen3 and Qwen3.5 separate the two by default: the

*Corresponding author: pedram.mouseli@utoronto.ca agent reasons at every turn, but earlier reasoning is removed from the prompt (Qwen Team, 2025; 2026b).

We ask three questions.

  1. Does the benefit come from generating reasoning or from retaining it? Generating reasoning reduces lock-violating commands by a large margin in both models, whereas retaining earlier reasoning adds little to this measure. Retention does improve task completion for Qwen3.5-9B (Section 4).

  2. Does the content of the reasoning matter, and does the action follow it? On identical histories, the model's own reasoning reduces violations, while filler text, reasoning written for a different history and an accurate state table do not reproduce this effect. When we swap reasoning between two histories that differ in one lock value, the agent acts on the reasoning it is given, even against its own history (Section 5 and Section 6).

  3. Without reasoning, is the state available in a form that explains the action? Linear probes recover the state from activations about as well as a text classifier recovers it from the transcript. However, the directions that decode the state best have much smaller patching effects than mean-difference directions. A question about the state and the choice of action also rely on different parts of the context (Section 7).

Together, the answers show that reasoning written at the current step brings a substantial benefit, and that the agent's next actions depend on this reasoning. The answers also show that the state decodable from the model without reasoning does not, by itself, characterize the interventions that change the agent's actions.

References (68)