Claude ignores CLAUDE.md and memory files — generates responses before reading stored instructions

Resolved 💬 1 comment Opened Apr 3, 2026 by AlexAlifanov121 Closed Apr 3, 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

Problem

When a specific string (e.g., a launch command) is stored in CLAUDE.md, auto-memory files, AND a custom skill file, Claude still generates the answer from its own reasoning instead of reading the file first. This has been corrected 50+ times across many sessions — the same mistake repeats every time.

What I stored

The exact bot launch command in three places:

  1. CLAUDE.md in the project root
  2. Auto-memory file feedback_bot_path.md (marked as CRITICAL, ABSOLUTE RULE)
  3. A custom skill bot-launch/SKILL.md

What Claude does

Every time I ask "give me the launch command" or "restart the bot":

  1. Claude generates a WRONG command from memory (e.g. ~/sui-arb-bot instead of the correct path)
  2. I correct it
  3. Claude apologizes, reads the file, gives the right answer
  4. Next message or next session — same wrong answer again

Root cause

Claude does not read CLAUDE.md or memory files BEFORE generating a response. It generates first, then (only if prompted) reads the file and self-corrects. Writing the instruction to more places does not help because Claude doesn't consult them before answering.

Additional issues

  • Session context is very short — Claude forgets instructions given 20 minutes earlier within the same conversation
  • Even after I asked Claude to fix this, it wrote the command to CLAUDE.md, memory, and a skill — then immediately output the wrong command in the very next message
  • This makes persistent configuration completely unreliable for any workflow that depends on exact strings

Expected behavior

When a user asks for something that matches a stored instruction in CLAUDE.md or memory, Claude should READ the file first, then respond — not the other way around.

Environment

  • Claude Desktop / Cowork mode
  • Claude Opus 4.6
  • macOS

What Claude Actually Did

  1. I stored the exact bot launch command in CLAUDE.md, auto-memory file, and a custom skill
  2. I asked Claude "give me the command to restart the bot"
  3. Claude generated a wrong command from its own reasoning (wrong path: ~/sui-arb-bot)
  4. I corrected it — Claude apologized, read the file, gave the right answer
  5. Next message — same wrong command again
  6. This repeated 50+ times across multiple sessions
  7. Even within a single session, Claude forgot the command given 20 minutes earlier
  8. Claude itself wrote the command to CLAUDE.md, then immediately output the wrong version

Expected Behavior

Claude should have:

  1. Read CLAUDE.md BEFORE generating any response
  2. Found the stored launch command
  3. Output the exact string verbatim: cd ~/Documents/Claude/Projects/Arbitrage\ bot/sui-arb-bot && python3 -m bot.main
  4. Not attempted to reconstruct or shorten the path from its own reasoning

Files Affected

Files that contain the correct command (all ignored by Claude before responding):
- CLAUDE.md (project root — loaded automatically)
- .auto-memory/feedback_bot_path.md (persistent memory — marked CRITICAL)
- .claude/skills/bot-launch/SKILL.md (custom skill)

No files were modified incorrectly — the problem is that Claude does not READ these files before generating a response.

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 CLAUDE.md containing an exact command string (e.g. a specific launch path)
  2. Open a new Cowork session in that project
  3. Ask Claude "give me the launch command"
  4. Claude will generate its own version instead of reading CLAUDE.md first
  5. Correct Claude — it will read the file and apologize
  6. Wait 10-20 minutes, ask again — Claude will output the wrong command again

Claude Model

Sonnet

Relevant Conversation

The memory file literally says:
"CRITICAL — the ONLY correct launch command for the arb bot. User corrected this 25+ times. NEVER deviate."
"ALWAYS copy the command above VERBATIM — no changes, no shortcuts"

Despite this, Claude generated: "cd ~/sui-arb-bot && python -m bot.main" and "pkill -f python && cd ~/sui-arb-bot && python -m bot.main" — completely ignoring the stored instruction.

Core issue: CLAUDE.md and memory files are not consulted BEFORE response generation. Claude generates first, reads later (only if user pushes back). This architectural pattern makes all persistent instructions unreliable.

Impact

Critical - Data loss or corrupted project

Claude Code Version

Opus 4.6

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗