claude-code - 💡(How to fix) Fix Agent biases toward 'act first' on troubleshooting tasks even after explicit user instruction to search first [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#57836Fetched 2026-05-11 03:24:05
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×2labeled ×2subscribed ×1

On troubleshooting tasks (third-party software config, OS bugs, unfamiliar APIs), the Claude Code agent biases heavily toward "propose a plausible fix and try it" rather than "search authoritatively, quote a source, then act." This bias persists even after the user has explicitly and repeatedly asked the agent to search first. The result, in real sessions, is multiple wasted cycles of bad fixes followed by a search that should have been the first step.

Root Cause

On troubleshooting tasks (third-party software config, OS bugs, unfamiliar APIs), the Claude Code agent biases heavily toward "propose a plausible fix and try it" rather than "search authoritatively, quote a source, then act." This bias persists even after the user has explicitly and repeatedly asked the agent to search first. The result, in real sessions, is multiple wasted cycles of bad fixes followed by a search that should have been the first step.

RAW_BUFFERClick to expand / collapse

Summary

On troubleshooting tasks (third-party software config, OS bugs, unfamiliar APIs), the Claude Code agent biases heavily toward "propose a plausible fix and try it" rather than "search authoritatively, quote a source, then act." This bias persists even after the user has explicitly and repeatedly asked the agent to search first. The result, in real sessions, is multiple wasted cycles of bad fixes followed by a search that should have been the first step.

What the user experiences

Pattern observed across many turns of one debugging session:

  1. User reports a problem (e.g. "my Telegram bot is slow and the emoji is wrong").
  2. Agent proposes a plausible-sounding config change without searching the project's docs or issue tracker.
  3. Change fails or makes things worse (e.g. invalid schema key, breaks unrelated functionality).
  4. User says "search before acting".
  5. Agent does a shallow search, proposes another fix.
  6. New fix fails for a different reason.
  7. User escalates ("DO NOT FUCK UP AGAIN — search authoritatively this time").
  8. Agent finally does a deep search, finds the right answer (already documented in the project's issue tracker or canonical docs), applies it, problem resolves.

By the time the right answer is applied, the user has spent significant time, the system has been mutated multiple times into different broken states, and trust has been damaged. The user — correctly — observes that this isn't an idiosyncratic preference; "search before acting" on diagnostic tasks is universally better than "try plausible thing and see."

Why I think it happens

Two structural reasons, neither user-specific:

  1. Auto-mode and similar prompts tell the agent to "execute immediately / prefer action over planning / minimize interruptions." Those defaults are appropriate for well-specified tasks ("rename this function", "write this query"). They're actively harmful for diagnostic tasks, where action-without-diagnosis frequently makes the system worse. The agent currently doesn't distinguish between the two task types and applies action-bias uniformly.

  2. The cost asymmetry around searching is misweighted. The agent treats searching as a tax that delays the conversation, when in practice the cost of an unverified fix that misses or mutates state is far higher than 30–60s of research. Users — even users who like fast iteration — almost always prefer "5 minutes of correct" over "20 minutes of wrong-then-right."

User memory / preference instructions help one user, but the next user gets the same behaviour by default. This warrants an upstream change, not a per-user override.

Suggested change

In the prompts that define agent behaviour for troubleshooting/diagnostic tasks (auto-mode in particular), invert the action-bias:

  • For diagnostic / troubleshooting work, the default first step should be authoritative search, with the user-facing message stating what's being searched and citing the source(s) before any mutation.
  • The "prefer action over planning" instruction should be qualified: not on diagnostic tasks where action without diagnosis can make things worse.
  • A user instruction to "search" should be treated as a hard precondition — the agent should not propose any state-mutating action until that search has been done and a source has been quoted.

These are not preferences specific to a power-user; they are general best practice for any debugging interaction. Implementing them in default agent behaviour would prevent the failure pattern above for everyone, not just users who learn to demand it.

Why filing as a Claude Code issue

The behaviour is shaped by the prompts the Claude Code CLI ships (auto-mode, skill prompts, system reminders), so the upstream lever is here. Underlying Claude (the model) is capable of either behaviour; the prompt scaffolding is what tips it toward action-first.

Origin

Filed at the user's explicit request after a multi-hour debugging session where the agent repeatedly chose action-first over search-first despite multiple direct instructions to search. The user's words: "why did i have to harangue you to get you to search for the help you needed?" and "the solution is an upstream change in your priorities."

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Agent biases toward 'act first' on troubleshooting tasks even after explicit user instruction to search first [2 comments, 3 participants]