Make subagents follow the root service tier (#41308)

## What changed

- Share the root thread's current service tier across its agent tree.
- Apply that tier to each subagent request when the selected child model supports it, including remote compaction requests.
- Propagate root service-tier updates to existing and newly spawned subagents without rewriting child-owned settings.
- Remove per-spawn and role-level service-tier overrides so routing remains controlled by the root thread.

## Testing

- Cover supported and unsupported child models, full-history forks, live tier changes, remote compaction, new subagents, and reloaded subagents.

GitOrigin-RevId: 6c299e224e90b41a558788fb7aa4d5f336fa383a
This commit is contained in:
jif authored and copyberry committed 2026-08-28 09:48:13 +00:00
1 parent 94311d4475
commit dc2ccc6843
19 files changed
+521 -274

No files matched your search

+1
View File
@@ -415,6 +415,7 @@ impl AgentControl {
CodexErr::InvalidRequest(format!("permission_profile is invalid: {err}"))
})?;
}
config.service_tier = self.root_service_tier();
if let Some(model) = stored_model {
config.model = Some(model);
}