Repository navigation
Add OPEN_PLAN_ANNOTATOR_SKIP_FILE to bypass the hook - #9
Merged
Merged
Conversation
While the file named by OPEN_PLAN_ANNOTATOR_SKIP_FILE exists, the ExitPlanMode hook exits 0 with no output, so Claude Code falls back to its native plan approval. The file is checked on every call, so the bypass can be toggled mid session, e.g. while driving a session through Remote Control where the local browser UI is unreachable and the hook would otherwise block plan approval. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
When the runtime exits before the wrapper finishes writing the hook payload to its stdin, the write fails with EPIPE. The stream had no error listener, so Node crashed with exit 1 instead of reaching the close handler, which exits 2 with a diagnosis. Exit 1 is a non-blocking hook error, so the plan silently skipped review. This is the Linux CI failure in the wrapper test on main. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
plain-thinh-tran
commented
Oct 5, 2026
| env: childEnv, | ||
| }); | ||
|
|
||
| child.stdin.on("error", () => {}); |
Contributor
Author
There was a problem hiding this comment.
this fixes a test that is also faiing on main
ndom91
approved these changes
Oct 6, 2026
ndom91
left a comment
Owner
There was a problem hiding this comment.
Just out of curiosity, how do you use this with claude remote? i.e. what would you set OPEN_PLAN_ANNOTATOR_SKIP_FILE to?
Contributor
Author
|
@ndom91 I launch Claude through a small wrapper that starts Remote Control on demand. It sets OPEN_PLAN_ANNOTATOR_SKIP_FILE and creates the file when Remote Control connects and deletes it when it disconnects. I had to do it this way because im still using conductor and the small wrapper allows me to use RC from within conductor :D |
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.
Problem
When a Claude Code session is continued from another device through Remote Control, plans can't be approved. The
ExitPlanModehook opens the UI onlocalhoston the host machine and blocks until it gets a decisionChange
New env var
OPEN_PLAN_ANNOTATOR_SKIP_FILE. While the file it names exists, the wrapper exits 0 in hook mode with no output, before resolving the runtime, so Claude Code falls back to its native plan approval. It's a file instead of a plain env var because the hook's environment is fixed when the session startsshared/skipHook.mjs: the check, plus unit testsbin/open-plan-annotator.mjs: skip in hook mode only;reviewand other CLI modes are unaffected