Allow history and notes without experimental context capability (#47625)

## Why

Enabling `features.token_budget.use_history_notes_extension`, explicitly or through model defaults, rejected session startup when the model lacked `supports_experimental_context`, even with experimental mode disabled.

## What changed

Remove that startup restriction so token-budget history and notes can be used independently of the model's experimental context capability.

## Testing

Extend core tests to cover explicit configuration and model defaults on startup and cold resume, checking `new_context`, token-budget contexts, and `history_ingest_requested` metadata. Add app-server coverage for native history and notes tools and context-window hints without experimental context capability.

GitOrigin-RevId: 6157479aeb75ffd785b8d4b2f48b11c6f46e8f35
This commit is contained in:
pmccrary-oai
2026-09-23 18:54:02 +00:00
committed by copyberry
parent f07b26c9c9
commit fdeaa6c1ec
3 changed files with 56 additions and 44 deletions
-10
View File
@@ -726,16 +726,6 @@ impl Session {
&model_info,
)?;
token_budget::apply_model_defaults(Arc::make_mut(&mut config), &model_info);
if config
.token_budget
.as_ref()
.is_some_and(|token_budget| token_budget.use_history_notes_extension)
&& !model_info.supports_experimental_context
{
return Err(CodexErr::InvalidRequest(format!(
"features.token_budget.use_history_notes_extension is not supported by model `{model}`; disable it or select a model that supports experimental context"
)));
}
}
let configured_config = Arc::clone(&config);
let multi_agent_version = config.multi_agent_version_override().or_else(|| {