Add experimental context management activation (#42385)

## What changed

- Add the under-development `features.context_management.experimental_mode` configuration and schema.
- For eligible ChatGPT Plus, Pro, and Pro Lite sessions using the Codex backend, enable token-budget context, history notes, and the `new_context` tool when experimental context management is configured.
- Keep the feature disabled for custom providers, provider credentials, non-Codex endpoints, and temporary structured threads.

## Testing

- Cover subscription eligibility, backend restrictions, configuration resolution, token-budget guidance, and temporary-thread overrides.

GitOrigin-RevId: 19402af19c4d69e09a7cdb3687ee7d233f6a562a
This commit is contained in:
pmccrary-oai
2026-09-02 23:37:39 +00:00
committed by copyberry
parent 312709252d
commit cff76fa96f
11 changed files with 236 additions and 16 deletions
@@ -60,6 +60,7 @@ pub(crate) async fn start_temporary_thread(
("features.apps".to_string(), false.into()),
("features.code_mode".to_string(), false.into()),
("features.code_mode_only".to_string(), false.into()),
("features.context_management".to_string(), false.into()),
("features.current_time_reminder".to_string(), false.into()),
("features.deferred_executor".to_string(), false.into()),
("features.enable_fanout".to_string(), false.into()),