feat(codex): route shell commands through plugin hooks#2063
Open
AZ-LL wants to merge 2 commits into
Open
Conversation
Add an RTK Codex plugin package with bundled skill guidance, hook lifecycle configuration, and a thin launcher that delegates Codex PreToolUse payloads to the native RTK hook processor. Teach rtk init --codex to install local and global plugin packages, register marketplace entries, report plugin and feature state, and uninstall only RTK-managed plugin or legacy guidance state. Add native rtk hook codex handling for Bash rewrites with fail-open behavior, supported allow-with-updatedInput responses, and tests for plugin packaging, lifecycle migration, unsupported inputs, heredocs, and missing RTK executables.
This was referenced May 24, 2026
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.
Add Codex plugin integration
Target branch: upstream
developSummary
RTK.mdplusAGENTS.mdsetup with a packaged RTK Codex plugin..codex-plugin/plugin.json,skills/rtk/SKILL.md, andhooks/hooks.json.rtk hook codexhandling for CodexPreToolUseBash payloads.rtk init --codex,rtk init -g --codex,rtk init --codex --show, andrtk init --codex --uninstallto manage the plugin lifecycle.develop.Behavior
rtk gain.PreToolUsehook rewrites supported Bash commands such asgit statustortk git status.rtk hook codexon Linux/macOS andrtk.exe hook codexthroughcommandWindowson native Windows.RTK_EXEcan be set beforertk init --codexto write an explicit executable path into the installed hook config.Bashtool payloads; the matcher name does not imply that native Windows needs a Unix shell launcher.rtk hook codexignores empty input, malformed JSON, non-Bash tools, missing commands, unsupported commands, already-RTK commands, and heredocs.Safety
permissionDecision: "allow"withupdatedInput.command; RTK does not emit unsupportedpermissionDecision: "ask"rewrites.RTK.mdcontent and itsAGENTS.mdreference.Validation
cargo test codex: 26 passed, 0 failed.cargo fmt --all -- --check: pass.cargo build: pass.rtk git status.commandWindows, and install-timeRTK_EXEoverride rendering.cargo clippy --all-targets: pass.cargo test --all: 1945 passed, 0 failed, 6 ignored.git diff --check: pass.