mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
## Why Reconstructing a thread session from the primary session could carry over another thread's fork parent and cached parent title. ## What changed Use the target thread's `forked_from_id` when reconstructing sessions from `thread/read` responses and `ThreadStarted` notifications. Clear the cached parent title when the parent changes, and treat absent or invalid parent IDs as no parent. ## Testing Extend the session reconstruction test to cover replacing an inherited fork parent and clearing inherited fork metadata for a thread with no parent, while retaining coverage of active permission settings. GitOrigin-RevId: 860779b40dc21fb4cc2ec1ac392523da5e439a94