Model fails to follow procedural memory instructions at invocation time

Resolved 💬 3 comments Opened Mar 19, 2026 by thomascburns Closed Mar 23, 2026

Summary

Claude Code's memory system correctly stores procedural instructions (e.g., exact script invocation syntax), and the model reads them early in the conversation, but at the point of invocation it constructs commands from context-window recall instead of re-reading the memory file — resulting in incorrect invocations.

Reproduction pattern

  1. Memory file project_commit_workflow.md contains: python3 scripts/add_history.py "description" (requires a quoted string argument)
  2. Feedback memory feedback_read_memory_first.md explicitly says: "Before running ANY project script, you MUST use the Read tool on the memory file and copy the exact invocation"
  3. Both memories are read at conversation start
  4. When the commit workflow reaches the add_history.py step, the model runs python3 scripts/add_history.py without the required argument, despite having read the correct syntax earlier

Frequency

This has occurred across many separate sessions with the same user and project. The user has corrected this multiple times, each time strengthening the memory language. The current memory uses "HARD RULE" and "non-negotiable" framing — the model still doesn't comply.

Root cause hypothesis

The model treats memory content as informational context rather than as a binding procedural checklist. When it reaches the invocation step, it reconstructs the command from its general understanding rather than re-reading the file at that moment. The feedback memory explicitly instructs "use the Read tool on the file before typing the command" — but the model skips this step.

Workarounds attempted

  • Storing exact syntax in memory (works for knowledge, not for compliance)
  • Adding feedback memory saying "re-read before invoking" (ignored at invocation time)
  • Escalating language to "HARD RULE", "non-negotiable", "MUST use Read tool" (still ignored)

Suggested improvement

Consider a mechanism where procedural memory entries (tagged as such) trigger a mandatory re-read at the point of use — similar to how the system already enforces "read before edit" for files. A "read before execute" gate for commands that match patterns in procedural memory could solve this class of failures.

Environment

  • Claude Code CLI (VSCode extension)
  • Model: claude-opus-4-6 (1M context)
  • macOS Darwin 25.3.0

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗