mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
Use step environment snapshots for subagent inheritance (#55331)
## What changed - Remove `subagent_thread_environments` and the separate configured environment bindings. Spawned agents inherit the invoking step's environment snapshot. - Retain environment selections across child eviction without retaining executor bindings. Reload V2 children against the parent's captured environments, requiring matching environment IDs, working directories, and workspace roots while preserving permission validation. GitOrigin-RevId: d820c63ea20f5834ed88071d16c60683f2545406
This commit is contained in:
@@ -23,7 +23,6 @@ use crate::session::session::SessionConfiguration;
|
||||
use crate::session::session::SessionSettingsUpdate;
|
||||
|
||||
/// Defaults for environments that inherit their configuration from the running turn.
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct ThreadEnvironmentDefaults {
|
||||
pub(crate) common: EnvironmentConfig,
|
||||
// Chosen once when the session starts; it does not apply to remote environments.
|
||||
@@ -350,11 +349,6 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
if update_future {
|
||||
self.services
|
||||
.turn_environments
|
||||
.update_configured_selections(&future);
|
||||
}
|
||||
state.session_configuration.environments = future;
|
||||
if update_current {
|
||||
// Invalidate MCP before installed configuration can wake a waiting turn.
|
||||
|
||||
Reference in New Issue
Block a user