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
install: SubagentStart reminder points agents without MCP tools at tools they don't have #2837
The SubagentStart context tells every subagent to use search_graph / trace_path / get_code_snippet. Many agent types are defined with an explicit tool list that has no MCP tools (e.g. tools: Read, Grep, Glob, Bash). Those agents can still use the graph through codebase-memory-mcp cli <tool>, but the reminder never says so, so they either ignore it or try tools they don't have.
Details
The installed SubagentStart hook uses matcher "*" (src/cli/cli.c:6320-6365, cbm_upsert_claude_subagent_hooks_with_binary). Claude Code's SubagentStart input carries agent_type and agent_id but not the agent's tool list, and hook_augment.c:1642 already reads agent_type (only to choose a tier). Proposed fix (PR to follow): since the hook can't know the tool list, add one sentence to the Subagent context: when the mcp__codebase-memory-mcp__* tools are not available, run the same tools through codebase-memory-mcp cli <tool> --help / cli <tool> --flag value. That works for every agent type with no detection.
Alternatives considered: (a) settings only: SubagentStart matchers are JS regexes, so the installer could write a negative lookahead such as ^(?!statusline-setup$|claude-code-guide$).* instead of "*". Fuller option: in the hook, resolve agent_type to its definition (.claude/agents/*.md, ~/.claude/agents/*.md) and, when its tools: frontmatter is an explicit list without mcp__codebase-memory-mcp__*, emit CLI-form guidance (codebase-memory-mcp cli search_graph …) instead of MCP tool names. Built-in types with restricted tools (e.g. statusline-setup) can be a small static skip-list.
Investigated and written by Claude Opus 5.5 (Anthropic) in Claude Code, at the request of @halindrome.
Fixed on main by #2839 (merge commit 85a38ed): the SubagentStart hook context now tells subagents that the codebase-memory tools are also available from the shell via codebase-memory-mcp cli <tool> --help, so subagents without MCP tools have a working route to the graph. Thank you, Shane, for the report and the fix!
Activity
DeusData commentedon Oct 31, 2026
Fixed on main by #2839 (merge commit 85a38ed): the SubagentStart hook context now tells subagents that the codebase-memory tools are also available from the shell via
codebase-memory-mcp cli <tool> --help, so subagents without MCP tools have a working route to the graph. Thank you, Shane, for the report and the fix!fix(hooks): tell subagents without MCP tools how to reach the graph v…