Stop Using Default Claude for Complex Code (Do This Instead)

If you have been using Claude Code in its default mode for every task, you are probably leaving its best feature unused. For anything bigger than a one-line edit, there is a setting you should be flipping that completely changes the quality of the output.
The setting is Plan Mode. Once you start using it for complex tasks, the difference is hard to unsee. This video walks through when to use it and what it actually does behind the scenes.
What Default Mode Does
In default mode, Claude Code reads your request, decides on an action, and starts executing immediately. For small focused requests this is great. "Add a console.log to this function." "Rename this variable across the file." Claude reads, edits, done.
The problem starts when the request is multi-step. "Add a payments feature to this app and update the README." Now Claude has to reason about architecture, file structure, libraries, error handling, edge cases. In default mode it has to do all that reasoning while also editing files in real time. The result: code that runs, but is often shallow. It misses connections. It picks the first reasonable approach instead of the best one.
What Plan Mode Does
Plan Mode separates thinking from doing. When you flip Claude into Plan Mode, it does not touch any files. It reads your request, explores the codebase if needed, and writes out a plan: what files it will create, what it will modify, what dependencies it will add, what the order of operations should be.
You review the plan. You can push back ("you missed the auth middleware case", "use Stripe not PayPal", "do not modify the migration file"). Claude refines. Once you say go, it executes the plan.
The difference is that the reasoning is done first, in writing, where you can inspect it. The execution then becomes a mechanical job that is much harder to mess up.
How to Turn On Plan Mode
Inside any Claude Code session, press Shift+Tab, then Tab again. You will see the mode indicator change to "plan mode" at the bottom of the terminal.
From that point, anything you ask Claude will result in a plan first, not an action. Press Shift+Tab again to cycle back to default mode when you are done.
You can also start a session in plan mode by default. Add this to your ~/.claude/settings.json:
{
"defaultMode": "plan"
}When Plan Mode Wins
- Anything multi-file. Refactors, new features, schema changes. Plan mode forces Claude to think about the whole change before writing one line.
- Anything you do not fully understand yet. If you are not sure how to approach the problem, asking Claude for a plan teaches you the architecture before code exists.
- Anything with security or data implications. A plan that lists every file Claude will touch is easier to audit than a stream of edits after the fact.
- Anything with external dependencies. Adding a new library, integrating with an API, modifying CI. Plans surface the install + config + usage steps separately so you can verify each.
When Default Mode Is Fine
- Single-file edits
- Renaming, formatting, small bug fixes
- Reading and summarizing code
- Quick experiments where you will throw the output away
The Other Lever: Model Choice
While we are talking about complex code, the second knob worth knowing about is which model Claude Code uses. Sonnet is the default, and it is fast and good. But for the genuinely hard problems (architectural decisions, deep debugging, novel algorithm design) Opus pulls ahead.
Switch models inside Claude Code with /model:
/model opusThen run your complex task. You will pay more per token, but for an hour of deep work it is usually worth it. Switch back to Sonnet for the next routine session.
Combine Both
The combination I use for hard tasks:
/model opusat session startShift+Tab Tabto enter Plan Mode- Describe the goal in one paragraph, including any constraints
- Read the plan, push back if needed
- Approve, watch execute
- Switch back to
/model sonnetafter
This pattern has saved me hours of "wait, why did Claude do that" cleanup on bigger refactors.
One Common Objection
"Plan Mode is slower." Yes, it adds a planning round before any action. But for anything more than trivial, the slowdown is much less than the time you would lose fixing a half-baked default-mode attempt. Time-to-first-edit is shorter, sure. Time-to-correct-result is usually shorter with Plan Mode.
Other Claude Code Workflow Videos
- This One File Made Claude Code 10x Smarter (CLAUDE.md Tutorial)
- Claude Code's 3 Customization Pillars (Skills vs Hooks vs CLAUDE.md)
- Hooks Tutorial: Run Custom Scripts on Every Edit
Subscribe
Subscribe to AyyazTech on YouTube for more Claude Code workflow tips.