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
doctor: the re-init fix's --no-hooks is decided from the agent's own settings #864
tracekit doctor adds --no-hooks to the re-init fix it prints when the Tracekit plugin is enabled, so the plugin's hooks and init's hooks don't both run (#464). It reads "the plugin is enabled" from the agent's own Claude Code settings, which the agent can write. So agent-writable input decides one flag of a command a person runs with sudo, and that flag removes init's hooks.
Scenario (system mode without --managed): the agent adds the Tracekit plugin to enabledPlugins in its own settings without the plugin being installed or running. Doctor's next re-init fix says --no-hooks. A person who follows it re-inits with no hooks, and the agent's calls are no longer decided.
What to do:
Decide --no-hooks only from what Claude Code will actually run: the plugin is installed where the agent's user can't write it, and enabled in managed settings or with hooks that Claude Code loads. Otherwise keep init's hooks and say why in the detail.
A test that fails today: the plugin enabled only in the agent's own settings, not installed, gives a fix without --no-hooks.
Check D-HOOKS-PRESENT's "decided twice" FAIL uses the same rule, so the two never disagree.
It's yours, @Mr45401, thanks. The fix belongs where doctor builds the re-init advice: whether to add --no-hooks must come from what init installed (its own record), never from the agent's settings file, which the agent can edit. Add a test where the settings say one thing and init's record another, and show it fails on main.
Activity
Mr45401 commentedon Nov 15, 2026
I'll take this one!
LoopGlitch26 commentedon Nov 15, 2026
It's yours, @Mr45401, thanks. The fix belongs where doctor builds the re-init advice: whether to add
--no-hooksmust come from what init installed (its own record), never from the agent's settings file, which the agent can edit. Add a test where the settings say one thing and init's record another, and show it fails on main.doctor: decide --no-hooks and D-HOOKS-PRESENT from trusted active plugin
doctor: decide --no-hooks and D-HOOKS-PRESENT from trusted active plugin
doctor: count the Claude Code plugin in system mode only from managed…