From cecca783dbf171dd4937c65cee8d612bee76e382 Mon Sep 17 00:00:00 2001 From: zk <> Date: Wed, 2 Sep 2026 02:29:09 +0800 Subject: [PATCH 1/2] fix(codex): opt into update_plan so the plan card survives 0.152.0 codex 0.152.0 made the update_plan tool opt-in. UpdatePlanToolConfig lost its default = "default_true" and now defaults to false (openai/codex a9519cbc, "Make the update_plan tool opt-in" #41744 -- the same commit flips default: true to default: false under that key in codex-rs/core/config.schema.json). The model is therefore never offered the tool, no plan notification is emitted, and AionUi's plan card stays permanently empty. This is not theoretical: 0.152.0 is npm's current latest, and we do not pin the user's CLI, so anyone who updates codex loses plan rendering with no error anywhere. Measured, not inferred. Running the single live test against each binary through its own PATH shim: 0.151.0 live_codex_produces_a_plan 2/2 pass 0.152.0 live_codex_produces_a_plan 2/2 fail -- no `plan` frame in the stream With the override, 0.152.0 passes and the frame is back. Proven with a wrapper shim that records every invocation, because the installed codex on this machine is 0.148.0 -- where update_plan is still default-on -- so a shim that failed to take would have produced a passing test against the wrong binary: INVOKED ver=codex-cli 0.152.0 argv=app-server -c shell_environment_policy.inherit=all -c shell_environment_policy.include_only=[] -c tools.update_plan.enabled=true Full codex live suite with the fix: 11/11 against 0.152.0, 484s, 58 recorded invocations, all of them the candidate and all carrying the override. The override rides in the existing compatibility block, so it applies to both initial open and idle wake, and it is harmless on older releases which already defaulted it to true. The two argv assertions were updated rather than loosened -- they still assert the full expected argv, which is what makes them able to catch a dropped override. --- .../aionui-session/src/backend/codex_conn.rs | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/crates/aionui-session/src/backend/codex_conn.rs b/crates/aionui-session/src/backend/codex_conn.rs index aac22b9cb..4b82953ce 100644 --- a/crates/aionui-session/src/backend/codex_conn.rs +++ b/crates/aionui-session/src/backend/codex_conn.rs @@ -45,17 +45,34 @@ use crate::event::{CancelReason, ProvisioningPhase, SessionEvent, StopReason, Su use futures_util::stream::{BoxStream, StreamExt}; const CODEX_CONFIG_FLAG: &str = "-c"; + +/// codex 0.152.0 made the `update_plan` tool opt-in: `UpdatePlanToolConfig` +/// lost its `default = "default_true"` and now defaults to `false` +/// (openai/codex a9519cbc, "Make the update_plan tool opt-in" #41744, verified: +/// the same commit flips `default: true` to `default: false` under this key in +/// `codex-rs/core/config.schema.json`). +/// +/// Without this override the model is never offered the tool, so no plan +/// notification is ever emitted and AionUi's plan card stays permanently empty +/// on codex >= 0.152.0. Measured with the live suite: 0.151.0 passes +/// `live_codex_produces_a_plan` 2/2, 0.152.0 fails it 2/2 with no `plan` frame +/// in the stream at all. +/// +/// Harmless on older releases, which already defaulted this to true. +const CODEX_UPDATE_PLAN_ENABLED: &str = "tools.update_plan.enabled=true"; const CODEX_ENV_POLICY_INHERIT_ALL: &str = "shell_environment_policy.inherit=all"; const CODEX_ENV_POLICY_CLEAR_INCLUDE_ONLY: &str = "shell_environment_policy.include_only=[]"; /// Config overrides that make Codex command-execution children inherit the /// runtime environment injected into the app-server process. -pub fn codex_shell_environment_policy_args() -> [&'static str; 4] { +pub fn codex_shell_environment_policy_args() -> [&'static str; 6] { [ CODEX_CONFIG_FLAG, CODEX_ENV_POLICY_INHERIT_ALL, CODEX_CONFIG_FLAG, CODEX_ENV_POLICY_CLEAR_INCLUDE_ONLY, + CODEX_CONFIG_FLAG, + CODEX_UPDATE_PLAN_ENABLED, ] } @@ -8215,6 +8232,8 @@ mod tests { "shell_environment_policy.inherit=all", "-c", "shell_environment_policy.include_only=[]", + "-c", + "tools.update_plan.enabled=true", ], "every app-server spawn must explicitly propagate the parent environment to commandExecution shells" ); @@ -9428,6 +9447,8 @@ mod tests { "shell_environment_policy.inherit=all", "-c", "shell_environment_policy.include_only=[]", + "-c", + "tools.update_plan.enabled=true", ], "wake must restore the same explicit commandExecution environment policy as the initial spawn" ); From d4b45c43ea87ea13bdb0936722357b98f6aee09f Mon Sep 17 00:00:00 2001 From: zk <> Date: Wed, 2 Sep 2026 02:57:06 +0800 Subject: [PATCH 2/2] fix(codex): carry the update_plan override into the ACP launch path too codex_shell_environment_policy_args is pub and has a second consumer outside this crate -- acp_launch_policy.rs:83 extends the codex-acp.js argv with it -- so widening the helper changed that path's argv as well and its assertion went red in CI. The override belongs there: it is the same codex binary and the same benefit, so plan cards survive 0.152.0 on the ACP path as well as on the direct app-server one. Checked that this does not break older installs before widening the reach: every codex on this machine accepts the key, 0.148.0 included. Starting each with `app-server -c tools.update_plan.enabled=true` produces no unknown-key or invalid-config error on 0.148.0, 0.151.0 or 0.152.0 -- the only output is the expected JSONRPC EOF from the empty stdin the check feeds it. The key predates the default flip; only its default changed. The assertion was extended, not loosened. --- crates/aionui-ai-agent/src/factory/acp_launch_policy.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/aionui-ai-agent/src/factory/acp_launch_policy.rs b/crates/aionui-ai-agent/src/factory/acp_launch_policy.rs index 3e3d12352..9ff58469b 100644 --- a/crates/aionui-ai-agent/src/factory/acp_launch_policy.rs +++ b/crates/aionui-ai-agent/src/factory/acp_launch_policy.rs @@ -178,6 +178,8 @@ mod tests { "-c", "shell_environment_policy.include_only=[]", "-c", + "tools.update_plan.enabled=true", + "-c", "sandbox_mode=\"danger-full-access\"", "-c", "windows.sandbox=\"unelevated\"",