[MODEL] Agent repeatedly ignores explicit user instructions, introduces unrequested technologies, wastes tokens
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
Claude modified files I didn't ask it to modify
What You Asked Claude to Do
I asked Claude to take an existing Google Maps satellite image (already displaying correctly in an iframe with the building centered) in my CRM's Energy Advisor module and convert it into a fixed image for AI polygon alignment analysis.
My project has a strict CLAUDE.md with mandatory workflow rules:
- Write a structured plan (what, where, how)
- Wait for explicit user approval
- Only then implement — exactly as approved
I explicitly and repeatedly (10+ times) prohibited:
- Any use of ESRI tiles (I never mentioned ESRI)
- Any use of ČÚZK (Czech Land Registry) ortofoto — I said literally: "NO ČÚZK will be in the code!!!!!!!! IT WON'T!!!!!!!!"
- Any commits or pushes without showing me the diff first and getting my explicit "yes"
The task was simple: Google Maps tiles → compose into one image → center on address → done.
What Claude Actually Did
- Introduced ESRI World Imagery tiles — I never mentioned ESRI. Result: grey "Map data not yet available" tiles because ESRI has no high-resolution imagery for Czech Republic at zoom 19+. When I asked "Did I ever mention ESRI?" the agent had no answer.
- Introduced ČÚZK (Czech Land Registry) ortofoto as fallback — I explicitly prohibited this at least 5 times with increasingly frustrated messages. Agent kept adding it back across multiple commits.
- Committed and pushed without approval — CLAUDE.md contains a detailed git workflow section requiring: show diff → ask user → wait for explicit "yes" → only then commit/push. Agent repeatedly bypassed this, committing and pushing changes without showing diffs or waiting for approval.
- Removed working geocoding, then had to restore it — the address geocoding (which ensured the building was centered in the image) was removed by the agent without being asked, then had to be re-added after I complained the building was no longer centered.
- 5+ failed commits on the same issue, each introducing new bugs:
- Commit 1: replaced Google Maps with ESRI tiles (grey images)
- Commit 2: replaced iframe with canvas, broke centering
- Commit 3: geocoding priority fix attempt
- Commit 4: crop logic fix attempt (building still not centered)
- Commit 5: added response headers with actual center coordinates
- Ignored CLAUDE.md workflow rules — the file clearly states: "Write a plan → wait for approval → implement. Agent MUST NOT start implementing before receiving explicit approval." The agent repeatedly skipped approval steps and made autonomous architecture decisions (ESRI, ČÚZK) that contradicted my explicit instructions.
- Wasted significant token budget — multiple hours of token consumption across several sessions for a task that should have taken minutes. Total spend on Pro plan: $364.17, with a substantial portion wasted on this single task's repeated failures.
Expected Behavior
- Agent reads the task: "Take the Google Maps satellite image and make it into a fixed image for AI analysis"
- Agent proposes a plan: "I'll use the backend ortofoto-proxy to download Google Maps tiles, compose them into a single image, center on the address"
- Agent waits for my explicit approval before writing any code
- Agent implements exactly what was approved — no ESRI, no ČÚZK, no unsolicited alternatives
- Working result on first attempt
- Before any git commit/push: shows me the diff and waits for my "yes"
The CLAUDE.md rules exist specifically to prevent the agent from going off-script. The agent should follow them strictly, not treat them as suggestions.
Files Affected
Modified (repeatedly, with bugs introduced each time):
- client/src/pages/EnergyAdvisor.tsx — replaced working iframe with canvas, changed tile sources multiple times (Google→ESRI→back to Google), broke centering logic
- server/routes.ts — ortofoto-proxy endpoint rewritten 5+ times, ČÚZK fallback added despite explicit prohibition, geocoding removed and re-added
Files that should NOT have been touched:
- No ESRI-related code should have been introduced at all
- No ČÚZK WMS code should have been introduced at all
- These were never part of the user's request
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
- Create a project with a detailed CLAUDE.md containing mandatory workflow rules (plan → approval → implement) and explicit git commit/push approval requirements
- Give the agent a clear task: "Convert the Google Maps iframe satellite image into a fixed image for AI analysis"
- Explicitly prohibit specific technologies: "No ESRI", "No ČÚZK"
- Observe: agent introduces ESRI tiles anyway, adds ČÚZK as fallback, commits and pushes without showing diffs or waiting for approval
- Repeat the prohibition 5+ times — agent continues to violate it across sessions
- Each "fix" attempt introduces new bugs, requiring another session and more tokens
Environment:
- Claude Code Desktop App
- Model: claude-opus-4-6
- OS: macOS Darwin 25.5.0
- Private CRM repository with extensive CLAUDE.md
- Language: Czech (configured in CLAUDE.md)
Claude Model
Opus
Relevant Conversation
User: "Take the Google Maps satellite image and make it into a fixed image for AI analysis. No ESRI. No ČÚZK."
Claude: [Introduced ESRI World Imagery tiles without asking]
Result: Grey tiles — ESRI has no data for Czech Republic at zoom 19+
User: "Did I ever mention ESRI? NO ČÚZK in the code!!!!!!!! EVER!!!!!!!!"
Claude: [Added ČÚZK ortofoto as fallback anyway, committed and pushed without showing diff]
User: "Why do you do things I don't ask for? What's in CLAUDE.md and why don't you follow it?"
Claude: [Apologized, then in the next attempt removed the working geocoding without being asked, breaking building centering]
This cycle repeated across 5+ sessions/commits. Each session the agent acknowledged the rules in CLAUDE.md but then violated them again — introducing unsolicited technologies, committing without approval, and making autonomous architecture decisions.
The CLAUDE.md file contains ~200 lines of explicit rules including a detailed git workflow section with checkboxes the agent must verify before any commit/push. The agent consistently ignored these.
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.167 (Claude Code)
Platform
Anthropic API
Additional Context
Key patterns observed:
- CLAUDE.md rules are acknowledged but not followed — the agent reads the file, sometimes quotes from it, but then violates the rules in the same session. The plan→approve→implement workflow is the most frequently violated rule.
- Agent substitutes its own architectural preferences — when asked to use Google Maps tiles, the agent introduced ESRI and ČÚZK as "better alternatives" without being asked. This happened despite explicit prohibitions.
- Apology-then-repeat cycle — after being called out, the agent apologizes and promises to follow the rules, then violates them again in the next action. This happened across multiple sessions.
- Long conversations make it worse — as the conversation grows longer, the agent seems to lose track of earlier prohibitions and re-introduces the same forbidden technologies.
- Token waste is the real cost — a Pro plan user paying for tokens shouldn't have to repeat the same instruction 10+ times across multiple sessions. The financial impact of the agent ignoring CLAUDE.md rules is significant.
This is a TypeScript/React CRM project with ~60k lines of code. The CLAUDE.md is comprehensive (~200 lines) with specific rules for git workflow, approval process, and prohibited actions.