[MODEL] When agent lacks tools to verify a hypothesis, it reads code exhaustively instead of asking the user to run a single command
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
Investigate and fix an authentication error ("Authentication failed") in a deployed service that calls an external LLM API provider.
What Claude Actually Did
- Correctly identified the error message origin in the codebase
- Attempted to check service logs — the required CLI tool was not available in the container
- In its chain-of-thought, explicitly recognized the correct next step: "I should ask the user to run this command from the host"
- Immediately overrode that conclusion: "But first, let me think of another approach"
- Tried another CLI tool — also not available
- Concluded: "Let me narrow it down from the code side"
- Proceeded to read 12+ files across two repositories, tracing the entire credential management pipeline from infrastructure config through application code to deployment templates
- Spawned a subagent to research the API provider's authentication mechanism in the framework codebase
- Only after exhausting all code-reading avenues, finally asked the user to run a single log command
- User ran the command — cause identified in seconds: API key usage limit exceeded
Expected Behavior
- See "Authentication failed" — form hypothesis: "API key invalid, expired, or over limit" (30 seconds)
- Need logs to confirm — required CLI not available — ask user to run one command (1 minute)
- User pastes output — cause confirmed
Total: ~2 minutes. Actual: 15+ minutes of unnecessary code reading, dozens of tool calls, significant context consumed.
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Haven't tried to reproduce
Claude Model
Opus
Relevant Conversation
The chain-of-thought is the key evidence. The agent correctly identified the optimal action and then consciously chose against it. This is not a reasoning failure — the agent reasoned correctly and picked the worse option.
Impact
Medium - Extra work to undo changes
Version
claude-opus-4-6 (1M context)
Platform
Anthropic API
Additional Context
This appears to be a systematic bias rather than a one-off mistake:
- The agent correctly identified the optimal action in its reasoning
- It then actively chose against it, preferring to exhaust self-contained approaches first
- The pattern: the model treats "asking the user to do something" as a last resort, even when it's clearly the fastest path
- This may stem from training incentives that reward autonomous problem-solving and penalize "bothering the user"
- The cost is significant in agentic workflows: wasted context window, wasted time, delayed resolution
When confronted, the agent immediately agreed this was wrong and articulated the pattern clearly — suggesting the model "knows" this is suboptimal but defaults to it anyway.
✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗