Repository navigation
Claude Code plugin: load on Claude Code 2.1.287 and later, with a second small plugin for guarded sessions on 2.1.329+ - #4283
Merged
Conversation
…en held calls through a second plugin, plannotator-run The mod hooks tool.* again (as in 0.29.8), so Claude Code 2.1.287-2.1.325 load it. The one tool.run hook moves to a new plugin, plannotator-run (apps/hook-run), which asks the mod to open the call through a named action the mod adds in engine.create. Where both hear a call (2.1.326-2.1.328) it opens once. No dependency link between the two plugins; the companion's version is bumped with the others.
…gin beside it Every engine: the mod's module loads and its suite passes. 2.1.287 and 2.1.325: the companion is refused by claude plugin validate for naming tool.run. 2.1.326 and later: with the companion, a held call opens exactly once for annotate, review, last and the Bash take-over; without it, from 2.1.329 the mod alone opens nothing (the control).
The mod's module loads from 2.1.287 (the first Claude Code with hooks modules) now that its tool.run hook lives in the plannotator-run plugin, so Settings -> Agents, the one-time update dialog and New message's held Start fire only below 2.1.287. A held Start names the higher of the two floors (launch needs 2.1.314), the version that makes Start work.
… later When the plannotator plugin is installed, after the marketplace and plugin update, one claude --version decides: 2.1.326 or later installs plannotator-run@plannotator (or updates it when it is there); an older or unknown version leaves it alone. A failing step prints a note and never fails the install; the pin and the opt-out skip it with the main plugin.
… companion's action; a call taken before a reload is never opened again
…Code plugin; a failure there is a warning
…, at most once a day, from the CLI and the Inbox
…claude --version gets its own 20 s limit
…d safety, and who can still be without it
…ocess The live mark was written per session in the shared store at the first session.start only, so after an in-process resume, or when another process opened the same session, every call reaching the companion was refused. The mark now lives in the process's own environment and is written each time a new instance is made; a module stands down only when a newer load in the same process replaced it, and any doubt opens.
The CLI now claims the day with an exclusive create and starts one detached child of its own binary (own process group, no stdio, unref'd) so process.exit neither waits for nor kills the install. It starts only inside a Claude Code session and only for a released build. claude runs from the home folder. Once a check has seen the companion installed, a later absence is left alone; finding the main plugin gone or running plannotator uninstall forgets that.
A hung plugin install or update for plannotator-run could hold an install silently for up to 11 minutes. It now stops after 60 s (an internal knob for the tests), prints nothing and the install goes on.
backnotprop
marked this pull request as ready for review
November 30, 2026 17:35
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 this does
Plannotator's Claude Code plugin loads on every Claude Code from 2.1.287 again, as it did in 0.29.8. A second, small plugin from the same marketplace,
plannotator-run(apps/hook-run), carries the one hook that only Claude Code 2.1.326 and later can load. Plannotator installs that second plugin by itself. Nobody is told about it and nobody has to do anything.Nothing changes for users. No new step, setting, prompt or instruction. Every place a person reads a minimum Claude Code version says 2.1.287 again, word for word as at v0.29.8 (README,
apps/hook/README.md, the site's docs, the Inbox agent pages,plannotator inbox --help, the Inbox setup hint).What each Claude Code range gets
tool.run, so the main plugin names none. If the companion is somehow installed, Claude Code refuses only the companion, and the main plugin is not affected. Plannotator never installs it on these versions.plannotatorcall or a taken-over Bash command opens through the companion. Where no guard holds calls, the companion changes nothing.Opening through the companion after /resume, /clear and in a second process
The mod marks which module load is live, so that a module replaced by a reload never opens a call from its old state. The mark is in the process's own environment (
PLANNOTATOR_RUN_LOAD), written each time the mod makes a session's instance: at session start, after/clear, after an in-process/resume, after a fork.claude --resumeor-cin another terminal, the Inbox's start again) has its own environment, so each process opens the calls it hears.$.storeacross a reload.An earlier round kept this mark per session in the shared store, written only at the first session start. After an in-process
/resume, or once another process opened the same session, every call that reached the companion was refused. That is fixed here, with tests for each case.The three silent install points
Each one acts only on Claude Code 2.1.326 or later, only next to a user-scope
plannotator@plannotator, and prints nothing about the companion, on success or on failure.install.sh,install.ps1,install.cmd). After the main plugin's update, they runclaude --versionwith its own 20-second limit. Then they runclaude plugin install plannotator-run@plannotator --scope user, orplugin updateif it is already installed, with its own 60-second limit. A timeout or an unknown version does nothing, prints nothing and never fails the install.packages/server/claude-run-companion.ts), from the CLI and from the Inbox.clauderuns from the home folder, never the project folder.plannotator uninstall, or the main plugin being gone, forgets that.update.log. Off when update checks are off, under tests, and with the installers' Claude Code plugin opt-outs.Uninstall
plannotator uninstallremoves the companion with the main plugin (user scope only). The step is optional: a failure is a warning, never an error, because older installs never had the companion. It also clears the daily check's memory that the companion was seen. The installers have no uninstall of their own.Who can still be without the companion
These people see exactly what released 0.29.8 shows. On 2.1.329+ behind the guard, that means Claude Code's own "no hook answered this call" for the tool, and a Bash
plannotator annotate|review|lastruns as written.plannotator-run.claude --plugin-dir.--skip-claude-plugin,PLANNOTATOR_SKIP_CLAUDE_PLUGIN_UPDATE,skipInstall.claudePlugin), and a--versionpin together with update checks off.claudenot found.What was seen run, and where
All on macOS arm64, with real Claude Code in a throwaway home.
claude plugin test, this head's plugin parts): 93 pass, 0 fail on 2.1.287, 2.1.325, 2.1.329 and 2.1.330.plugin validatepasses for the main plugin on all four./resume,/clear, a fork, two processes on one session, a broken store, an inherited mark, a reload then a resume. Each opens exactly once, and a replaced module stands down. The daily check's tests include one through the real spawn path: a parent process starts the detached child and exits at once. Nothing reaches its stdout or stderr, and the child still finishes the install with a harmless fakeclaude, from the home folder.ensureRunCompanion: on 2.1.329 and 2.1.330 it installed the companion at user scope and a second run ran nothing; on 2.1.287 and 2.1.325 only--versionran.scripts/install.test.ts, the Claude Code plugin cases): 45 pass locally. The PowerShell and cmd cases run only in CI (nopwshon this machine).Not proven
/reload-pluginsor the mod's auto reload runsengine.createagain. The test kit cannot drive a reload. If it does not, a guarded 2.1.329+ session gets the companion path back after Claude Code restarts, which is what 0.29.8 gives. It is never opened twice either way.For the release note