Your AI coding agent forgets what it was building halfway through
The agent loses the plot on bigger tasks, rewrites working code, or drifts from the goal. Short answer: 5 steps. 1) Write a short project file the agent always reads; 2) Plan first, then build; 3) One task per session; 4) Commit after every working step; 5) Make it prove each step works.
Last updated: · This page is the decision checklist; the tools list for “Pick an AI coding plan” is a separate URL.
How do I fix this: Your AI coding agent forgets what it was building halfway through?
Write a short project file the agent always reads
Claude Code reads CLAUDE.md, Codex and many others read AGENTS.md, Cursor uses project rules. Put the goal, stack, folder layout and "don't touch" rules there.
Plan first, then build
Ask for a numbered plan saved to a file (e.g. tasks.md) before any code. Approve or edit it. Spec-driven tools like OpenSpec formalize this.
One task per session
Work through the plan one item at a time and start a fresh session for big new items. Long chats fill the context window and older instructions get lost.
Commit after every working step
Use Git commits as save points. If the agent breaks things, you roll back in seconds instead of arguing with it.
Make it prove each step works
Ask it to run the app or tests and show the result before moving on. "Done" without a check is how drift starts.
Which tools are best to pick an AI coding plan?
Claude Code
Anthropic's terminal coding agent; included with Claude subscriptions or billed via API.
Codex
OpenAI's coding agent (CLI, IDE and cloud); included with ChatGPT plans or via API.
Cursor
AI-first code editor with agent mode and a weekly usage pool.
GitHub Copilot
Completions, chat and agent inside VS Code/JetBrains/GitHub.
Open: 1 spot per week
One labeled sponsor for this topic each week; this week's spot is open. See open weeks →
All tools for “Pick an AI coding plan” →
Related fixes
- Stop a Cursor agent loopHow to fix a Cursor agent loop (same edit, or work after Stop)Fix →
- Claude Code vs Codex vs Cursor ~$20 plansClaude Code vs Codex vs Cursor $20 plan limits: how to pick without burning the weekFix →
- Scan a vibe-coded app for leaked API keysCheck a vibe-coded app for leaked API keys before you share itFix →
- Add an MCP server to Claude Code, Cursor, or CodexHow to add an MCP server to Claude Code, Cursor, or CodexFix →
See also AI tools launched today on the daily board.
NewAIToolsToday Daily
Top 3 AI launches, one model or news item that matters, and one simple fix. A 5-minute read, every weekday.