Repository navigation
Conversation
arzafran
force-pushed
the
fix/codex-hooks-in-place
branch
from
October 1, 2026 16:44
96a0809 to
bd03a72
Compare
Member
Author
4 tasks
arzafran
force-pushed
the
fix/codex-hooks-in-place
branch
from
October 1, 2026 16:45
bd03a72 to
96a0809
Compare
Member
Author
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.
What this does
Reinstalling Programa's Codex hooks no longer fails when another tool (cc-settings) has added its own hook groups after Programa's in the same event. Programa now rewrites its own handler where it already sits instead of deleting it and appending a new one at the end. Other tools' handlers keep their positions, so their Codex trust entries stay valid.
Before, a hooks.json with Programa at group 0 and cc-settings at group 1 (SessionEnd, UserPromptSubmit) failed with "would move foreign handler 0 from 1:0 to 0:0".
Behavior notes:
/hooks, which is a separate decision.test_install_refuses_to_reassign_a_foreign_positional_trust_keynow seeds a duplicate Programa group, since the old [programa, foreign] layout no longer needs a refusal.Review order
tests/test_cli_codex_hook_trust.py(first commit, new test, expected red on CI)CLI/CLI+Hooks.swiftcodexRewriteHooks(second commit, goes green)Test plan
test_reinstall_updates_programa_in_place_when_foreign_groups_follow_itpasses.