Problem
The SessionStart hook runs ensure-venv.sh / ensure-venv.bat unconditionally, and both start with a Python ≥ 3.11 guard (sh L28–35, bat L32–39) that exits 1.
Since 8e914e4, slm-launch under the default SLM_LAUNCHER=auto uses an installed slm and never touches the plugin venv. On a host where SLM is installed in its own environment but the first python3 on PATH is older (e.g. macOS system Python 3.9), every session start reports a Python-version error for a venv that is never used.
Proposed change
Before the guard, exit 0 when the launcher will not use the plugin venv, using the same decision as slm-launch:
SLM_LAUNCHER |
Bootstrap? |
plugin |
yes |
auto / unset, slm on PATH |
skip |
auto / unset, no slm on PATH |
yes |
system or a path |
skip |
A skip must not be based on "a daemon is running": under auto with no PATH slm, the launcher still execs the plugin venv even when a daemon is up.
The POSIX half is implemented and tested on a fork (commit in barrygfox/superlocalmemory, happy to open a PR). The Windows half depends on the Windows launcher issue (#139), because today slm-launch.bat always uses the venv and any skip would leave it without slm.exe.
Acceptance criteria
Dependencies
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
The SessionStart hook runs
ensure-venv.sh/ensure-venv.batunconditionally, and both start with a Python ≥ 3.11 guard (sh L28–35, bat L32–39) that exits 1.Since 8e914e4,
slm-launchunder the defaultSLM_LAUNCHER=autouses an installedslmand never touches the plugin venv. On a host where SLM is installed in its own environment but the firstpython3on PATH is older (e.g. macOS system Python 3.9), every session start reports a Python-version error for a venv that is never used.Proposed change
Before the guard, exit 0 when the launcher will not use the plugin venv, using the same decision as
slm-launch:SLM_LAUNCHERpluginauto/ unset,slmon PATHauto/ unset, noslmon PATHsystemor a pathA skip must not be based on "a daemon is running": under
autowith no PATHslm, the launcher still execs the plugin venv even when a daemon is up.The POSIX half is implemented and tested on a fork (commit in barrygfox/superlocalmemory, happy to open a PR). The Windows half depends on the Windows launcher issue (#139), because today
slm-launch.batalways uses the venv and any skip would leave it withoutslm.exe.Acceptance criteria
ensure-venv.shwithSLM_LAUNCHERunset, a fakeslmon PATH and apython3< 3.11 first on PATH exits 0 and creates no$CLAUDE_PLUGIN_DATA/venv.ensure-venv.shwithSLM_LAUNCHER=systemorSLM_LAUNCHER=/some/pathexits 0 and creates no venv.ensure-venv.shwithSLM_LAUNCHER=pluginandpython3< 3.11 still exits 1 with the existing error (existing testtest_rejects_python_less_than_3_11passes).ensure-venv.bat(structural tests intest_wf_windows_crossplatform.py), landed only after Plugin (Windows): slm-launch.bat always runs the plugin venv — add SLM_LAUNCHER selection to match POSIX #139.plugin/andcopilot-plugin/copies are regenerated;build-plugin.mjs --checkandbuild-copilot-plugin.mjs --checkpass.Dependencies
This issue was generated by an AI assistant (Claude) from a read of the code at 5bfa47c, and reviewed by a human before posting.