From 1ad439782105b01de82445a8806ccaa243271a97 Mon Sep 17 00:00:00 2001 From: rka-oai Date: Wed, 12 Aug 2026 17:44:01 +0000 Subject: [PATCH] Add a flag to retain client developer messages (#38227) ## What changed - Register `retain_client_developer_messages` as an under-development feature that is disabled by default. - Expose the feature in the configuration schema. GitOrigin-RevId: dc56c48fe79a9f288b7fe0a11d97af992d36797f --- codex-rs/core/config.schema.json | 6 ++++++ codex-rs/features/src/lib.rs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 9d9816fce7..05528ce3f1 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -696,6 +696,9 @@ "responses_websockets_v2": { "type": "boolean" }, + "retain_client_developer_messages": { + "type": "boolean" + }, "rollout_budget": { "$ref": "#/definitions/FeatureToml_for_RolloutBudgetConfigToml" }, @@ -5335,6 +5338,9 @@ "responses_websockets_v2": { "type": "boolean" }, + "retain_client_developer_messages": { + "type": "boolean" + }, "rollout_budget": { "$ref": "#/definitions/FeatureToml_for_RolloutBudgetConfigToml" }, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index 0977e7d7f5..31cb6afe37 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -279,6 +279,8 @@ pub enum Feature { PreventIdleSleep, /// Enable remote compaction v2 over the normal Responses API. RemoteCompactionV2, + /// Retain client-authored developer messages across compacted context windows. + RetainClientDeveloperMessages, /// Use Agent Identity for ChatGPT-authenticated sessions. UseAgentIdentity, /// Enable workspace dependency support. @@ -1454,6 +1456,12 @@ pub const FEATURES: &[FeatureSpec] = &[ stage: Stage::Stable, default_enabled: true, }, + FeatureSpec { + id: Feature::RetainClientDeveloperMessages, + key: "retain_client_developer_messages", + stage: Stage::UnderDevelopment, + default_enabled: false, + }, FeatureSpec { id: Feature::UseAgentIdentity, key: "use_agent_identity",