From 6ad0f79ae45aa76bba4853ed90e6b25fa5d77e53 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 25 Aug 2026 16:38:48 -0700 Subject: [PATCH] fix(codex): suppress under-development features warning in chat (#129493) Codex 0.149 emits a session-configure warning whenever UnderDevelopment-stage features are enabled, and OpenClaw always enables features.code_mode and features.apply_patch_streaming_events for native code mode threads. The warning relays into chat as a SYSTEM card telling operators to edit the managed codex-home config.toml they should never touch. Send suppress_unstable_features_warning: true in the same thread-config block that enables those features. When native code mode is off, OpenClaw does not send the flag, so warnings for user-enabled under-development features still surface. The general warning relay is untouched. Verified live against the pinned @openai/codex 0.149.1 app-server binary: thread/start without the flag emits the exact warning; with it, none. --- extensions/codex/src/app-server/side-question.test.ts | 1 + .../codex/src/app-server/thread-lifecycle.binding.test.ts | 1 + extensions/codex/src/app-server/thread-lifecycle.test.ts | 8 ++++++++ extensions/codex/src/app-server/thread-requests.ts | 3 +++ .../discord-group-codex-message-tool.md | 2 ++ .../telegram-direct-codex-message-tool.md | 2 ++ .../telegram-heartbeat-codex-tool.md | 2 ++ 7 files changed, 19 insertions(+) diff --git a/extensions/codex/src/app-server/side-question.test.ts b/extensions/codex/src/app-server/side-question.test.ts index e4609d7fdb52..ce60a68b8f6c 100644 --- a/extensions/codex/src/app-server/side-question.test.ts +++ b/extensions/codex/src/app-server/side-question.test.ts @@ -675,6 +675,7 @@ describe("runCodexAppServerSideQuestion", () => { "features.code_mode": true, "features.code_mode_only": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); diff --git a/extensions/codex/src/app-server/thread-lifecycle.binding.test.ts b/extensions/codex/src/app-server/thread-lifecycle.binding.test.ts index ecb416ecdf33..54bd82d04a34 100644 --- a/extensions/codex/src/app-server/thread-lifecycle.binding.test.ts +++ b/extensions/codex/src/app-server/thread-lifecycle.binding.test.ts @@ -120,6 +120,7 @@ const DEFAULT_CODEX_RUNTIME_THREAD_CONFIG = { "features.code_mode": true, "features.code_mode_only": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", } as const; diff --git a/extensions/codex/src/app-server/thread-lifecycle.test.ts b/extensions/codex/src/app-server/thread-lifecycle.test.ts index 7cd73c217622..ae868ee4c9b2 100644 --- a/extensions/codex/src/app-server/thread-lifecycle.test.ts +++ b/extensions/codex/src/app-server/thread-lifecycle.test.ts @@ -1500,6 +1500,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -1647,6 +1648,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.multi_agent": false, "features.standalone_web_search": false, web_search: "cached", @@ -1777,6 +1779,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -1801,6 +1804,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -1861,6 +1865,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -1941,6 +1946,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -1976,6 +1982,7 @@ describe("Codex app-server native code mode config", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }); @@ -2180,6 +2187,7 @@ describe("Codex app-server turn params", () => { "features.goals": false, "tools.update_plan.enabled": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, "features.standalone_web_search": false, web_search: "cached", }, diff --git a/extensions/codex/src/app-server/thread-requests.ts b/extensions/codex/src/app-server/thread-requests.ts index 216506cb9093..e38b3c48a50d 100644 --- a/extensions/codex/src/app-server/thread-requests.ts +++ b/extensions/codex/src/app-server/thread-requests.ts @@ -36,10 +36,13 @@ import { resolveCodexWebSearchPlan, type CodexNativeWebSearchSupport } from "./w export const CODEX_RING_ZERO_BASE_INSTRUCTIONS = ""; // Stream structured patch snapshots so large generated edits keep the turn active. +// OpenClaw opts into these under-development features deliberately, so silence +// Codex's chat warning that tells operators to edit the managed codex-home config. const CODEX_CODE_MODE_THREAD_CONFIG: JsonObject = { "features.code_mode": true, "features.code_mode_only": false, "features.apply_patch_streaming_events": true, + suppress_unstable_features_warning: true, }; const CODEX_GOAL_CONTINUATION_DISABLED_THREAD_CONFIG: JsonObject = { diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md index 1039eb9eed08..8509eb2cdcba 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/discord-group-codex-message-tool.md @@ -70,6 +70,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" }, @@ -114,6 +115,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md index 239cac03a3bb..f3012a6847f2 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-direct-codex-message-tool.md @@ -70,6 +70,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" }, @@ -114,6 +115,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" }, diff --git a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md index 0cc38824bc69..7433ad6e9a28 100644 --- a/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md +++ b/test/fixtures/agents/prompt-snapshots/codex-runtime-happy-path/telegram-heartbeat-codex-tool.md @@ -70,6 +70,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" }, @@ -115,6 +116,7 @@ "features.goals": false, "features.standalone_web_search": false, "project_doc_max_bytes": 131072, + "suppress_unstable_features_warning": true, "tools.update_plan.enabled": false, "web_search": "cached" },