Skip to content

feat: config switch to suppress the Claude Code SessionStart/SubagentStart reminders (per user and per project) #2778

Open

Description

@halindrome

Problem

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:

  1. Edit the scripts. The installer then treats them as unowned (install on 0.9.1-rc.1 removes existing Claude Code hooks instead of installing them #1387) and stops updating them, so they quietly fall behind upstream.
  2. 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.

  1. 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.
  2. 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.
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor/integrationEditor compatibility and CLI integration

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions