Last updated 13 October 2026
Switch from planning to execution mode
The planning phase often lasts longer than necessary
You have been talking to Claude Code for twenty minutes about a complex refactor. The agent has produced a detailed architecture plan and explained exactly how the new data flow should work. However, not a single line of code has changed in your editor. You are stuck in a loop where the agent keeps refining the plan but never picks up the tools to implement it. This often happens when the conversation becomes too abstract or when the agent is unsure if it has the authority to start modifying files.
Restarting the session is a common reaction to this frustration but it is usually a mistake. When you kill the process and start over, you lose the shared understanding you just built with the agent. You have to re-explain the constraints and the logic of your project. The goal is to move from a high-level discussion to a series of concrete file operations without losing the context that makes the plan valid in the first place. You need a way to signal that the brainstorming is over and the construction has begun.
Permission modes control the transition to action
Claude Code uses permission modes to define what the agent can do without asking. If you are stuck in a planning loop, you are likely in the plan mode. This mode allows the agent to use tools like Read, Glob, and Grep to explore your files, but it prevents the use of Edit or Write. This is safe for exploration but it creates a barrier when you want to see results. You can see your current mode in the terminal interface and change it at any time to unlock implementation tools.
To switch modes, press Shift+Tab. This cycles through the available permission levels. Moving from plan to the default mode allows the agent to propose edits that you must then approve. If you have full confidence in the plan you just developed, you can cycle to the acceptEdits mode. In this state, the agent can perform file writes and edits automatically. This speed is necessary when you are implementing a plan that involves dozens of small modifications across multiple directories and you do not want to manually confirm every line.
Context management prevents memory bloat
As your planning conversation grows, the context window fills up with chat history. A long planning phase can leave very little room for the actual code the agent needs to read and write. If the agent starts making mistakes or forgetting parts of the plan, it is often because the context window is too full of old discussions. You can fix this by using the /compact command. This command summarizes the session so far and frees up space while keeping the core decisions you made during the planning phase.
Using /compact is a vital step before you start a heavy execution phase. It cleans out the technical debt of your conversation. It keeps the agent focused on the next steps rather than the circular arguments you might have had earlier. By managing context this way, you ensure the agent has enough memory to handle large file edits and complex logic without getting confused by the ghosts of discarded ideas. It creates a clean slate for the implementation while preserving the final plan.
Project instructions stabilize the implementation plan
The project instructions in the CLAUDE.md file are the best place to anchor a plan before you start writing code. Before you switch to execution mode, prompt the agent to write the finalized plan into the CLAUDE.md file at the root of your repository. This file serves as a persistent memory for the project that survives across different sessions. The agent reads this file every time a session starts, which means your transition from planning to execution becomes a part of the project state rather than just a transient conversation.
You can also use a CLAUDE.md file in a subdirectory if your changes are limited to a specific part of the tree. By putting the plan in writing, you give the agent a single source of truth to refer back to if it loses its way during a complex Edit operation. This practice reduces the risk of the agent drifting away from the original requirements. It also means that if you need to use the /clear command to start the conversation over, the agent will still know exactly what the plan is as soon as it reads the file again.
Parallel sessions keep strategy and execution separate
Managing a complex transition is often easier when you can see the plan and the code at the same time. This is where adhdTerminal becomes a useful addition to your workflow. It is a native app for macOS and Windows made by MINDBALANCER OU in Estonia. It runs many Claude Code sessions side by side as tiles on a wall. You can have one tile dedicated to the high-level planning and another tile for the active execution. Each tile shows its own status, such as whether it is working or waiting for you.
Having these sessions side by side prevents the execution context from becoming cluttered with planning notes. You can name each tile and give it a specific colour to keep your work organized. This setup allows you to keep your architecture notes visible in one window while you use the other window to run the actual command line agent for file modifications. Tiles reopen in the same place after a restart, so you can pick up exactly where you left off without having to re-arrange your workspace.
Progress tracking reveals the state of the work
The Task tool is the engine of the implementation phase. When you move to execution, prompt the agent to use the Task tool to break down the implementation into smaller, trackable units. The agent will then report its progress as it completes each sub-task. You can see the current status of the implementation by using the /status command. This gives you a clear view of what has been finished and what remains to be done, which is helpful when you are managing a large set of changes.
If the agent gets stuck on a specific file edit or starts repeating itself, you can intervene immediately. Use the Escape key to interrupt what the agent is doing. If you need to go back to a previous point in the execution because an edit went wrong, press Escape twice to see earlier messages and select a point to resume from. This level of control ensures that even when you are in an automated mode like acceptEdits, you remain the final authority over the codebase.
Hook events automate the workflow shift
Automation through hook events can refine how you transition between modes. You can configure hooks like PreToolUse or UserPromptSubmit in your settings to trigger specific behaviors when you start using implementation tools. These hooks are defined in the .claude/settings.json file in your project or your home directory. For example, you might want a specific check to run every time the agent attempts to use the Write tool to ensure it follows your linting rules.
By defining how the agent behaves when a tool is called, you create a more predictable environment for the execution phase. This reduces the need for manual oversight and lets you trust the agent to follow the plan you built. Hooks can also be used to send notifications or log the progress of long-running tasks. This is especially useful when you are moving from a quick planning session to a long-running implementation that might take several minutes of continuous file operations and bash commands.
Error handling prevents execution loops
During the execution phase, the agent will frequently use the Bash tool to run tests or compilers. If the execution phase hits an error, the agent might try to fix it automatically. While this is often helpful, it can sometimes lead to a loop where the agent keeps trying the same failing fix. If you see this happening, use Ctrl+C to quit the session or Escape to stop the current tool. You can then use the /review command to look over the changes the agent has made so far and identify where the logic broke.
Once you find the error, you can provide a manual correction. You might use the /vim command to open a file and fix a syntax error yourself, or simply provide a new prompt to steer the agent in the right direction. After you have corrected the course, you can use the /resume command to pick up from a previous session state. This allows you to recover from mistakes during the execution phase without having to go all the way back to the planning phase.
Session persistence maintains long term momentum
Large projects often require multiple execution phases spread across several days. Claude Code supports this through the -c or --continue flag, which carries on the most recent session in a folder. If you need to find an older session from your planning phase, use the -r or --resume flag to see a list of earlier sessions. This persistence ensures that the transition from planning to execution is a continuous process rather than a series of disconnected events.
A free iPhone app from adhdTerminal mirrors your wall of tiles over an end-to-end encrypted link. This is helpful when you have moved a session into execution mode and need to step away from your desk. You can answer a prompt or send the next task from your phone to keep the implementation moving. The app costs 99 dollars once, and one key runs one computer at a time. You can try it for 24 hours for free without creating an account. This keeps your momentum high and ensures your execution phase finishes as planned.
Questions people ask
How do I stop the agent from talking and make it start coding?
Switch to acceptEdits mode by pressing Shift+Tab until the mode changes. Then, give a direct command like 'Execute the plan in CLAUDE.md now using the Edit and Write tools' to signal that the discussion is over.
What should I do if the execution phase uses too much context?
Run the /compact command to summarize the conversation. This removes the detailed history of your planning phase while keeping the important decisions, which frees up space for the agent to process file contents.
How can I see if the agent is actually following the plan?
Use the /status command to see the current progress of tasks. You can also use /review at any time to examine the specific changes made to the files before the agent continues with the rest of the implementation.
Read next
- Add build instructions to your CLAUDE.md fileImprove project context by adding specific build commands and environment requirements to your CLAUDE.md file for the AI to follow.
- Add common error fixes to CLAUDE.mdImprove project memory by adding a section for common errors and their fixes to your CLAUDE.md configuration file.
- Add custom shell aliases for Claude CodeSpeed up your workflow by creating shell aliases for common Claude Code invocations and project-specific startup commands.
- Add test commands to a CLAUDE.md fileUnderstand how to define specific test runners and environment flags in your CLAUDE.md file so the tool runs the correct test suite.