Files
jif e389b2444c Add configured thread environment inheritance for subagents (#55375)
## Why

Temporary environment attachments for a parent turn should not become a
subagent's persistent environments. Children also need to retain their
configured executor bindings when their runtime is evicted and reloaded.

## What changed

- Add the disabled-by-default `subagent_thread_environments` feature flag.
  When enabled, both subagent implementations inherit configured thread
  environments captured with the invoking step, excluding turn-only attachments.
- Track configured bindings separately from active turn attachments, preserving
  pending configuration ownership and sharing completed executor startup.
- Retain configured selections and bindings across idle eviction. Reload children
  using retained bindings when the parent changes workspace, while continuing to
  validate current parent roots and permissions for matching workspaces.

## Testing

Extend regression coverage for configured, empty, forked, pending, and legacy
inheritance; temporary attachment removal across eviction; and reload behavior
with changed workspaces, deferred startup, and restricted permissions.

GitOrigin-RevId: 15692ecd99deb38002014b44fd859d793bd54373
2026-10-19 20:30:44 +00:00
..