Repository navigation
Report Codex hook readiness and document managed activation - #211
Stephen Belanger (Qard) wants to merge 1 commit into
Conversation
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: 3f136c6e82
ℹ️ 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 (@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 (@codex) address that feedback".
| "subagentStart", | ||
| "subagentStop", | ||
| "stop", | ||
| ]; |
There was a problem hiding this comment.
Include Interrupt in managed hook readiness
When a user cancels an active turn, Codex dispatches the separate Interrupt lifecycle event rather than Stop; Codex 0.163.0 includes it in the official hook registry. Because this required-event list and the new managed-policy recipe omit Interrupt, the freshly flushed turn_aborted transcript record is not observed until some later hook, leaving interrupted turn, LLM, and tool spans open when the session remains idle while doctor still reports trusted. Use source-specific requirements so managed capture includes Interrupt (and the managed-only SessionEnd) without treating the existing packaged plugin as incomplete.
Useful? React with 👍 / 👎.
| } else if readiness.trusted_count == readiness.hook_count { | ||
| (CodexHookState::Trusted, "Braintrust hook definitions are enabled and trusted for this working directory. This does not confirm hook execution or Braintrust delivery.") |
There was a problem hiding this comment.
Reject simultaneous plugin and managed capture
If an administrator deploys the managed policy before every user removes the installed plugin—or a later bt trace enable codex reinstalls it—selected contains both complete hook sets and this condition reports Trusted. Codex explicitly loads all matching hooks from multiple sources, so each lifecycle event is forwarded twice; this is exactly the duplicate-capture state the new deployment guide tells users to avoid. Detect the simultaneous plugin and managed definitions and report a configuration error or warning instead of readiness.
Useful? React with 👍 / 👎.
Codex skips untrusted or modified plugin hooks before Braintrust receives events, so a successful plugin installation can leave tracing inactive. Make that activation boundary visible in setup/update output and
bt trace doctor codex.Doctor now starts a bounded, read-only Codex app-server probe for the current working directory and inspects
config/read,hooks/list, and localplugin/listresults. It reports missing installation/hooks, disabled configuration, pending review, configuration errors, trusted definitions, or an unknown/unsupported inspection state. The probe limits response bytes, times out after five seconds, and reaps its child. Trusted definitions explicitly do not establish capture or delivery.Codex CLI 0.163.0 exposes hook trust through
hooks/listbut its generated app-server protocol has no hook-approval method. Preserve user review through/hooks, keep marketplace definitions unchanged, and document the supported administrator-managed hook policy for enterprise activation. The recipe includes all lifecycle events and avoids duplicate plugin/managed capture. No private trust-file mutation or invocation-wide bypass is introduced.SDK-583
Validation on macOS:
git diff --check, and managed-policy TOML parsing passed.No live enterprise policy rollout or end-to-end Braintrust delivery is claimed by these checks. Runtime deployment requires updating and releasing the embedding
btCLI; distribution documentation ships through the normal Codex plugin release process.