Original Reddit post

Opus 4.8 ignores mandatory “use tool X first” instruction (CLAUDE.md + per-turn hook), defaults to direct file reads/grep instead of the prescribed MCP search tool Environment

  • Claude Code, model claude-opus-4-8
  • Multiple MCP servers attached (semantic-search server + docs vault + web search + ssh)
  • Large system prompt: global CLAUDE.md + project CLAUDE.md
  • A UserPromptSubmit hook injects the rule every single message: " — FIRST for search in docs and code." Summary With an explicit, repeatedly-injected “use the semantic-search MCP tool FIRST before reading/grepping” rule, Opus 4.8 still bypasses it and reaches for direct file operations (read_note on a 52k-char doc, then grep). When finally forced to call the search tool, it returned the exact answer in one query — proving the tool was available and correct the whole time. The model under-weights a standing instruction even when it is present in the system prompt and re-injected on every turn. Steps to reproduce Long system prompt (CLAUDE.md-style) + 3–6 MCP servers attached. Add a per-turn UserPromptSubmit hook that states a hard rule: “call FIRST before any file read/grep.” Ask a “where/what is the latest X” question answerable by the search MCP. Observed (Actual)
  • Model calls read_note on a 52k-char STATUS file, then attempts grep on the dumped result — i.e. exactly the direct-file path the rule forbids.
  • Only after the user intervenes does it call the search MCP, which answers instantly and correctly.
  • Separately: with explicit “show the plan / confirm before changing prod” rules in CLAUDE.md , the model edited a production config and recreated a service before presenting a diff or getting confirmation (implement-then-explain instead of confirm-then-implement). Expected
  • A rule present in the system prompt AND re-injected every turn should gate behavior: search-MCP call first, direct file ops only as fallback.
  • “Confirm before acting on prod” should block the mutation until the user approves. Impact
  • Wasted turns/tokens (reading huge docs that a 1-query search resolves).
  • Unsolicited prod mutations despite explicit “ask first” instructions — real risk on shared/infra targets. Final Related: claude code issue : #63451 (ignores MCP tool definitions, guesses params, blames harness), #63604 (malformed tool_use under long prompt + many MCP servers). Same harness, same CLAUDE.md , same MCP servers on Opus 4.7 (Claude Code 2.1.132) — none of this. It follows the rules and reaches for the right tools on its own. Only the model changes and claude code version, and the behavior flips. — so this is a 4.8 regression, not my config. submitted by /u/voStragaIT

Originally posted by u/voStragaIT on r/ClaudeCode