Files
codex/codex-rs/core/tests/suite
jif f3c6076ac2 Skip SessionEnd hooks when child threads shut down (#64000)
## Why

A hosted child thread can inherit the root session ID and use a custom
session source. The existing subagent source check can miss that child,
allowing its shutdown to fire `SessionEnd` while the root is still active.

## What changed

Before preparing `SessionEnd` hooks, skip threads whose ID does not match
the session ID.

## Testing

Extend the shutdown test to close a hosted child with an inherited
session ID before closing the root and verify that exactly one
`SessionEnd` hook invocation is logged for the session.

GitOrigin-RevId: 4c80a17724cab57003b33080482d00f3cc2afea4
2026-11-25 22:45:49 +00:00
..