Repository navigation
fix(codex): keep the hooks' state out of the plugin Codex pins - #27
Merged
Merged
Conversation
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>
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.
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 addmakes 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), andsetup removedeletes the directory. Thesweptguard 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.