feat(codex): add native hooks integration#899
Open
sf-jin-ku wants to merge 1 commit intortk-ai:developfrom
Open
feat(codex): add native hooks integration#899sf-jin-ku wants to merge 1 commit intortk-ai:developfrom
sf-jin-ku wants to merge 1 commit intortk-ai:developfrom
Conversation
Signed-off-by: Jin Ku <jin.ku@sendbird.com>
06e614b to
93537d3
Compare
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.
Summary
PreToolUseintegration viartk hook codexrtk init --codexto patch.codex/config.tomland.codex/hooks.jsonCODEX_HOMEfor global installsProblem
rtk init --codexwas prompt-only. It wroteRTK.mdand patchedAGENTS.md, but it did not install Codex lifecycle hooks, so Codex had no hard guardrail to route supported raw Bash commands throughrtk.What changed
Hook runtime
rtk hook codexget_rewritten()permissionDecision: "deny"with the exactrtk ...replacementrtkcommandsCodex install / uninstall / show
rtk init --codexnow patches:RTK.mdAGENTS.md.codex/config.toml.codex/hooks.jsonfeatures.codex_hooks = truePreToolUsematcher group forBashrtk init --show --codexnow reports local/global Codex hook statertk init --codex --uninstallnow supports local uninstallcodex_hooks = truein place on uninstall, but remove RTK-managed hook entriesCompatibility / edge cases
CODEX_HOMEfor global Codex path resolution instead of hardcoding~/.codex.codexinstalls still depend on Codex project trustsrc/hooksandhooks/codexTest plan
cargo test --allcargo build && RTK=target/debug/rtk bash hooks/codex/test-rtk-rewrite.shNotes
Codex currently does not support transparent
updatedInputrewrites forPreToolUse, so this integration uses deny-and-retry instead of the Claude/Cursor transparent rewrite flow.