{"slug": "latent-programming-horizons-in-coding-agents", "title": "Latent Programming Horizons in Coding Agents", "summary": "Researchers found that language models in coding agents linearly encode properties of evolving programs, including correctness, up to 25 steps before edits are made, a phenomenon they call the latent programming horizon. Probes trained on hidden states can predict future code outcomes with AUC up to 0.83, and transfer across benchmarks without retraining. The findings open avenues for mechanistic interpretability of coding agents.", "body_md": "# Computer Science > Machine Learning\n\n[Submitted on 6 Jul 2026]\n\n# Title:Latent Programming Horizons in Coding Agents\n\n[View PDF](/pdf/2607.05188)\n\n[HTML (experimental)](https://arxiv.org/html/2607.05188v1)\n\nAbstract: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.\n\n### References & Citations\n\nLoading...\n\n# Bibliographic and Citation Tools\n\nBibliographic Explorer\n\n*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))\nConnected Papers\n\n*(*[What is Connected Papers?](https://www.connectedpapers.com/about))\nLitmaps\n\n*(*[What is Litmaps?](https://www.litmaps.co/))\nscite Smart Citations\n\n*(*[What are Smart Citations?](https://www.scite.ai/))# Code, Data and Media Associated with this Article\n\nalphaXiv\n\n*(*[What is alphaXiv?](https://alphaxiv.org/))\nCatalyzeX Code Finder for Papers\n\n*(*[What is CatalyzeX?](https://www.catalyzex.com))\nDagsHub\n\n*(*[What is DagsHub?](https://dagshub.com/))\nGotit.pub\n\n*(*[What is GotitPub?](http://gotit.pub/faq))\nHugging Face\n\n*(*[What is Huggingface?](https://huggingface.co/huggingface))\nScienceCast\n\n*(*[What is ScienceCast?](https://sciencecast.org/welcome))# Demos\n\n# Recommenders and Search Tools\n\nInfluence Flower\n\n*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))\nCORE Recommender\n\n*(*[What is CORE?](https://core.ac.uk/services/recommender))\nIArxiv Recommender\n\n*(*[What is IArxiv?](https://iarxiv.org/about))# arXivLabs: experimental projects with community collaborators\n\narXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.\n\nBoth individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.\n\nHave an idea for a project that will add value for arXiv's community? [ Learn more about arXivLabs](https://info.arxiv.org/labs/index.html).", "url": "https://wpnews.pro/news/latent-programming-horizons-in-coding-agents", "canonical_source": "https://arxiv.org/abs/2607.05188", "published_at": "2026-07-07 09:46:58+00:00", "updated_at": "2026-07-07 10:00:06.993558+00:00", "lang": "en", "topics": ["machine-learning", "large-language-models", "ai-agents", "ai-research"], "entities": [], "alternates": {"html": "https://wpnews.pro/news/latent-programming-horizons-in-coding-agents", "markdown": "https://wpnews.pro/news/latent-programming-horizons-in-coding-agents.md", "text": "https://wpnews.pro/news/latent-programming-horizons-in-coding-agents.txt", "jsonld": "https://wpnews.pro/news/latent-programming-horizons-in-coding-agents.jsonld"}}