Start a plugin's runtime through the shipped launcher, not a bare python3 - #175
Draft
jothimani-rajendran wants to merge 1 commit into
Draft
jothimani-rajendran wants to merge 1 commit into
jothimani-rajendran wants to merge 1 commit into
Conversation
…hon3 Every plugin package ran its runtime with python3, which on Windows is often missing or the Store stub that exits 9009: the hook failed to start and Claude Code let the command run. Each package now ships launch.sh beside its runtime, and its hook runs it through git's own sh: git -c "alias.chock-sh=!sh" chock-sh "<root>/scripts/launch.sh" "<root>/scripts/<agent>.py" ... The alias carries only sh, so it reads the same under bash, PowerShell and cmd.exe, and the client expands its plugin-root token in the paths exactly as it did before. The launcher starts the first Python 3.11+ that actually runs, or refuses with exit 2. Plugin descriptions now say the hook needs git and a Python 3.11+, not python3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The repo route got a portable launcher in #172, but the plugin tier did not. Every plugin package (claude, cursor, codex, copilot, devin) still ran its runtime with a bare
python3 "<plugin root>/scripts/<agent>.py" …. On Windowspython3is often missing, or is the Microsoft Store stub, which exists and exits 9009. The hook then failed to start, Claude Code treated that as a non-blocking error, and the command ran. The plugin descriptions admitted this and told users to disable the Store alias.Now each package ships
scripts/launch.sh(the same launcher as the repo route) beside its runtime, and its hook runs:sh, with no path,$or quotes. git supplies a POSIX sh under bash, PowerShell and cmd.exe alike, and it works outside a git repository too.${CLAUDE_PLUGIN_ROOT},${CURSOR_PLUGIN_ROOT},${PLUGIN_ROOT},$DEVIN_PLUGIN_ROOT, Copilot's"$r") in the arguments exactly as it did forpython3 "<path>".python3,pythonandpythat actually runs Python 3.11+, skipping the Store stub, or refuses with exit 2 and a fix-it message.Plugin postures and the catalog page now say the hook needs git and a Python 3.11+, and what happens without each. Claims stay per client:
Definition of done
chock check→ 0 failureschock check --only matrixpasses (part ofchock check)chock sync --repo . --checkcleanchock check --only verifycleanpytest -qgreen (1599 passed, 3 skipped); new checks have attack and ordinary-data tests.tests/test_plugin_launcher.pybuilds the real block-destructive-commands Claude plugin and runs its hook as Claude Code would, from a non-repo directory:python3stub that exits 9009 ahead of a workingpython, the guard still deniesrm -rf /.ruff check .andruff format --check .cleanClaims
docs/cli-reference.mdnow names git, not python3, as what the codex and cursor packages fail open without.Not verified here: how each client expands its plugin-root token on Windows. That behaviour is unchanged, since only
python3was replaced. Next, re-adopt chock-catalog after this is released, then runkit.py auto --route pluginon Windows.🤖 Generated with Claude Code
https://claude.ai/code/session_016DapRw9Ce9z6jRd11uiuyu
Generated by Claude Code