Repository navigation
fix(codex): do not pass exec-only hook-trust flag to app-server - #1310
Conversation
Live Codex 0.153.4 rejects --dangerously-bypass-hook-trust on app-server (exit 2), so every local interactive turn died while guardrails were on.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 769984bfce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Isolated overlay + hooks=true. Do not pass | ||
| // --dangerously-bypass-hook-trust: that flag is exec-only and | ||
| // live Codex app-server exits 2 on it (#1309). | ||
| args.push("-c", "features.hooks=true"); |
There was a problem hiding this comment.
Preserve hook trust when switching to app-server
When guardrails are enabled for either SSH/WSL here or the local overlay below, features.hooks=true only enables hook discovery; it does not trust the freshly generated hook. Using this exact overlay with Codex, hooks/list reports "trustStatus":"untrusted", while codex exec --help describes the removed option as running enabled hooks “without requiring persisted hook trust.” Removing the CLI flag without supplying app-server's supported thread override (for example, config: { bypass_hook_trust: true }) therefore silently prevents the PreToolUse guardrail from running, allowing deny-tier commands that do not trigger an approval request; the modified fake masks this by assuming app-server plus the feature flag automatically trusts hooks.
Useful? React with 👍 / 👎.
Summary
startCodexRunpassed--dangerously-bypass-hook-trusttocodex app-server. Live CLI 0.153.4 accepts that flag only onexec.CODEX_HOMEoverlay and-c features.hooks=true. Workflow/codex execstill uses the bypass flag.Fixes #1309.
Test plan
electron/test/codex.test.jsoverlay argv caseelectron/test/codex-guardrail-remote.test.jsMade with Cursor