Repository navigation
feat(claude-mod): turn the Claude Code mod on by default - #1686
Merged
Merged
Conversation
Owner
Author
|
Review follow-up in 257cd21: (1) the timer skips a launch while a hook is still waiting on it ( |
A CLI without claude-mod-plan (0.27.11+: 'Unknown command'; older: 'No plan content in hook event') now sends the session's plans to the classic review with one explanatory log line, instead of an error line and a fresh failed launch (with a leftover plan copy) on every ExitPlanMode. An old CLI's default review approval prompt is read as an LGTM and its approved-with-notes prompt as 'Approved with notes', not 'Changes requested'.
PLANNOTATOR_CLAUDE_MOD=0|false|off|disabled or { "claudeCodeMod": false }
turns it off; unset, empty or unrecognized now means on. The -p/SDK and
no-/bin/sh stand-downs are unchanged.
…hen it comes late The timer leaves a launch alone while a hook is still waiting for it to come up (no second, wrong 'stopped' line). An old CLI that refuses claude-mod-plan after the hook stopped waiting is caught by the timer: classic fallback plus a turn asking Claude to call ExitPlanMode again. The classic flag is per instance on purpose; AGENTS.md says so.
The take-over test's knob-off case used the removed 'enabled: false' option, so it ran with the mod on; it now sets PLANNOTATOR_CLAUDE_MOD=0. AGENTS.md: the default-on paragraph, env row and version-skew list name the plannotator tool and the Bash take-over.
backnotprop
force-pushed
the
feat/claude-mod-default-on
branch
from
October 4, 2026 21:40
257cd21 to
93e576c
Compare
This was referenced Oct 4, 2026
Merged
1 task
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.
Decision
The owner's call: "we just need to fully embrace it." The Claude Code mod is now on by default for every Claude Code that runs hooks modules (2.1.287+, interactive CLI). The mod still stands down by itself in
-p/ SDK sessions and where/bin/shis missing (Windows).What changes for users
/plannotator-review,/plannotator-annotate,/plannotator-last, theplannotatortool and Ask this session without setting anything. Decisions arrive later as plugin turns.PLANNOTATOR_CLAUDE_MOD=0(alsofalse/off/disabled) or{ "claudeCodeMod": false }in~/.plannotator/config.json. The env var wins.1/true/onstill force it on. An empty or unrecognized value now counts as unset, which means on.resolveClaudeCodeMod(packages/shared/config.ts) and its mirrorapps/hook/hooks/mod/enabled.tsboth default to true.enabled.test.tsstill compares the two across every env × config combination.Version skew (verified with real binaries)
The plugin installs from main and the
plannotatorbinary updates separately. With default-on, users will run the new mod against an old CLI. I ran the real mod controller (worktree source) over a Host backed by real processes and the real filesystem. In each run the released binary was first on PATH, with a temp data dir and a temp git repo. Decisions were made by POSTing to the launched server, as the browser does. Throwaway harness:/tmp/skew/harness.ts+run.sh(not committed).claude-mod-plan:Unknown command, exit 1 in ~0.3 s. Falls back to the classic blocking review (the plugin's PermissionRequest hook on the old binary; checked separately: it opens, and a deny returns the hook JSON). Before this PR: an "could not open Plan vN (exit 1): Unknown command…" log line and a failed launch with a leftover plan copy on every ExitPlanMode. Now: one explanatory line, no further probes, launch dir removed.No plan content in hook event, exit 1. Same fallback./plannotator-reviewlegacyResult). Before this PR an LGTM was delivered as "Changes requested" with the "no changes requested" prompt, and approve-with-notes was also labelled "Changes requested". Now an LGTM only logs and with-notes is "Approved with notes". Close only logs./plannotator-annotate/plannotator-lastPLANNOTATOR_HOST_MESSAGES_FILEis ignored and the newest message opens from stdin (no picker). The command line still says "2 messages, newest first" (cosmetic).plannotatortool (annotate--gate, review--base)/api/ai/bridge/poll→ 404; the bridge stops and Ask AI shows only providersSo the earlier outline's claim ("plan review fails because the old version is missing a command") was half right. The command is missing, but the mod already fell back to the classic flow. What users actually got was a scary error line on every plan, which this PR replaces with one line telling them to update the CLI. Plan review with an old CLI is blocking, not broken. CLIs older than 0.19.24 write no ready file, so commands wait their full 45 s / 15 s and say "Starting…"; decisions still arrive at exit.
Tests
bun test apps/hook packages/shared(tempPLANNOTATOR_DATA_DIR): 1774 pass, 0 failbun test apps/hook/hooks/mod: 49 pass. New tests:enabled.test.tsclaude-mod-plan(both observed stderr shapes) incontroller.test.tslegacyResultwith the observed old outputs, plus the copied default prompts pinned topackages/shared/prompts.ts, indelivery.test.tsscripts/test-claude-code-mod.sh(engine harness, Claude Code 2.1.289): 11 pass. Tests now run with no knob set (default on). The two knob-off tests usePLANNOTATOR_CLAUDE_MOD=0andclaudeCodeMod: false. New: an old CLI's ExitPlanMode reaches the classic flow twice with one launch and one log line.tsc -p apps/hook/hooks/mod/tsconfig.json: cleanclaude plugin validate apps/hook: passedStill risky with default-on
prompts.review.approvedon an old CLI still arrives as feedback ("Changes requested"): stdout cannot tell it apart.