CodexGo is a small policy layer for Codex PermissionRequest hooks. It lets Codex auto-approve low-risk shell approvals, deny known-dangerous patterns, and fall back to the normal Codex prompt when no rule matches.
Changelog | Current stable release: v0.1.4
Install CodexGo on macOS:
curl -fsSL https://raw.githubusercontent.com/fengzdadi/codexgo/main/install.sh | shVerify the install:
codexgo version
codexgo doctor
codexgo explain "git status"Install the hook for this project:
codexgo init --scope projectOr install it globally for your Codex user config:
codexgo init --scope userStart a new Codex session after running init so Codex reloads hooks.
If you want Codex to work with fewer permission interruptions, enable the go profile for your workspace:
codexgo go --scope projectIn go profile, CodexGo allows most simple development commands, still asks for sensitive commands such as git push, and denies dangerous commands such as rm -rf /.
For compound commands such as cmd1 && cmd2 or cmd1 | cmd2, CodexGo checks each segment. If any segment asks or denies, the whole command asks or denies; if every segment is allowed, the whole command is allowed. Commands that write files through redirection or downloads still ask.
Return to manual mode with:
codexgo manual --scope projectProfile behavior at a glance:
flowchart LR
command["Codex asks to run a command"]
command --> manual["manual profile"]
manual --> manualRule{"explicit rule?"}
manualRule -->|allow| manualAllow["allow"]
manualRule -->|ask| manualAsk["ask Codex user"]
manualRule -->|deny| manualDeny["deny"]
manualRule -->|no match| manualAsk
command --> go["go profile"]
go --> goRisk{"risk match?"}
goRisk -->|dangerous| goDeny["deny"]
goRisk -->|sensitive| goAsk["ask Codex user"]
goRisk -->|simple unmatched| goAllow["allow"]
goRisk -->|compound command| goSegments["check each segment"]
goSegments -->|any ask| goAsk
goSegments -->|any deny| goDeny
goSegments -->|all allow| goAllow
Add explicit rules:
codexgo allow --scope project "git add"
codexgo ask --scope project "git push"
codexgo deny --scope user "git reset --hard"
codexgo remove --scope project "git push"Inspect decisions:
codexgo profile
codexgo doctor
codexgo explain "git commit -m test"
codexgo list
codexgo suggest
codexgo suggest --limit 5suggest reads recent audit logs and recommends explicit rules for repeated prompts. It shows up to 10 suggestions by default; use --limit to change the output count. It only prints suggested commands; it does not change policy files.
When explain shows a go profile decision, it prints project override commands. For example, if git push asks by default, codexgo allow --scope project "git push" overrides that profile decision for the current repo.
Codex App can ask for approval many times during ordinary development. CodexGo installs a hook handler before the approval prompt:
Codex PermissionRequest -> codexgo decide -> allow / deny / no decision
No decision means Codex keeps its normal approval dialog.
CodexGo only handles Codex PermissionRequest hooks. It does not disable operating system permissions, Git protections, network authentication, or any separate sandbox layer outside Codex hooks.
codexgo init --scope project
codexgo go --scope project
codexgo explain "npm install react"
codexgo explain "git push"
codexgo explain "rm -rf /"Example outcomes:
npm install react -> allow
git push -> ask
rm -rf / -> deny