You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You have signed the CLA already but the status is still pending? Let us recheck it.
Thanks for this work. Codex PreToolUse support landed on develop with #3552 (merged 2026-09-13): rtk hook codex rewrites through updatedInput, and rtk init --codex installs, reports and removes the hook in hooks.json while keeping other hooks. The hook command, installer and docs this PR adds are already covered there. Develop does not remove a legacy rtk hook claude or rtk-rewrite.sh entry that is already in Codex hooks.json, which this PR did; an issue or a narrow PR against src/hooks/init/codex.rs would be welcome. rtk hook subcommands also still run the daily telemetry ping and hook-status warning in src/main.rs, which this PR skipped; that could be a small separate PR too. If I missed something this PR covers, please comment or reopen.
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
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
rtk hook codexfor Codex PreToolUse JSON payloadspermissionDecision: "allow"withupdatedInput.commandfor transparent shell command rewriteshooks.json, preserve third-party hooks, and migrate legacy RTK Claude/shell hook entriesrtk hook ...subcommands so hook stdout stays machine-readableVerification
/opt/homebrew/bin/cargo fmt --check/opt/homebrew/bin/cargo check/opt/homebrew/bin/cargo test --all/opt/homebrew/bin/cargo clippy --all-targetsprintf '%s' '{"hook_event_name":"PreToolUse","tool_name":"Bash","tool_input":{"command":"git status"}}' | /opt/homebrew/bin/cargo run --quiet -- hook codex\n