You said “add a new billing API endpoint.” Claude Code came back with: “Should I use TypeScript or JavaScript? Where would you like the file? Do you want me to add tests? What’s your preferred error format? Should I use REST or GraphQL?” Every answer is obvious from looking at the codebase. The session takes 10 minutes of back-and-forth before any code happens.
Claude Code asks when uncertain. If your prompt is vague or your codebase is silent on conventions, it answers safety with caution. The fix isn’t “tell it to stop asking” — that’s brittle. The durable fix is making defaults explicit in CLAUDE.md, naming the canonical example in the task, and authorizing decisive action except for destructive operations.
Common causes
Ordered by hit rate, highest first.
1. CLAUDE.md has no “Defaults” section
Without defaults written down, Claude treats every implicit choice as needing confirmation. “Use TypeScript” / “Tests in vitest” / “API responses in { data, error } shape” — all of these can be defaults if they’re declared.
How to spot it: cat CLAUDE.md | grep -i "default" — if there’s no defaults section, every decision becomes a question.
2. Prompt left obvious decisions implicit
“Add a new endpoint” doesn’t say which style, where, what framework. Claude could read the existing code to infer, but with default-safe behavior it asks.
How to spot it: Your prompt is under 30 words and doesn’t reference a canonical example or specify framework/location. Questions are filling in what you left out.
3. Agent’s safety default is “ask if unclear”
Claude Code’s built-in policy leans toward asking. For destructive ops this is correct; for reversible code edits it’s noise. The agent needs explicit authorization to proceed without asking.
How to spot it: Questions are about reversible decisions (file location, naming) not destructive ones (delete files, drop tables). That’s the noise pattern.
4. Pre-existing inconsistency in the codebase
Half your codebase uses findUser, half uses getUser. Claude reads both, sees ambiguity, and asks. The fault isn’t Claude — your repo doesn’t have a single canonical pattern.
How to spot it: The question Claude asks reflects a real choice the codebase doesn’t make (e.g., “which error format — { error: string } or { message: string }?”). Look for both patterns in your code.
5. The task is genuinely ambiguous
Some questions are fair: “where should this file live?” when you have 5 plausible locations is a real question. Differentiate between nuisance questions (defaults exist) and valid questions (real ambiguity).
How to spot it: If you can’t answer the question instantly with the codebase open, it’s a valid question.
6. Plan mode triggered, expecting confirmation
Plan mode is designed to ask before each step. If you didn’t intend plan mode, you’ll see what feels like over-asking.
How to spot it: Each “question” looks like a step-by-step plan asking for confirmation. Exit plan mode (or stop opting into it for simple tasks).
Shortest path to fix
Ordered by ROI. Step 1 is the durable fix; the rest tighten further.
Step 1: Add a “Defaults” section to CLAUDE.md
This is the single highest-leverage change:
## Defaults (do not ask, just use these)
- Language: TypeScript (strict mode)
- Test framework: vitest
- Test location: alongside source, named `*.test.ts`
- Package manager: pnpm
- API response shape: `{ data: T | null, error: string | null }`
- Error class: extend `AppError` from `src/lib/errors.ts`
- New components: arrow function, props destructured, exported as default
- Naming: `findX` for nullable lookups, `getX` for required (throws on missing)
## Always ask before:
- Deleting files outside the immediate task
- Running database migrations on prod
- Modifying `.env`, `package.json` engines, or CI config
- Changing public API contracts
- Force-pushing or `git reset --hard`
The “always ask before” block is what makes the “don’t ask otherwise” rule safe.
Step 2: Point at a canonical example in the prompt
Instead of “add a new endpoint”:
Add `GET /api/orgs/:id` endpoint.
Follow `src/app/api/users/[id]/route.ts` exactly — same structure,
same error format, same test layout. Don't ask about location,
naming, or framework — match that file.
A canonical pointer eliminates 5 questions in one prompt sentence.
Step 3: Use an explicit “decisive mode” prompt prefix
For execution-mode work:
Mode: execute, not consult.
Read CLAUDE.md for defaults. Make reasonable decisions based on existing code.
Ask ONLY if:
1. The decision is destructive (deletes data, breaks API contracts)
2. The decision contradicts CLAUDE.md
3. Multiple existing patterns exist and you can't determine the canonical
Save this as a slash command or template so you don’t retype it.
Step 4: Pre-answer obvious questions in the prompt
For repeat workflows:
Add tests: yes, vitest, alongside source.
File location: src/services/billing/.
Naming: camelCase, no `I` prefix on interfaces.
Documentation: JSDoc only on exports.
Front-loads what the agent would ask, so it just proceeds.
Step 5: Resolve in-repo inconsistency
If Claude is asking because your codebase doesn’t make a choice, fix the codebase:
# Count competing patterns
grep -rc "findUser" src/ | awk -F: '{s+=$2} END {print "find:", s}'
grep -rc "getUser" src/ | awk -F: '{s+=$2} END {print "get:", s}'
Declare a winner in CLAUDE.md and migrate the minority pattern (can be a Claude task itself). Future tasks stop hitting the ambiguity.
Step 6: Differentiate nuisance from valid questions
When Claude asks, judge: is this filling in a real gap, or asking about a default? Real gaps → answer + add to CLAUDE.md so it doesn’t ask twice. Default questions → answer + add to CLAUDE.md so they never ask again.
Q: "Should the new endpoint require auth?"
→ Real question. Answer + add to CLAUDE.md: "All /api/* require auth except /api/public/*."
Q: "TypeScript or JavaScript?"
→ Default question. Answer + add: "Always TypeScript, strict mode."
Every question becomes durable knowledge if you treat it as a doc gap.
Prevention
- Maintain a living “Defaults” section in CLAUDE.md — every question Claude asks becomes a doc entry
- Pair every code task with a canonical example file Claude can copy from
- Define an “always ask before” block in CLAUDE.md so silence isn’t unsafe — destructive ops still stop
- Resolve repo-wide inconsistencies (one pattern wins) — Claude can’t pick correctly when the code itself doesn’t pick
- For repeat workflows, save a slash command with all defaults pre-answered
- Treat every nuisance question as a documentation gap, not as Claude being annoying
Related
- Claude Code does not understand the whole project
- Claude Code output does not match the prompt
- Claude Code misunderstands your project architecture
- Claude Code beginner guide
- Claude Code workflow
- Claude Code project setup
- Claude Code Creates a Pile of Unused Helpers
- Agent Rollback Was Incomplete
- Multi-Agent Conflict: Two Agents Edited the Same Files
- Claude Code Bash Sandbox Blocks an Expected Command
- Claude Code Session Resume Loses Memory of Prior Work
- Claude Code Statusline Custom Script Errors or Hangs