Coding Agents Don't Need Longer History — They Need Intent Continuity

| Source: Towards Data Science

Tags: coding-agents, context-management, RAG, intent-continuity, Python, agent-harness

A Python implementation shows that intent continuity — automatically carrying forward relevant past requirements without user prompting — outperforms simple history search: a baseline scored 0/8 tasks, basic retrieval 4/8, and intent-aware retrieval all 8.

Details

The author built a coding agent harness to test what happens as projects grow long: rules stated early vanish from the agent's working attention even when the context window isn't full. The core problem isn't memory — it's knowing which old requirements still apply to a new task. Three approaches were tested on 8 tasks: (1) a baseline that does nothing special, (2) basic semantic search over history, and (3) intent-aware search that also verifies whether retrieved requirements are still valid. Results: baseline 0/8, basic search 4/8, intent-aware 8/8. On requirement recall, basic search retrieved 57% of needed rules; adding a verification pass pushed that to 100%. The implementation uses pure Python 3.12 with no embeddings, no vector database, and no LLM calls in the retrieval pipeline. The author flagged and corrected a bug in the original experiment design that would have inflated results — a transparency point worth noting. Full code is on GitHub (github.com/Emmimal/intent-continuity). This is practically useful for teams building long-running coding agents where accumulated project context must stay coherent over dozens of steps.