mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
Track root turns across delegated Codex requests (#38232)
## 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
This commit is contained in:
@@ -184,6 +184,8 @@ pub struct Submission {
|
||||
pub trace: Option<W3cTraceContext>,
|
||||
/// Core-provided ID of the parent turn that directly initiated this submission.
|
||||
pub parent_turn_id: Option<String>,
|
||||
/// Core-provided ID of the top-level turn that causally initiated this submission.
|
||||
pub root_turn_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
|
||||
|
||||
Reference in New Issue
Block a user