Model repeatedly loses focus on straightforward tasks, ignores project context and user interrupts
Summary
Claude Opus 4.5 repeatedly fails at a straightforward feature implementation (~150-200 lines of code), exhibiting systematic reasoning failures across multiple attempts despite clear project documentation and user guidance.
Environment
- Model: Claude Opus 4.5 (
claude-opus-4-5-20251101) - Task: Implement TypeScript relationship extraction (CALLS, IMPORTS, REEXPORTS, USES) for a code indexing system
- Project has detailed
CLAUDE.mdwith explicit architectural requirements
Failure Pattern 1: PR #189 (First Attempt)
Documented in project retrospective: https://github.com/loganmoon/codesearch/issues/185#issuecomment-3721218393
Architecture Violations:
- Created 600+ lines of naive code in a new
relationships.rsfile instead of integrating with existing infrastructure - Duplicated import parsing logic that already existed in
import_map.rs - Wrote manual recursive tree-sitter traversals instead of using queries
- Bypassed the documented
define_handler!macro system entirely
Process Failures:
- Failed to use LSP tools (
documentSymbol,goToDefinition) to explore existing code before writing - Started coding without understanding what utilities already existed
- Made architectural assumptions instead of asking for clarification
Failure Pattern 2: Current Session (Second Attempt)
After the user updated CLAUDE.md with explicit lessons learned and asked for a proper implementation:
Unnecessary Actions:
- Attempted to manually start Docker infrastructure when the test suite uses testcontainers and manages its own containers automatically
- This was explicitly unnecessary and showed complete disregard for how the test infrastructure works
Unresponsive to User:
- Did not respond to user pressing Escape key to interrupt and ask clarifying questions
- User had to kill the process to stop the model from continuing down the wrong path
Ignored Project Documentation:
CLAUDE.mdclearly documents how to run tests:cargo test --manifest-path crates/e2e-tests/Cargo.toml -- --ignored- Model tried to manually manage Docker instead of just running the test command
Expected Behavior
- Model should thoroughly read and follow project documentation (
CLAUDE.md) - Model should use LSP tools to explore existing code before writing new code
- Model should respond to user interrupts (Escape key) and pause for clarification
- Model should not take drastic/unnecessary actions when simple commands would suffice
- Model should ask questions when uncertain rather than making assumptions
Impact
A task that should take ~150 lines of well-integrated code has now consumed multiple sessions and significant user time due to the model repeatedly ignoring explicit guidance and project conventions.
Reproduction
The failures are documented in:
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗