fix: stop shipping no-op hooks to Codex and quote hook paths - #208
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FJrjzZB3w8B5YYrj5F8tw7
JakeRuth
marked this pull request as ready for review
August 31, 2026 23:11
cvolzer3
approved these changes
Aug 31, 2026
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
permissionDecision: "ask", and the SessionEnd hook only reads Claude Code transcripts under~/.claude.${CLAUDE_PLUGIN_ROOT}in hooks.json blocks every tool call when the plugin path contains a space #179). macOS paths underApplication Supporthit this.Changes
hooksat an emptyhooks/codex-hooks.json, which replaces Codex's default discovery ofhooks/hooks.json.hooks/hooks.jsonnow quote the path.hooks/hooks.json.Note
"hooks": []in the Codex manifest does not work on Codex 0.149.0: Codex treats it as absent and falls back tohooks/hooks.json. Pointinghooksat a file is the documented override: "If you definehooksin.codex-plugin/plugin.json, Codex uses that manifest entry instead of the defaulthooks/hooks.json." The docs do not cover an empty file. That it loads zero hooks follows from the loader and was verified on 0.149.0 (/hookslists none).Testing
Verified on Codex 0.149.0 and Claude Code, installing the plugin from a local marketplace built from this branch:
/hooksshows 2 installed. After: no gate, no warning,/hooksshows 0 installed, skills still listed.--plugin-dir: the debug log shows "Registered 2 hooks from 1 plugins" and "Loaded 137 skills from plugin posthog".CLAUDE_PLUGIN_ROOTunder a directory containing a space, the old command exits 2 (Claude's block code) and the quoted one exits 0 and returns the gate'saskdecision.Closes #179.
Context: https://posthog.slack.com/archives/C09SK2PAGKF/p1788189196906069
🤖 Agent context
Claude Code (Fable 5) drafted the change and ran the verification with the author driving each harness. Skills invoked: writing-pr-descriptions.