Skip to content

Track root turns across delegated Codex requests - #38232

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/60057db2ee81f4efefa946a9f63c74ff98b93929
Aug 12, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/60057db2ee81f4efefa946a9f63c74ff98b93929

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Track root turns across delegated Codex requests

Why

parent_turn_id identifies the immediate caller of a nested request, but not the
top-level turn that initiated a multi-level chain of work.

What changed

  • Add root_turn_id to turn state, submissions, and Responses API metadata.
  • Propagate the root through spawned agents, delegated work, review sessions, and
    turn-triggering inter-agent messages.
  • Omit the root when background work has no user turn or combined input makes the
    root ambiguous.

Testing

Added coverage for nested agent resumes, reviews, mailbox delivery, steered input,
and reserved metadata handling.

## Why

`parent_turn_id` identifies the immediate caller of a nested request, but not the
top-level turn that initiated a multi-level chain of work.

## What changed

- Add `root_turn_id` to turn state, submissions, and Responses API metadata.
- Propagate the root through spawned agents, delegated work, review sessions, and
  turn-triggering inter-agent messages.
- Omit the root when background work has no user turn or combined input makes the
  root ambiguous.

## Testing

Added coverage for nested agent resumes, reviews, mailbox delivery, steered input,
and reserved metadata handling.

GitOrigin-RevId: 60057db2ee81f4efefa946a9f63c74ff98b93929
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/60057db2ee81f4efefa946a9f63c74ff98b93929 branch from 1910f3d to 1f4ea79 Compare August 12, 2026 18:12
@copyberry
copyberry Bot merged commit 1f4ea79 into main Aug 12, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/60057db2ee81f4efefa946a9f63c74ff98b93929 branch August 12, 2026 18:13
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 12, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 1f4ea798 Deployed Aug 12, 2026 by jamiojala via Identify potential duplicates (all issues) #37474
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.

6 participants