The Gap
Claude Code caches memory files — they're only read at session start and after compaction. Behavioral digest rules written to memdir are invisible mid-session. This means corrections extracted during a session don't take effect until the next restart.
The Fix
New cozempic remind command, wired as a PostToolUse hook. Every 25 tool calls, outputs active digest rules + critical CLAUDE.md rules to stderr. Claude sees stderr as context, keeping rules in the recency window.
Cozempic behavioral rules (reminder #3):
[R001|git] Do not add Co-Authored-By to commits
[R002|file-ops] Always use Edit for existing files
NEVER push directly to main branch
- Fires on ALL tool calls (unmatched PostToolUse)
- Counter file prevents output on every call (every 25th only)
- Includes both digest rules AND CLAUDE.md enforcement markers (MUST NEVER, CRITICAL, etc.)
- ~100 tokens every 25 turns — minimal cost, maximum compliance
Inspired by @yurukusa's approach in anthropics/claude-code#6354.