Files
codex/codex-rs
jif 181d051417 Fix lifecycle hook dispatch for hosted subagents (#64310)
## Why

Hosted workers keep the host's session source, so hook dispatch
can mistake them for root sessions and run `SessionStart` and
`Stop` on worker turns.

## What changed

Recognize host-managed workers by their inherited session ID and
dispatch `SubagentStart` and `SubagentStop` for them. Resolve the
parent transcript for `SubagentStop` using the immediate parent
thread ID when available.

## Testing

Add a regression test that verifies a hosted worker runs only the
subagent lifecycle hooks, receives start-hook context, and reports
its own transcript and final message in the stop hook.

GitOrigin-RevId: 272d29d275120a1b020b1a00a0db2e00402ebe06
2026-11-27 11:13:25 +00:00
..
…
…
…