You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: config switch to suppress the Claude Code SessionStart/SubagentStart reminders (per user and per project) #2778
install registers two global Claude Code hooks in ~/.claude/settings.json (or $CLAUDE_CONFIG_DIR):
cbm-session-reminder: SessionStart on startup, resume, clear and compact
cbm-subagent-reminder: SubagentStart, every spawn
Both print fixed text (src/cli/cli.c, the reminder heredocs around L5748 and L5771). Claude Code merges hooks across settings scopes, so a project cannot turn off a user-level hook. Its own .claude/settings.json can only add hooks, never remove them. That leaves two options today:
Deregister them globally, which removes them from every project, including ones that want them.
Why this matters
The reminders are a good default. They do conflict with projects that ship their own CMM routing guidance. In my case that's a hook stack that enforces graph-first navigation and has its own SessionStart and SubagentStart text. In those projects, every session and every subagent receives two sets of instructions that partly disagree. CMM's line is "Use Grep/Glob/Read for text, configs, and non-code files". The project's rules route text in indexed files (.md, config, .cgi) through search_code and keep grep for files CMM does not index. Agents follow whichever instruction they read last.
Proposal
Any one of these would solve it. They are listed smallest first.
Project opt-out marker. The reminder scripts exit 0 silently when $CLAUDE_PROJECT_DIR/.codebase-memory/no-reminders exists, or a similarly named marker. That's one line per script, and nothing changes for anyone who doesn't create the file.
Config key. Add codebase-memory-mcp config set agent_reminders false, read by the scripts or by hook-augment. A per-project override in the project's .codebase-memory/ config would be ideal.
Route Claude Code through hook-augment. Copilot, Hermes and Kimi already get dynamic lifecycle context from hook-augment --event SessionStart. Pointing the Claude scripts there too, as exec "$BIN" hook-augment --event SessionStart|SubagentStart, would put the text in the binary. Upgrades would then update it without rewriting scripts, and the opt-out (1 or 2) would live in one place.
I'm happy to send a PR for whichever you prefer. My lean is (3) with (1) as the switch.
Activity