Skip to content

Track parent turns for nested Codex requests - #35835

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/481fdebbe7df2031880fe259509273cce50b20a8
Jul 28, 2026
Merged

Track parent turns for nested Codex requests#35835
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/481fdebbe7df2031880fe259509273cce50b20a8

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 28, 2026

Copy link
Copy Markdown

Track parent turns for nested Codex requests

What changed

  • Propagate the initiating turn ID through agent spawns, follow-up tasks, reviews, and delegated Codex sessions.
  • Add parent_turn_id to Responses client and turn metadata while keeping it out of external MCP metadata.
  • Preserve parent-turn provenance across queued agent messages when their triggering parent is unambiguous.

Testing

  • Cover spawned, resumed, nested, reviewed, delegated, and WebSocket request metadata.
  • Verify queued messages do not claim ambiguous or queue-only parent turns.

## What changed

- Propagate the initiating turn ID through agent spawns, follow-up tasks, reviews, and delegated Codex sessions.
- Add `parent_turn_id` to Responses client and turn metadata while keeping it out of external MCP metadata.
- Preserve parent-turn provenance across queued agent messages when their triggering parent is unambiguous.

## Testing

- Cover spawned, resumed, nested, reviewed, delegated, and WebSocket request metadata.
- Verify queued messages do not claim ambiguous or queue-only parent turns.

GitOrigin-RevId: 481fdebbe7df2031880fe259509273cce50b20a8
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/481fdebbe7df2031880fe259509273cce50b20a8 branch from a32f359 to 1def0a8 Compare July 28, 2026 21:59
@copyberry
copyberry Bot merged commit 1def0a8 into main Jul 28, 2026
13 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/481fdebbe7df2031880fe259509273cce50b20a8 branch July 28, 2026 22:00
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant