Skip to content

fix(codex): keep the hooks' state out of the plugin Codex pins - #27

Merged
dacorvo merged 1 commit into
mainfrom
fix_codex_approval
Oct 31, 2026
Merged

dacorvo merged 1 commit into
mainfrom
fix_codex_approval

Conversation

@dacorvo

@dacorvo dacorvo commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Since openai/codex PR 54619 (Oct 16), trusting a plugin's hooks pins a hash of the plugin's whole contents, checked before each run. The hook wrote its log and the sweep's mark beside itself, in Codex's cached copy of the plugin, so the first run after a review voided it and every session asked for the review again. No funes hook has run under Codex since Oct 26.

The hook now writes to the plugin's data directory, which Codex names to its hooks as PLUGIN_DATA and keeps at
~/.codex/plugins/data/funes-huggingface, outside the plugin. The walk setup add makes keeps its mark and rows there too, so a sweep's mark reaches the next walk (Codex's cache copy kept it from doing so before), and setup remove deletes the directory. The swept guard goes from the codex setup: no earlier hook wrote a mark where the walk now looks.

The hooks test runs as Codex runs the hooks, with PLUGIN_DATA set, and checks that no run writes into the plugin.

Since openai/codex PR 54619 (Oct 16), trusting a plugin's hooks pins a
hash of the plugin's whole contents, checked before each run. The hook
wrote its log and the sweep's mark beside itself, in Codex's cached copy
of the plugin, so the first run after a review voided it and every
session asked for the review again. No funes hook has run under Codex
since Oct 26.

The hook now writes to the plugin's data directory, which Codex names
to its hooks as PLUGIN_DATA and keeps at
~/.codex/plugins/data/funes-huggingface, outside the plugin. The walk
`setup add` makes keeps its mark and rows there too, so a sweep's mark
reaches the next walk (Codex's cache copy kept it from doing so before),
and `setup remove` deletes the directory. The `swept` guard goes from
the codex setup: no earlier hook wrote a mark where the walk now looks.

The hooks test runs as Codex runs the hooks, with PLUGIN_DATA set, and
checks that no run writes into the plugin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dacorvo
dacorvo merged commit 29f2831 into main Oct 31, 2026
5 checks passed
@dacorvo dacorvo mentioned this pull request Nov 1, 2026
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