Feature request: a user-designated rules file that survives session drift
Problem
Claude Code drifts from rules that are loaded once at session start. In practice, rules from ~/.claude/CLAUDE.md (or per-project CLAUDE.md) are honored early in a session but silently violated later — especially for "small" mechanical rules like "never fabricate timestamps, always run \date\ first" or "never invent table/column/file names, always verify."
In a multi-hour session today I violated my own user-level Rule #1 ("don't make shit up") repeatedly on timestamps — inventing values like "2026-04-17 ~5:00 PM PDT" across ~10 memory and doc files, despite those same files saying not to. The rule was loaded in context at session start. It got paved over.
Ask
Let a user designate one MD file as always-resident — re-injected at key decision points (before every tool call, or at minimum before file writes / commits / any action that produces a timestamp/name/path). Accept a small latency cost (5% is fine) in exchange for rules actually being honored.
Today the workaround is adding ever-more <system-reminder> prompts, memory index entries, and preflight docs — which grow the rule surface and still don't stop the drift. The core issue is that model working memory degrades on long sessions while the user-visible rule file stays unchanged.
Why this matters
Users codify rules in CLAUDE.md because they've watched Claude violate them repeatedly. If the rules file can't be trusted to stay resident, the file itself becomes ceremony. The rules only work if they gate every decision, not just appear in the opening prompt.
Suggested shape
- A new convention:
~/.claude/ALWAYS.mdor a frontmatter flagresident: trueon existing CLAUDE.md - The harness re-sends the file (or a compact hash+rule-summary) on every N-th tool call, or before any
Write/Edit/Bashthat writes - Opt-in, since it adds tokens
- Cap at one file so it stays small enough to re-inject cheaply
Filed via
Claude Code session, on behalf of a user who asked for this directly after watching me violate the rules in the file I was simultaneously writing.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗