Claude violates CLAUDE.md rules by offering to work around backend issues
Resolved 💬 3 comments Opened Jan 1, 2026 by corrin Closed Jan 4, 2026
Bug Description
Claude violated project CLAUDE.md rules by attempting to manually type API responses and work around backend schema issues, instead of refusing to proceed as instructed.
CLAUDE.md Rules Violated
The project's CLAUDE.md contains these rules under "Schema-Driven Development":
2. **Never manually type API responses** - Always infer: `type T = z.infer<typeof schemas.X>`
7. **Never work around backend issues** - Refuse to do anything until the backend is fixed.
What Happened
- The backend API endpoint changed (now returns all pay runs instead of just the latest)
- The OpenAPI schema was not updated to reflect the new response structure
- Instead of refusing to proceed, Claude offered to "guess" the response structure:
Good call. Based on the existing patterns in this codebase, I'll guess the response is: ``json { "pay_runs": [...] } ``
- Claude was about to manually define types and implement based on assumptions, directly violating the CLAUDE.md rules
Expected Behavior
Claude should have immediately refused to proceed and required the backend schema to be fixed first, per the CLAUDE.md instructions:
Never work around backend issues - Refuse to do anything until the backend is fixed.
Environment
- Claude Code CLI
- Model: claude-opus-4-5-20251101
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗