objectiveai_sdk/agent/codex_sdk/continuation.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)]
5#[schemars(rename = "agent.codex_sdk.Continuation")]
6pub struct Continuation {
7 pub upstream: super::Upstream,
8 /// Full slash-separated lineage of the agent this continuation
9 /// belongs to (e.g. `A/B/agtcpl-<uuid>-<created>`). Minted on the
10 /// agent's first spawn and preserved verbatim across every
11 /// continuation round so the agent's identity stays stable
12 /// regardless of who resumes the conversation.
13 pub agent_instance_hierarchy: String,
14 pub thread_id: String,
15 pub mcp_sessions: indexmap::IndexMap<String, String>,
16 /// Per-agent reverse-attach session id baked into this agent's
17 /// `client_objectiveai_mcp` proxy URL path segment. Persisted
18 /// across continuation resumes so the proxy URLs stored in
19 /// `mcp_sessions` keep matching the registered WS reverse-attach
20 /// route. `None` when this agent never used `client_objectiveai_mcp`.
21 #[serde(default, skip_serializing_if = "Option::is_none")]
22 #[schemars(extend("omitempty" = true))]
23 pub ws_session_id: Option<String>,
24}