Repository navigation
Surface Codex hook activation failures and accept null feature values - #339
Conversation
Codex 0.172.0 returns `features.network_proxy = null` from `config/read`, which failed to deserialize into `BTreeMap<String, bool>` and aborted hook activation. Only the `hooks`/`codex_hooks` toggles are now interpreted. Activation errors now inline their cause chain, and both app-server probes capture the tail of Codex's stderr so failures such as an older Codex rejecting `--no-daemon` explain themselves instead of reporting only the generic activation message. Fixes SDK-992 Fixes SDK-990
Codex Review Summary: ✅ CompletedThis 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. |
💡 Codex Reviewbraintrust-coding-agent-plugins/bt-daemon/src/codex_hooks/config.rs Lines 14 to 15 in c61e04a The root AGENTS.md reference: AGENTS.md:L46-L53 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Per AGENTS.md, known config fields must not be read from serde_json::Value. Unrelated feature entries are skipped by Serde instead.
|
Addressed in 106f9a7: |
Stephen Belanger (Qard)
left a comment
There was a problem hiding this comment.
Generally LGTM, but CI failures need addressing.
Hook activation (`bt trace install/update codex`) was never exercised against a real Codex, so Codex 0.172.0's `features.network_proxy = null` reached users. The new ignored test installs the plugin into an isolated CODEX_HOME and requires full activation; CI runs it against the latest Codex on Linux, macOS, and Windows. It fails on main with the SDK-992 error. Also record the lesson in AGENTS.md (model only the agent-owned fields we read) and the add-coding-agent-setup skill (surface agent errors; add a real-agent contract test for setup protocols).
Fixes SDK-992 and SDK-990. Both show up as the same unexplained
Codex plugin installed, but hook activation failed, but they have different causes.SDK-992: null feature values
Codex 0.172.0's
config/readreturnsfeatures.network_proxy = null.Config.featureswas aBTreeMap<String, bool>, so deserialization failed before bt checked the plugin or the hooks.featuresnow models only the typedhooks/codex_hookstoggles as optional booleans, and Serde skips every other feature entry.SDK-990: hidden errors
btprints only that line.activateandrun_trust_override) now capture the last 4 KiB of Codex's stderr and add it to the error. Before, stderr wasStdio::null(). The pipe is drained continuously, so Codex can't block on a full stderr buffer. An older Codex that rejects--no-daemonnow produces:Preventing a repeat
codex_hooks::tests::activation_succeeds_against_real_codexinstalls the plugin into an isolatedCODEX_HOMEand requiresactivate()to fully succeed against a real Codex. CI runs it in the daemon job against the latest Codex on Linux, macOS, and Windows. It needs no credentials and takes about 1.5 s. Onmainit fails with the SDK-992 error.activate()now delegates toactivate_with(command)so the test can choose the binary and home.BTreeMap<String, bool>.add-coding-agent-setupskill: surface agent errors and stderr, and add a real-agent contract test for setup protocols.Tests
features, andhooks: false/codex_hooks: false.codexscript that rejects--no-daemonmakesrun_trust_overridereport its stderr.Manually ran
activate()against real Codex binaries, using an isolated emptyCODEX_HOME:mainhook activation failed: invalid Codex result: invalid type: null, expected a booleanconfig/readand stops at the expectedplugin is not installed and enabledcheckhook activation failed: Codex closed the probe streamCodex stderr: error: unexpected argument '--no-daemon' found ...A default 0.172.0 config already reports
features.network_proxy = null, so every 0.172.0 user hits SDK-992.