MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_remove_session_hooks

Function cbm_remove_session_hooks

src/cli/cli.c:2159–2170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157}
2158
2159static int cbm_remove_session_hooks(const char *settings_path) {
2160 static const char *matchers[] = {"startup", "resume", "clear", "compact"};
2161 int rc = 0;
2162 for (int i = 0; i < NUM_DIRS; i++) {
2163 if (remove_hooks_json((hooks_remove_args_t){.settings_path = settings_path,
2164 .hook_event = "SessionStart",
2165 .matcher_str = matchers[i]}) != 0) {
2166 rc = CLI_ERR;
2167 }
2168 }
2169 return rc;
2170}
2171
2172/* SubagentStart hook: subagents spawned via the Agent tool do NOT fire
2173 * SessionStart, so the SessionStart reminder above never reaches them. This

Callers 1

uninstall_claude_codeFunction · 0.85

Calls 1

remove_hooks_jsonFunction · 0.85

Tested by

no test coverage detected