2025-07-19

Breaking an agent out of the 80% local maximum

When vibe coding stalls at 80% done, persist the plan to Plan.md, force a 20/80 plan-to-act ratio, or ask a second model to review. Three ways out of the loop.


First posted on LinkedIn, July 19, 2025.

---

The number one problem with vibe coding is when you get to 80% of the functionality and are stuck in an infinite loop of errors. You have reached a local maximum. The LLM has reached the current depth of its knowledge within the context of the session. At this point, you have to break the LLM free from its prison. There are only three ways to do this right now.

First, when the LLM is stuck, taking a step back, methodically planning tasks and providing external guidance from the web is the only way out. These activities provide new knowledge and context that the agent could not source on its own. It is critical to force the LLM/agent to adhere to your task plan and instructions. My favorite way to do this is via these prompts:
1. "Check in with me after every task or major decision"
2. "Persist every plan and validated learning to a Plan.md file"
3. "Do not pick shortcuts or simpler alternatives"

Persisting the plan, committing to git after every milestone, and writing down every validated learning in a file enables you to preserve context across sessions. Compacting contexts is painful, and losing context is like starting from square one. If it is not written down, after a drastic compaction of context, the LLM starts making the same mistakes again and relearns the fixes it had created. LLMs/Coding agents have no long-term memory. The code repository for the files in the directory supplied as context is its only long-term persistent state, enabling it to bootstrap critical world state at startup.

Coding agents (using LLMs) are like smart and lazy software engineers. You have to constrain and channel their energy. You must be deliberate about planning before asking the LLM/agent to generate code. Using the claude code plan mode as the task gets complex is a way to force the agent to plan before generating the code. My ideal plan/act mix is 20/80. In a recent vibing session, I spent 3 hours on the initial plan and 12 hours creating a Vanta clone.

Second, ask a second LLM to review the work of the first LLM when the first one is stuck. Claude Code ♥️ Gemini 2.5 Pro as a pair programmer or reviewer.

Third, for some agents, prompts that nudge the LLM to a different vector space work, enabling the agent/LLM to bring extended thinking or other tools and model families to solve the problem. These are my two favorite Claude code hacks to get it out of a rut:
1. "Try Ultra Hard"
2. "Do Something Different"

These are the Claude code vibe coding lessons you won't get on Reddit or X. Please apply them and let me know your favorite hacks in the comments.

Happy Vibing.