[MODEL] Agent repeatedly ignores explicit user instructions, introduces unrequested technologies, wastes tokens

Status Open
Reported on v2.1.167
Maintainer reply None cached
Activity 0 comments · opened Jul 26, 2026

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:

  1. Write a structured plan (what, where, how)
  2. Wait for explicit user approval
  3. 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

  1. 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.
  1. 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.
  1. 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.
  1. 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.
  1. 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
  1. 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.
  1. 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

  1. Agent reads the task: "Take the Google Maps satellite image and make it into a fixed image for AI analysis"
  2. 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"
  3. Agent waits for my explicit approval before writing any code
  4. Agent implements exactly what was approved — no ESRI, no ČÚZK, no unsolicited alternatives
  5. Working result on first attempt
  6. 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

  1. Create a project with a detailed CLAUDE.md containing mandatory workflow rules (plan → approval → implement) and explicit git commit/push approval requirements
  2. Give the agent a clear task: "Convert the Google Maps iframe satellite image into a fixed image for AI analysis"
  3. Explicitly prohibit specific technologies: "No ESRI", "No ČÚZK"
  4. Observe: agent introduces ESRI tiles anyway, adds ČÚZK as fallback, commits and pushes without showing diffs or waiting for approval
  5. Repeat the prohibition 5+ times — agent continues to violate it across sessions
  6. 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:

  1. 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.
  1. 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.
  1. 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.
  1. 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.
  1. 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.

View original on GitHub ↗