Add an opt-in feature for subagent model context defaults (#52659)

## What changed

Add the disabled-by-default `subagent_default_context_limits` feature and expose it in the configuration schema. When enabled, shared configuration for spawning and resuming subagents clears inherited `model_context_window` and `model_auto_compact_token_limit` overrides so subagents use their model's default context window and auto-compaction threshold.

GitOrigin-RevId: 5168ae2b4fbe72c533d8c6152922a8bceb2c5cbd
This commit is contained in:
Henry Levy
2026-10-09 17:48:50 +00:00
committed by copyberry
parent 89c8759d8c
commit 8a0437ff34
3 changed files with 22 additions and 0 deletions
+8
View File
@@ -225,6 +225,8 @@ pub enum Feature {
ModelCatalogInContext,
/// Inherit client-defined dynamic tools in fresh V2 subagents.
MultiAgentV2DynamicTools,
/// Use each subagent model's default context window and auto-compaction threshold.
SubagentDefaultContextLimits,
/// Keep sampling through reasoning and commentary boundaries when agent mail arrives.
/// Pending mail is delivered at the next normal input boundary instead.
DeferMailboxPreemption,
@@ -1464,6 +1466,12 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::SubagentDefaultContextLimits,
key: "subagent_default_context_limits",
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::DeferMailboxPreemption,
key: "defer_mailbox_preemption",