Skip to content

Add Codex Windows hook support#1

Open
jml226 wants to merge 1 commit into
LilMGenius:mainfrom
jml226:codex-plugin-windows-hooks
Open

Add Codex Windows hook support#1
jml226 wants to merge 1 commit into
LilMGenius:mainfrom
jml226:codex-plugin-windows-hooks

Conversation

@jml226

@jml226 jml226 commented Jul 10, 2026

Copy link
Copy Markdown

Summary

  • add a Codex marketplace/plugin surface for win-hooks with SessionStart and UserPromptSubmit repair hooks
  • add Codex scanner, patcher, and verifier scripts that preserve portable command values and add commandWindows wrappers under _codex_hooks
  • harden existing Claude hook wrapper handling for JSON-escaped/unbraced CLAUDE_PLUGIN_ROOT paths and document the new Codex compatibility case

Verification

  • bash -n scripts/apply-patches scripts/find-incompatible scripts/verify scripts/codex-find-incompatible scripts/codex-apply-patches scripts/codex-verify hooks/codex-patch-all
  • ./scripts/verify
  • ./scripts/codex-verify
  • temp CODEX_HOME marketplace install of win-hooks@win-hooks
  • temp fake Codex plugin fixture: scanner found an incompatible hook, patcher added commandWindows, codex verifier passed

Notes

  • Direct push to LilMGenius/win-hooks was denied for jml226, so this PR is opened from the jml226 fork.
  • Not tested from LilMGenius/win-hooks after merge.

Codex exposes a Windows-specific commandWindows hook field, so this adds a parallel Codex plugin surface that preserves portable hook commands while adding generated Windows dispatch wrappers. The verifier also carries the wrapper-body checks needed to keep repaired hooks healthy after plugin updates.

Constraint: Codex plugin hooks use commandWindows instead of replacing command.

Constraint: Existing Claude Code hook flow must stay compatible.

Rejected: Rewrite Codex command fields like Claude hooks | would break cross-platform hook semantics.

Confidence: medium

Scope-risk: moderate

Directive: Keep Claude _hooks and Codex _codex_hooks flows separate; do not share backups or wrapper directories.

Tested: bash -n on hook scripts; scripts/verify; scripts/codex-verify; temp Codex marketplace install and fake incompatible hook patch fixture.

Not-tested: Installing from LilMGenius/win-hooks after PR merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant