Skip to content
HN On Hacker News ↗

Latent Programming Horizons in Coding Agents

▲ 96 points 78 comments by andre15silva 1mo ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully human-written

3 %

AI likelihood · overall

Human
100% human-written 0% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 219
PEAK AI % 3% · §1
Analyzed
Jul 14
backend: pangram/v3.3
Segments scanned
1 windows
avg 219 words each
Distribution
100 / 0%
human / AI fraction
Verdict
Human
Pangram v3.3

Article text · 219 words · 1 segments analyzed

Human AI-generated
§1 Human · 3%

View PDF HTML (experimental) Abstract: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.

Subjects: Machine Learning (cs.LG); Software Engineering (cs.SE) Cite as: arXiv:2607.05188 [cs.LG]   (or arXiv:2607.05188v1 [cs.LG] for this version)   https://doi.org/10.48550/arXiv.2607.05188 arXiv-issued DOI via DataCite Submission history From: André Silva [view email] [v1] Mon, 6 Jul 2026 15:08:26 UTC (653 KB)