mirror of
https://github.com/openai/codex.git
synced 2026-11-19 22:30:42 +00:00
Render host-owned V2 subagent rosters in environment context (#59531)
## What changed - Expose `AgentSessionReader` and `AgentRef` for read-only access to host-owned agent session membership. - Read direct children when rendering V2 environment context, using the existing roster size limits. Refresh membership when rebuilding context after compaction, and omit the roster if the provider is absent or the read fails. - Preserve unrecorded initial input across suspension or interruption while waiting for a roster read. Resolve the roster before advancing the compaction window. ## Testing Add coverage for roster refreshes after compaction, unchanged environments avoiding extra reads, unavailable rosters, recoverable input during blocked reads, and stale compaction results rejected after a concurrent history replacement. GitOrigin-RevId: 3c7e3822af09e9295d405e53dabb87b020c8f00c
This commit is contained in:
@@ -86,8 +86,8 @@ pub(crate) struct RunningTask {
|
||||
pub(crate) handle: AbortOnDropHandle<()>,
|
||||
pub(crate) turn_context: Arc<TurnContext>,
|
||||
pub(crate) _agent_execution_guard: Option<AgentExecutionGuard>,
|
||||
/// Initial input still owned by Core while the host decides whether the task may run.
|
||||
pub(crate) pending_admission_input: Option<Vec<TurnInput>>,
|
||||
/// Unrecorded input retained during host admission or preparation that can wait on the roster.
|
||||
pub(crate) pending_initial_input: Option<Vec<TurnInput>>,
|
||||
pub(crate) _diagnostics_guard: GaugeGuard,
|
||||
// Timer recorded when the task drops to capture the full turn duration.
|
||||
pub(crate) _timer: Option<codex_otel::Timer>,
|
||||
|
||||
Reference in New Issue
Block a user