Skip to main content
Tools & MCP

Claude Code Plan Mode vs Direct Execution: Exam Traps

Claude Code plan mode vs direct execution, .mcp.json scopes and secrets, and Grep vs Glob vs Edit: the habits that cost points on CCAR-F and what to pick.

The CertGrove team · 7 min read

One candidate who passed CCAR-F with a scaled score of 780 published their per-domain results: 88% on agentic architecture, and 50% on Claude Code Configuration & Workflows, the domain closest to everyday coding. That is one report, not a trend, but daily habits like "just start editing" are not always what the exam guide rewards. This post covers the traps around plan mode vs direct execution in Claude Code, MCP server scopes in .mcp.json, and the built-in tools Grep, Glob, Read, Edit and Write.

The material maps to task statements 3.4 (plan mode vs direct execution), 2.4 (MCP servers) and 2.5 (built-in tools). Note that 2.4 and 2.5 sit in Domain 2, not Domain 3. They show up most in Scenario 2 (Code Generation with Claude Code) and Scenario 4 (Developer Productivity with Claude).

Habit vs exam: the traps at a glance

Each row is a habit that works at your desk and fails on the exam.

Your habitWhy it fails on the examWhat the guide expects
Plan mode for everything, "to be safe"Adds overhead when there is no decision to makeDirect execution for clear, single-file changes
Start editing a 45-file migration right awayA wrong direction gets more expensive with every filePlan mode first, then execute the agreed plan
Read every file in the main session for "full context"Verbose output crowds out the instructionsExplore subagent for discovery, keep the summary
Paste the API token into .mcp.jsonThe secret lands in git history${GITHUB_TOKEN} env var expansion
Glob for *discount* to find callersCallers live in files with other namesGrep for the function name
Retry Edit when it fails on a duplicate matchIt keeps failingLonger anchor, or Read + Write

Plan mode vs direct execution: when does each one win?

Use plan mode when the task has architectural implications, several valid approaches, or changes across many files. Use direct execution when the change is well understood and clearly scoped, such as a single-file bug fix with a stack trace. For large work, combine them: plan the approach, approve it, then execute.

The guide's plan mode examples: microservice restructuring, a library migration affecting 45+ files, and choosing between integrations with different infrastructure requirements. Its direct execution examples: a single-file fix with a clear stack trace, and adding a date validation conditional.

The trap in both directions

"Start editing and fix problems as they appear" fails on the migration: a half-done migration leaves the codebase mixed. "Always use plan mode to be safe" fails on the one-line fix: the stack trace already says what the plan would. A test from the Claude Code docs: if you can describe the diff in one sentence, skip the plan.

To enter plan mode, press Shift+Tab until the status bar shows it, prefix one prompt with /plan, or start with claude --permission-mode plan. Approving the plan exits plan mode.

When discovery eats the context

If a task starts with "find every place that builds a payment request" across 80 files, those reads fill the main context and early constraints get lost. Explore is a built-in read-only subagent that searches in its own context window and returns only a summary. The exam answer to "Claude forgets earlier instructions halfway through a large audit" is Explore, not re-pasting the instructions. For how plan mode compares to skills and subagents, see skills vs commands vs subagents.

.mcp.json project scope vs user scope

Shared team servers go in .mcp.json at the project root, committed to the repo. Personal or experimental servers go in user scope, stored in ~/.claude.json. Credentials never go in either file: .mcp.json supports ${VAR} expansion, so the file holds a placeholder and each developer or CI runner supplies the real token.

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": { "Authorization": "Bearer ${GITHUB_TOKEN}" }
    },
    "jira": {
      "command": "npx",
      "args": ["-y", "@your-org/jira-mcp-server"],
      "env": { "JIRA_TOKEN": "${JIRA_TOKEN}" }
    }
  }
}

Per the Claude Code docs, expansion works in command, args, env, url and headers, and ${VAR:-default} supplies a fallback. An unset variable with no default stays as literal ${VAR} text, so authentication usually fails.

The claude mcp add default catches people out

⚠ Current Claude Code has three scopes; the exam guide uses two. The CLI default is local scope: private to you, stored in ~/.claude.json, one project only. claude mcp add without a flag shares nothing with your team. Sharing needs --scope project; a personal server for all projects uses --scope user:

claude mcp add --transport stdio --scope user scratch-notes -- npx -y @your-org/notes-mcp

On the exam, use the guide's split: project .mcp.json for shared tooling, user ~/.claude.json for personal or experimental servers. One more 2.4 trap: if an MCP code-search tool's description says only "Searches code," the agent tends to pick built-in Grep. The guide's fix is a detailed description of capabilities and outputs; see writing tool descriptions.

Claude Code built-in tools: Grep vs Glob vs Read, Edit, Write

Grep searches file contents. Glob matches file paths. Read loads a whole file, Write replaces a whole file, and Edit changes one spot by exact, unique text match. Ask where the thing you want lives: inside a file (Grep) or in its name (Glob).

flowchart TD
    Q{What do you know?} -->|Text inside files:<br/>function name, error string| G[Grep]
    Q -->|Name or extension pattern:<br/>**/*.test.tsx| GL[Glob]
    Q -->|The exact file| R[Read]
    R --> C{Change}
    C -->|One unique spot| E[Edit]
    C -->|New file or full rewrite| W[Write]
    E -->|Fails: text not unique| R2[Read full file, then Write]

Edit fails on a non-unique match

Edit requires old_string to appear exactly once, so return None in ten functions makes it refuse. First try a longer old_string that includes the function signature. When no unique anchor exists, as in generated code with identical blocks, the guide's fallback is Read the full file and Write it back. replace_all: true fits only when every occurrence should change.

Build understanding incrementally

Grep for an entry point, Read that file, and follow its imports, rather than reading every file up front. When code calls a library through a wrapper module, grepping for the library call finds only the wrapper. List the wrapper's exported names, then Grep for each one.

⚠ On macOS, Linux and WSL, current Claude Code leaves Glob and Grep out of the default tool set and searches with find and grep through Bash. The exam guide treats Grep and Glob as the search tools, so answer with those.

Try it

Which two actions match the exam guide? (Choose two.)

A. Commit a .mcp.json with the GitHub server and "Authorization": "Bearer ${GITHUB_TOKEN}". B. Run a 60-file logging library migration in direct execution, reviewing diffs at the end. C. Use Glob with **/*parse_invoice* to find every caller of parse_invoice(). D. After Edit fails because the target block appears four times in a generated file, Read the file and Write the full corrected content. E. Add a developer's experimental notes server to the shared .mcp.json so it is easy to find.

Answer: A and D.

  • B skips planning on a multi-file migration, which is the guide's plan mode example.
  • C searches file names. Callers live in other files, so this is a Grep job.
  • E puts a personal, experimental server in project scope. It belongs in user scope.

Key takeaways

  • Plan mode for architectural or many-file work, direct execution for a clear single-file fix, plan-then-execute for migrations.
  • Use the Explore subagent when discovery output threatens the main context.
  • .mcp.json is shared and committed; secrets go in as ${VAR}; experimental servers go in user scope.
  • The claude mcp add default is local scope, not project scope.
  • Grep for contents, Glob for paths; when Edit has no unique anchor, Read then Write.

Frequently asked questions

The CertGrove teamBilingual study notes for developers preparing for Claude Certified Architect — Foundations.