openai / openai/codex-plugin-cc
Stop hook flashes a visible console window on Windows at every turn end — consider not registering it while stopReviewGate is disabled
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Summary
On Windows, after installing the plugin, a console window flashes at the end of every Claude Code turn. Differential testing traced it to the plugin's Stop hook (scripts/stop-review-gate-hook.mjs), which hooks/hooks.json registers unconditionally — even though stopReviewGate defaults to false, making the hook a no-op that still costs a node process spawn (and a visible window flash) on every turn end.
Evidence
Process-creation monitor (300ms polling) on Windows 11, Claude Code 2.1.200, plugin v1.0.5:
- Every turn end spawns the plugin hook:
bash.exe -c "node .../stop-review-gate-hook.mjs"plus aconhost.exe. - Differential: user-defined Stop hooks from
settings.json(pwsh scripts, same spawn mechanism, running for 2 weeks / ~200 turn ends a day) do not produce a visible flash; the flashing started the day the plugin was installed and stopped immediately after removing theStopblock from the plugin's cachedhooks.json(verified over multiple turns with the monitor still recording — the settings.json hooks kept firing, no flash).
Suggested fix
Since the stop-review gate is opt-in and defaults to off, consider one of:
- Not registering the
Stophook statically inhooks.json; register/enable it only when the user enablesstopReviewGate(if the hooks API allows), or - Documenting that Windows users who keep the gate disabled can remove the
Stopblock fromhooks.jsonto avoid the per-turn flash and process spawn.
The window-flash mechanics may partly live in Claude Code's hook runner (cf. anthropics/claude-code#19012), but the plugin can avoid the cost entirely for the default-off configuration.
Environment
- codex plugin v1.0.5 (commit 80c31f9), Claude Code 2.1.200
- Windows 11, Node.js v24.16.0, Git Bash as hook shell
Related: #440 (missing windowsHide in spawnBrokerProcess() — a different spawn site, filed separately).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read hooks/hooks.json and scripts/stop-review-gate-hook.mjs first, then trace how stopReviewGate is configured and whether hook registration can depend on it. Reproduce the Windows turn-end behavior with the gate disabled and enabled. Done means the disabled default no longer causes the Stop hook process or visible flash, while the gate remains available when enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100