Claude Code ignores explicit CLAUDE.md verification directives, ships untested multi-layer changes
What happened
My CLAUDE.md has explicit directives under "Verify before done":
- Run it — if you changed code, run the relevant tests or the app itself. Don't say "this should work" without evidence. - Check the UI — for frontend changes, start the dev server and test in a browser before reporting done. - Show me the output — for scripts, CLI tools, or data transformations, show the actual output, not just the code.
Claude Code ignored all three across multiple commits in a single session. It:
- Refactored function signatures in a Python CLI script, adding a
log_fncallback parameter to three functions - Rewrote the backend caller to use the new callback
- Added a new API endpoint
- Rebuilt the frontend page with a real-time log box
All committed separately, none verified by actually running the application. The only "verification" was npx tsc --noEmit (TypeScript type-checking) — which checks syntax, not behavior.
When I ran the app, the feature was completely broken.
The core issue
The CLAUDE.md directives were clear and unambiguous. Claude Code treated type-checking as equivalent to runtime verification, which it explicitly is not. This isn't a missing-instruction problem — the instructions existed and were ignored.
This is especially concerning because:
- The changes touched 4 files across 3 layers (CLI script → backend → API → frontend)
- Each layer depended on the previous one working correctly
- Zero intermediate runtime verification was performed
- Claude Code confidently committed and reported completion after each change
Expected behavior
Claude Code should follow explicit CLAUDE.md verification directives, especially "run it" and "check the UI." When changes span multiple layers, each layer should be verified before building on top of it. Type-checking tools (tsc, mypy, ruff) should never be treated as functional verification.
Environment
- Claude Code CLI
- Model: claude-opus-4-6