mlsanityData to 14 Oct 2026

Latent Programming Horizons in Coding Agents

arXiv 2607.05188 ↗First posted 6 Jul 2026cs.LG cs.SEcited by 1

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

A coding agent solving a software-engineering task spends dozens of steps reasoning, editing code, and running tests, yet little is known about what the underlying language model internally represents about the program it is working on. We show that the residual streams of language models under coding agents linearly encode properties of the evolving program: a logistic-regression probe on hidden states is able to decode whether the current code parses, passes its test suite, reduces the number of failing tests, and introduces regressions, reaching AUC up to 0.83 for correctness across two models and two benchmarks. Our second finding is more surprising: these representations run ahead of the agent's own edits. Probes trained to predict the outcome of future edits (before they are materialized and written on disk) achieve performance above chance up to roughly 25 steps in advance. We call this the agent's latent programming horizon. As a proof of external validity, we show that the probes transfer across benchmarks without retraining. Our positive results open calls for more research in mechanistic interpretability of coding agents.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 53 of its 58 references that are in the map. First posted on arXiv 6 Jul 2026.

Builds on

53 of 58 references.

Closest ancestors · 5

Same direction, newest first

  1. 2026TACT: Mitigating Overthinking and Overacting in Coding Agents via Activation Steering7 May
  2. 2025Understanding Software Engineering Agents: A Study of Thought-Action-Result Trajectories23 Jun
  3. 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
  4. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
  5. 2024Executable Code Actions Elicit Better LLM Agents1 Feb

Other references · 48

  1. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  2. 2016Understanding intermediate layers using linear classifier probescited by 1,353
  3. 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,059
  4. 2022Toy Models of Superpositioncited by 971
  5. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 876
  6. 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 716
  7. 2019Designing and Interpreting Probes with Control Taskscited by 640
  8. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  9. 2022Emergent World Representations: Exploring a Sequence Model Trained on a Synthetic Taskcited by 431
  10. 2023Emergent Linear Representations in World Models of Self-Supervised Sequence Modelscited by 319
  11. 2025Layer by Layer: Uncovering Hidden Representations in Language Modelscited by 311
  12. 2025SWE-Bench Pro: Can AI Agents Solve Long-Horizon Software Engineering Tasks?cited by 279
36 more
  1. 2024AutoCodeRover: Autonomous Program Improvementcited by 278
  2. 2025SWE-RL: Advancing LLM Reasoning via Reinforcement Learning on Open Software Evolutioncited by 263
  3. 2024Let's Think Dot by Dot: Hidden Computation in Transformer Language Modelscited by 191
  4. 2025Multi-SWE-bench: A Multilingual Benchmark for Issue Resolvingcited by 171
  5. 2025Reasoning Models Know When They're Right: Probing Hidden States for Self-Verificationcited by 159
  6. 2023Future Lens: Anticipating Subsequent Tokens from a Single Hidden Statecited by 121
  7. 2015Neural Programmer-Interpreterscited by 101
  8. 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 93
  9. 2024Transformers represent belief state geometry in their residual streamcited by 77
  10. 2024Emergent World Models and Latent Variable Estimation in Chess-Playing Language Modelscited by 62
  11. 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
  12. 2025No Answer Needed: Predicting LLM Answer Accuracy from Question-Only Linear Probescited by 38
  13. 2021What do pre-trained code models know about code?cited by 36
  14. 2015Neural Programmer: Inducing Latent Programs with Gradient Descentcited by 34
  15. 2024Evidence of Learned Look-Ahead in a Chess-Playing Neural Networkcited by 34
  16. 2022SelfAPR: Self-supervised Program Repair with Test Execution Diagnosticscited by 33
  17. 2023Emergent Representations of Program Semantics in Language Models Trained on Programscited by 30
  18. 2022Probing Pretrained Models of Source Codecited by 26
  19. 2025Knowing Before Saying: LLM Representations Encode Information About Chain-of-Thought Success Before Completioncited by 23
  20. 2024Searching Latent Program Spacescited by 20
  21. 2020Latent Programmer: Discrete Latent Codes for Program Synthesiscited by 18
  22. 2024Planning in a recurrent neural network that plays Sokobancited by 18
  23. 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
  24. 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelscited by 16
  25. 2022Unveiling Code Pre-Trained Models: Investigating Syntax and Semantics Capacitiescited by 9
  26. 2020Neural Program Synthesis with a Differentiable Fixercited by 6
  27. 2025Temporal Predictors of Outcome in Reasoning Language Modelscited by 6
  28. 2025Mechanistic Interpretability of Code Correctness in LLMs via Sparse Autoencoderscited by 5
  29. 2025On LLMs' Internal Representation of Code Correctnesscited by 5
  30. 2026Gradient-Based Program Synthesis with Neurally Interpreted Languagescited by 5
  31. 2025Gradient-Based Program Repair: Fixing Bugs in Continuous Program Spacescited by 4
  32. 2025Localized Calibrated Uncertainty in Code Language Modelscited by 3
  33. 2026CodeCircuit: Toward Inferring LLM-Generated Code Correctness via Attribution Graphscited by 3
  34. 2026Code Correctness Is Linearly Decodable from LLM Hidden States Before Generationcited by 3
  35. 2023INSPECT: Intrinsic and Systematic Probing Evaluation for Code Transformerscited by 2
  36. 2025Model-Agnostic Correctness Assessment for LLM-Generated Code via Dynamic Internal Representation Selectioncited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Beyond Resolution Rates: Behavioral Drivers of Coding Agent Success and Failure
  2. 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks
  3. 2026Self-Evolving Coding Agents
  4. 2026AgentSWE: Can Coding Agents Build the Agent You Actually Want?
  5. 2026The Best Programming Language for Tokenmaxxing: An Investigation of Coding Agent Behavior Across Programming Languages
  6. 2026Socratic-SWE: Self-Evolving Coding Agents via Trace-Derived Agent Skills
  7. 2026Yet Even Less Is Even Better For Agentic, Reasoning, and Coding LLMs
  8. 2026SpecForge: Recursive Self-Improvement for Coding Agents via Behavioral Specifications