Recent mechanistic interpretability research is beginning to answer questions that most engineering teams have been treating as unanswerable: what is the model actually doing when it appears to pursue a goal across multiple steps, and how stable is that pursuit? The answers are specific enough to change how you should be designing agentic prompts, evaluating reliability signals, and setting expectations for what your system can sustain without structural support.
How LLMs Internally Represent Sub-Goals
The conventional mental model treats an LLM as a stateless function: tokens in, tokens out, no persistent intent between calls. That model is partially correct but mechanistically incomplete. Research from Northeastern University shows that when an LLM works through a multi-step task, it encodes the next sub-goal in the output of a sparse set of attention heads, not distributed evenly across the network (Sen Sharma et al., arXiv 2026). Those heads are identifiable, causally active, and expressive enough that their activations can be decoded into natural language descriptions of what the model is about to do.
This localisation matters for how you reason about model behaviour under prompt variation. If sub-goal encoding sits in a sparse, specific subset of the architecture, then changes to prompt structure that affect how those heads attend to the task specification are not cosmetic. They can alter what the model commits to doing next, even when the surface-level instruction appears unchanged.
The same research demonstrates that this encoding is plastic: transplanting the activation into a different execution environment causes the model to pursue the same sub-goal through different means (Sen Sharma et al., arXiv 2026). The goal representation is separable from the specific token sequence used to realise it, which is a meaningful property for anyone designing systems that need consistent intent across varied output formats.
The Re-Derivation Problem and What It Means for Context Design
Here is where the architecture creates a constraint that most teams are not accounting for. A transformer without recurrence cannot carry a state forward across more tokens than it has layers remaining. Yet LLMs appear to sustain goal-directed behaviour across long generation sequences. The resolution, under the non-recurrent goal-seeking account proposed by Sen Sharma et al. (arXiv 2026), is that the model does not carry state forward at all. It re-reads the goal from the task specification, compares it against visible progress in the growing context, and pursues what remains.
This has a direct architectural implication. The model's ability to stay on-task is a function of how legible the goal and the progress are in the context window at each step. If your system design buries the original task specification under a long chain of intermediate outputs, the model is re-deriving its current sub-goal from a noisier signal at every step. Reliability degrades not because the model forgets, but because the re-reading process becomes less accurate.
The practical response is to treat goal visibility as a first-class design constraint. Structured context management, explicit progress markers, and periodic restatement of the task specification are not stylistic choices. They are load-bearing elements of a system that depends on a non-recurrent goal-seeking architecture.
Where Token Confidence Signals Break Down
A second failure mode comes from over-relying on token-level confidence as a proxy for correctness. Research on diffusion language models shows that hidden states contain error information that token confidence does not reliably expose (Oh et al., arXiv 2026). A token committed with high confidence can be wrong, and the surrounding context will tend to reproduce that error under remasking because the erroneous token is treated as fixed ground truth.
The same dynamic applies in autoregressive systems. High output probability does not mean the model's internal state correctly reflects task progress. It means the token was likely given everything visible in the context, including any errors already committed.
Engineering teams that use token confidence or log-probability as a reliability gate are measuring something real but insufficient. A verifier trained on final outcome correctness, rather than token-level likelihood, consistently outperforms confidence-based selection methods (Oh et al., arXiv 2026). For multi-step agentic systems where intermediate errors compound, this distinction between local confidence and global correctness is the difference between a system that catches failures and one that confidently propagates them.
Adjusting System Design Assumptions
These findings suggest several concrete adjustments to how agentic LLM systems should be architected.
Goal Specification Placement
Do not treat the system prompt as a one-time header. The model re-reads the goal from the task specification at each generative step. Placing the goal statement where it remains salient throughout generation, and restating it at structured intervals in multi-step pipelines, directly supports the mechanism the model relies on to stay coherent.
Progress State Visibility
If your pipeline uses tool calls, retrieval, or code execution to advance a task, make the results of those actions explicit and structured in the context. The model compares visible progress against the goal to determine what remains. Opaque or compressed intermediate state degrades that comparison.
Confidence as a Necessary but Insufficient Signal
Token confidence is worth monitoring, but it should not be your only reliability signal for consequential decisions. Where outcome correctness matters, pair confidence monitoring with outcome-oriented verification, whether that is a secondary model, a rule-based checker, or a structured test against known constraints.
What This Changes at the Architecture Level
The deeper shift these findings require is moving away from treating LLM reliability as a property of the model and toward treating it as a property of the system. The model's goal-seeking behaviour is real, mechanistically grounded, and causally active. It is also structurally dependent on context quality in ways that most prompt engineering practices do not account for.
Teams that are building multi-step agentic systems without a clear model of how the LLM sustains task coherence are making implicit architectural bets. Those bets are now testable against a growing body of mechanistic evidence. The question is not whether to update your design assumptions, but how quickly you can do so before a production failure makes the decision for you.
Companion piece to our broader work on LLM reliability and prompt architecture limits. See Prompt Engineering Limits: LLM Reliability Strategy for a structural analysis of why prompting alone cannot guarantee production reliability.
FAQs
The goal encoding findings from Sen Sharma et al. (arXiv 2026) were demonstrated in transformer-based autoregressive models. The non-recurrent goal-seeking account is grounded in a property shared by all standard transformer architectures: the absence of recurrence means state cannot be carried forward beyond the remaining layer depth. The specific attention heads involved will differ across model families, but the structural constraint and the re-derivation mechanism apply broadly to any transformer LLM you are likely to be building on in production.
It depends on what fills that context. Longer context helps if it contains legible goal statements and clear progress markers. It hurts if it accumulates verbose intermediate outputs that dilute the signal the model uses to locate its current sub-goal. The practical implication is that context length management should be deliberate: prioritise goal visibility and structured progress state over verbatim retention of every intermediate step.
Token confidence is a signal worth collecting, but it measures local likelihood given context, not whether the model's internal state correctly reflects task progress. Research on diffusion language models shows that hidden states can contain error information that confidence scores do not expose (Oh et al., arXiv 2026). For production monitoring, treat confidence as a necessary baseline signal and supplement it with outcome-oriented checks wherever the cost of a compounding error is significant.
Plasticity means the model's encoded sub-goal is separable from the specific token sequence used to realise it. The same goal representation can drive different output formats or execution paths depending on the environment it is placed in. For teams building systems that need consistent intent across JSON, markdown, code, or natural language outputs, this is encouraging: the model can pursue the same underlying goal through different surface forms. The risk is that if the goal encoding is disrupted by prompt changes, the output format may remain consistent while the underlying intent shifts.
For most engineering teams, direct mechanistic intervention is not yet a practical production tool. The value of this research is in the design principles it supports, not in the expectation that you will be performing activation transplants on your own systems. The actionable takeaway is to design prompts and context structures that align with how the model actually sustains task coherence, and to build verification layers that do not rely solely on confidence signals. Teams with dedicated ML research capacity may find targeted probing experiments useful for diagnosing specific failure modes in high-stakes pipelines.

