Problem
Every plugin lifecycle hook calls bare slm and swallows failure, e.g. hooks.json L8, L25, L37…:
"command": "slm hook start 2>/dev/null || true"
Nothing puts $CLAUDE_PLUGIN_DATA/venv/bin on PATH. On a machine with no system install, the MCP server works (it runs the venv's slm via slm-launch), but slm hook mandate/start/checkpoint/post_tool_outcome/… all fail with "command not found", and 2>/dev/null || true hides it. Session-start context injection, checkpoints and outcome capture are lost with no signal to the user.
This is the configuration slm-launch explicitly supports as the fallback ("a plugin-owned venv is the fallback for a machine that has none").
Proposed change
Route hooks through the same binary selection as the MCP server — e.g. a small slm-hook wrapper (POSIX + .bat) that resolves slm exactly as slm-launch does and execs slm hook "$@" — and stop discarding "binary not found" errors (keep || true for hook failures, but log a one-line warning when no slm could be resolved).
Acceptance criteria
Out of scope
This issue was generated by an AI assistant (Claude) from a read of the code at 5bfa47c, and reviewed by a human before posting.
Problem
Every plugin lifecycle hook calls bare
slmand swallows failure, e.g.hooks.jsonL8, L25, L37…:Nothing puts
$CLAUDE_PLUGIN_DATA/venv/binon PATH. On a machine with no system install, the MCP server works (it runs the venv'sslmviaslm-launch), butslm hook mandate/start/checkpoint/post_tool_outcome/…all fail with "command not found", and2>/dev/null || truehides it. Session-start context injection, checkpoints and outcome capture are lost with no signal to the user.This is the configuration
slm-launchexplicitly supports as the fallback ("a plugin-owned venv is the fallback for a machine that has none").Proposed change
Route hooks through the same binary selection as the MCP server — e.g. a small
slm-hookwrapper (POSIX +.bat) that resolvesslmexactly asslm-launchdoes and execsslm hook "$@"— and stop discarding "binary not found" errors (keep|| truefor hook failures, but log a one-line warning when noslmcould be resolved).Acceptance criteria
slmon PATH and a plugin venv present, running each hook command fromhooks.jsoninvokes$CLAUDE_PLUGIN_DATA/venv/bin/slm hook <name>(test with a fake venvslmthat records its argv).slmon PATH andSLM_LAUNCHERunset, hooks use the PATH binary (same precedence asslm-launch).plugin-src/hooks/hooks.jsoncalls bareslm.plugin/copy regenerated;build-plugin.mjs --checkpasses.Out of scope
This issue was generated by an AI assistant (Claude) from a read of the code at 5bfa47c, and reviewed by a human before posting.