Open Brain
arXivPaperNeeds Review

Goal Encoding in LLMs

In a coding study, specific attention heads encoded an upcoming sub-goal and helped predict the model’s next action. Interventions suggest the model may keep pursuing goals by rereading its task and tracking progress in context.

arXiv · Nov 12, 2026
Open Source Open MarkdownOpen JSON
Source Summary

In a coding setting with multiple subtasks, the authors locate next-sub-goal information in a **sparse set of attention heads**. The same heads can decode future actions, and transplanting the encoding to another programming-language environment triggers the same operation with different tokens.

Practical Implication

For builders debugging agent behavior, the findings suggest checking whether task instructions remain available and progress is visible in the conversation context, rather than assuming the model carries a durable internal goal state.

Agent-Ready Context
In a coding setting with multiple subtasks, the authors locate next-sub-goal information in a **sparse set of attention heads**. The same heads can decode future actions, and transplanting the encoding to another programming-language environment triggers the same operation with different tokens.

For builders debugging agent behavior, the findings suggest checking whether task instructions remain available and progress is visible in the conversation context, rather than assuming the model carries a durable internal goal state.

The authors propose a **non-recurrent goal-seeking** account in which the model repeatedly rereads the task and compares it with visible progress. The experiments use a constructed coding setting; the material does not establish how broadly this mechanism applies to deployed coding agents.
Connected Context · Feed7 Judgment

This adds a proposed mechanism to the practical advice to keep task instructions and progress visible: in a constructed coding setting, goal information appears in sparse attention heads that support rereading the task and comparing it with progress. It does not establish that deployed agents lack durable goal state or that the mechanism generalizes beyond the tested setting.

Context Map
agentcodingresearch#reasoning#harness-engineering
Uncertainty
The authors propose a **non-recurrent goal-seeking** account in which the model repeatedly rereads the task and compares it with visible progress. The experiments use a constructed coding setting; the material does not establish how broadly this mechanism applies to deployed coding agents.