"description":"A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
"type":"string"
},
"AgentMessageContent":{
"oneOf":[
{
"properties":{
"text":{
"type":"string"
},
"type":{
"enum":[
"Text"
],
"title":"TextAgentMessageContentType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"TextAgentMessageContent",
"type":"object"
}
]
},
"AgentStatus":{
"description":"Agent lifecycle status, derived from emitted events.",
"oneOf":[
{
"description":"Agent is waiting for initialization.",
"enum":[
"pending_init"
],
"type":"string"
},
{
"description":"Agent is currently running.",
"enum":[
"running"
],
"type":"string"
},
{
"additionalProperties":false,
"description":"Agent is done. Contains the final assistant message.",
"properties":{
"completed":{
"type":[
"string",
"null"
]
}
},
"required":[
"completed"
],
"title":"CompletedAgentStatus",
"type":"object"
},
{
"additionalProperties":false,
"description":"Agent encountered an error.",
"properties":{
"errored":{
"type":"string"
}
},
"required":[
"errored"
],
"title":"ErroredAgentStatus",
"type":"object"
},
{
"description":"Agent has been shutdown.",
"enum":[
"shutdown"
],
"type":"string"
},
{
"description":"Agent is not found.",
"enum":[
"not_found"
],
"type":"string"
}
]
},
"AskForApproval":{
"description":"Determines the conditions under which the user is consulted to approve running the command proposed by Codex.",
"oneOf":[
{
"description":"Under this policy, only \"known safe\" commands—as determined by `is_safe_command()`—that **only read files** are auto‑approved. Everything else will ask the user to approve.",
"enum":[
"untrusted"
],
"type":"string"
},
{
"description":"*All* commands are auto‑approved, but they are expected to run inside a sandbox where network access is disabled and writes are confined to a specific set of paths. If the command fails, it will be escalated to the user to approve execution without a sandbox.",
"enum":[
"on-failure"
],
"type":"string"
},
{
"description":"The model decides when to ask the user for approval.",
"enum":[
"on-request"
],
"type":"string"
},
{
"description":"Never ask the user to approve commands. Failures are immediately returned to the model, and never escalated to the user for approval.",
"enum":[
"never"
],
"type":"string"
}
]
},
"ByteRange":{
"properties":{
"end":{
"description":"End byte offset (exclusive) within the UTF-8 text buffer.",
"format":"uint",
"minimum":0.0,
"type":"integer"
},
"start":{
"description":"Start byte offset (inclusive) within the UTF-8 text buffer.",
"format":"uint",
"minimum":0.0,
"type":"integer"
}
},
"required":[
"end",
"start"
],
"type":"object"
},
"CallToolResult":{
"description":"The server's response to a tool call.",
"description":"Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.",
"oneOf":[
{
"description":"Error while executing a submission",
"properties":{
"codex_error_info":{
"anyOf":[
{
"$ref":"#/definitions/CodexErrorInfo"
},
{
"type":"null"
}
],
"default":null
},
"message":{
"type":"string"
},
"type":{
"enum":[
"error"
],
"title":"ErrorEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"ErrorEventMsg",
"type":"object"
},
{
"description":"Warning issued while processing a submission. Unlike `Error`, this indicates the turn continued but the user should still be notified.",
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"warning"
],
"title":"WarningEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"WarningEventMsg",
"type":"object"
},
{
"description":"Conversation history was compacted (either automatically or manually).",
"properties":{
"type":{
"enum":[
"context_compacted"
],
"title":"ContextCompactedEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"ContextCompactedEventMsg",
"type":"object"
},
{
"description":"Conversation history was rolled back by dropping the last N user turns.",
"properties":{
"num_turns":{
"description":"Number of user turns that were removed from context.",
"format":"uint32",
"minimum":0.0,
"type":"integer"
},
"type":{
"enum":[
"thread_rolled_back"
],
"title":"ThreadRolledBackEventMsgType",
"type":"string"
}
},
"required":[
"num_turns",
"type"
],
"title":"ThreadRolledBackEventMsg",
"type":"object"
},
{
"description":"Agent has started a turn. v1 wire format uses `task_started`; accept `turn_started` for v2 interop.",
"description":"Agent has completed all actions. v1 wire format uses `task_complete`; accept `turn_complete` for v2 interop.",
"properties":{
"last_agent_message":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"task_complete"
],
"title":"TaskCompleteEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"TaskCompleteEventMsg",
"type":"object"
},
{
"description":"Usage update for the current session, including totals and last turn. Optional means unknown — UIs should not display when `None`.",
"properties":{
"info":{
"anyOf":[
{
"$ref":"#/definitions/TokenUsageInfo"
},
{
"type":"null"
}
]
},
"rate_limits":{
"anyOf":[
{
"$ref":"#/definitions/RateLimitSnapshot"
},
{
"type":"null"
}
]
},
"type":{
"enum":[
"token_count"
],
"title":"TokenCountEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"TokenCountEventMsg",
"type":"object"
},
{
"description":"Agent text output message",
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"agent_message"
],
"title":"AgentMessageEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"AgentMessageEventMsg",
"type":"object"
},
{
"description":"User/system input message (what was sent to the model)",
"properties":{
"images":{
"description":"Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.",
"items":{
"type":"string"
},
"type":[
"array",
"null"
]
},
"local_images":{
"default":[],
"description":"Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.",
"items":{
"type":"string"
},
"type":"array"
},
"message":{
"type":"string"
},
"text_elements":{
"default":[],
"description":"UI-defined spans within `message` used to render or persist special elements.",
"items":{
"$ref":"#/definitions/TextElement"
},
"type":"array"
},
"type":{
"enum":[
"user_message"
],
"title":"UserMessageEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"UserMessageEventMsg",
"type":"object"
},
{
"description":"Agent text output delta message",
"properties":{
"delta":{
"type":"string"
},
"type":{
"enum":[
"agent_message_delta"
],
"title":"AgentMessageDeltaEventMsgType",
"type":"string"
}
},
"required":[
"delta",
"type"
],
"title":"AgentMessageDeltaEventMsg",
"type":"object"
},
{
"description":"Reasoning event from agent.",
"properties":{
"text":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning"
],
"title":"AgentReasoningEventMsgType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"AgentReasoningEventMsg",
"type":"object"
},
{
"description":"Agent reasoning delta event from agent.",
"properties":{
"delta":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning_delta"
],
"title":"AgentReasoningDeltaEventMsgType",
"type":"string"
}
},
"required":[
"delta",
"type"
],
"title":"AgentReasoningDeltaEventMsg",
"type":"object"
},
{
"description":"Raw chain-of-thought from agent.",
"properties":{
"text":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning_raw_content"
],
"title":"AgentReasoningRawContentEventMsgType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"AgentReasoningRawContentEventMsg",
"type":"object"
},
{
"description":"Agent reasoning content delta event from agent.",
"description":"Result of the tool call. Note this could be an error."
},
"type":{
"enum":[
"mcp_tool_call_end"
],
"title":"McpToolCallEndEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"duration",
"invocation",
"result",
"type"
],
"title":"McpToolCallEndEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"type":"string"
},
"type":{
"enum":[
"web_search_begin"
],
"title":"WebSearchBeginEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"type"
],
"title":"WebSearchBeginEventMsg",
"type":"object"
},
{
"properties":{
"action":{
"$ref":"#/definitions/WebSearchAction"
},
"call_id":{
"type":"string"
},
"query":{
"type":"string"
},
"type":{
"enum":[
"web_search_end"
],
"title":"WebSearchEndEventMsgType",
"type":"string"
}
},
"required":[
"action",
"call_id",
"query",
"type"
],
"title":"WebSearchEndEventMsg",
"type":"object"
},
{
"description":"Notification that the server is about to execute a command.",
"properties":{
"call_id":{
"description":"Identifier so this can be paired with the ExecCommandEnd event.",
"type":"string"
},
"command":{
"description":"The command to be executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory if not the default cwd for the agent.",
"type":"string"
},
"interaction_input":{
"description":"Raw input sent to a unified exec session (if this is an interaction event).",
"type":[
"string",
"null"
]
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"process_id":{
"description":"Identifier for the underlying PTY process (when available).",
"type":[
"string",
"null"
]
},
"source":{
"allOf":[
{
"$ref":"#/definitions/ExecCommandSource"
}
],
"default":"agent",
"description":"Where the command originated. Defaults to Agent for backward compatibility."
},
"turn_id":{
"description":"Turn ID that this command belongs to.",
"type":"string"
},
"type":{
"enum":[
"exec_command_begin"
],
"title":"ExecCommandBeginEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"parsed_cmd",
"turn_id",
"type"
],
"title":"ExecCommandBeginEventMsg",
"type":"object"
},
{
"description":"Incremental chunk of output from a running command.",
"properties":{
"call_id":{
"description":"Identifier for the ExecCommandBegin that produced this chunk.",
"type":"string"
},
"chunk":{
"description":"Raw bytes from the stream (may not be valid UTF-8).",
"type":"string"
},
"stream":{
"allOf":[
{
"$ref":"#/definitions/ExecOutputStream"
}
],
"description":"Which stream produced this chunk."
},
"type":{
"enum":[
"exec_command_output_delta"
],
"title":"ExecCommandOutputDeltaEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"chunk",
"stream",
"type"
],
"title":"ExecCommandOutputDeltaEventMsg",
"type":"object"
},
{
"description":"Terminal interaction for an in-progress command (stdin sent and stdout observed).",
"properties":{
"call_id":{
"description":"Identifier for the ExecCommandBegin that produced this chunk.",
"type":"string"
},
"process_id":{
"description":"Process id associated with the running command.",
"type":"string"
},
"stdin":{
"description":"Stdin sent to the running session.",
"type":"string"
},
"type":{
"enum":[
"terminal_interaction"
],
"title":"TerminalInteractionEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"process_id",
"stdin",
"type"
],
"title":"TerminalInteractionEventMsg",
"type":"object"
},
{
"properties":{
"aggregated_output":{
"default":"",
"description":"Captured aggregated output",
"type":"string"
},
"call_id":{
"description":"Identifier for the ExecCommandBegin that finished.",
"type":"string"
},
"command":{
"description":"The command that was executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory if not the default cwd for the agent.",
"type":"string"
},
"duration":{
"allOf":[
{
"$ref":"#/definitions/Duration"
}
],
"description":"The duration of the command execution."
},
"exit_code":{
"description":"The command's exit code.",
"format":"int32",
"type":"integer"
},
"formatted_output":{
"description":"Formatted output from the command, as seen by the model.",
"type":"string"
},
"interaction_input":{
"description":"Raw input sent to a unified exec session (if this is an interaction event).",
"type":[
"string",
"null"
]
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"process_id":{
"description":"Identifier for the underlying PTY process (when available).",
"type":[
"string",
"null"
]
},
"source":{
"allOf":[
{
"$ref":"#/definitions/ExecCommandSource"
}
],
"default":"agent",
"description":"Where the command originated. Defaults to Agent for backward compatibility."
},
"stderr":{
"description":"Captured stderr",
"type":"string"
},
"stdout":{
"description":"Captured stdout",
"type":"string"
},
"turn_id":{
"description":"Turn ID that this command belongs to.",
"type":"string"
},
"type":{
"enum":[
"exec_command_end"
],
"title":"ExecCommandEndEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"duration",
"exit_code",
"formatted_output",
"parsed_cmd",
"stderr",
"stdout",
"turn_id",
"type"
],
"title":"ExecCommandEndEventMsg",
"type":"object"
},
{
"description":"Notification that the agent attached a local image via the view_image tool.",
"properties":{
"call_id":{
"description":"Identifier for the originating tool call.",
"type":"string"
},
"path":{
"description":"Local filesystem path provided to the tool.",
"type":"string"
},
"type":{
"enum":[
"view_image_tool_call"
],
"title":"ViewImageToolCallEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"path",
"type"
],
"title":"ViewImageToolCallEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Identifier for the associated exec call, if available.",
"type":"string"
},
"command":{
"description":"The command to be executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory.",
"type":"string"
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"proposed_execpolicy_amendment":{
"description":"Proposed execpolicy amendment that can be applied to allow future runs.",
"items":{
"type":"string"
},
"type":[
"array",
"null"
]
},
"reason":{
"description":"Optional human-readable reason for the approval (e.g. retry without sandbox).",
"type":[
"string",
"null"
]
},
"turn_id":{
"default":"",
"description":"Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"exec_approval_request"
],
"title":"ExecApprovalRequestEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"parsed_cmd",
"type"
],
"title":"ExecApprovalRequestEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Responses API call id for the associated tool call, if available.",
"type":"string"
},
"questions":{
"items":{
"$ref":"#/definitions/RequestUserInputQuestion"
},
"type":"array"
},
"turn_id":{
"default":"",
"description":"Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"request_user_input"
],
"title":"RequestUserInputEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"questions",
"type"
],
"title":"RequestUserInputEventMsg",
"type":"object"
},
{
"properties":{
"arguments":true,
"callId":{
"type":"string"
},
"tool":{
"type":"string"
},
"turnId":{
"type":"string"
},
"type":{
"enum":[
"dynamic_tool_call_request"
],
"title":"DynamicToolCallRequestEventMsgType",
"type":"string"
}
},
"required":[
"arguments",
"callId",
"tool",
"turnId",
"type"
],
"title":"DynamicToolCallRequestEventMsg",
"type":"object"
},
{
"properties":{
"id":{
"$ref":"#/definitions/RequestId"
},
"message":{
"type":"string"
},
"server_name":{
"type":"string"
},
"type":{
"enum":[
"elicitation_request"
],
"title":"ElicitationRequestEventMsgType",
"type":"string"
}
},
"required":[
"id",
"message",
"server_name",
"type"
],
"title":"ElicitationRequestEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Responses API call id for the associated patch apply call, if available.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"type":"object"
},
"grant_root":{
"description":"When set, the agent is asking the user to allow writes under this root for the remainder of the session.",
"type":[
"string",
"null"
]
},
"reason":{
"description":"Optional explanatory reason (e.g. request for extra write access).",
"type":[
"string",
"null"
]
},
"turn_id":{
"default":"",
"description":"Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.",
"type":"string"
},
"type":{
"enum":[
"apply_patch_approval_request"
],
"title":"ApplyPatchApprovalRequestEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"changes",
"type"
],
"title":"ApplyPatchApprovalRequestEventMsg",
"type":"object"
},
{
"description":"Notification advising the user that something they are using has been deprecated and should be phased out.",
"properties":{
"details":{
"description":"Optional extra guidance, such as migration steps or rationale.",
"type":[
"string",
"null"
]
},
"summary":{
"description":"Concise summary of what is deprecated.",
"type":"string"
},
"type":{
"enum":[
"deprecation_notice"
],
"title":"DeprecationNoticeEventMsgType",
"type":"string"
}
},
"required":[
"summary",
"type"
],
"title":"DeprecationNoticeEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"background_event"
],
"title":"BackgroundEventEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"BackgroundEventEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"undo_started"
],
"title":"UndoStartedEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"UndoStartedEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":[
"string",
"null"
]
},
"success":{
"type":"boolean"
},
"type":{
"enum":[
"undo_completed"
],
"title":"UndoCompletedEventMsgType",
"type":"string"
}
},
"required":[
"success",
"type"
],
"title":"UndoCompletedEventMsg",
"type":"object"
},
{
"description":"Notification that a model stream experienced an error or disconnect and the system is handling it (e.g., retrying with backoff).",
"properties":{
"additional_details":{
"default":null,
"description":"Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).",
"type":[
"string",
"null"
]
},
"codex_error_info":{
"anyOf":[
{
"$ref":"#/definitions/CodexErrorInfo"
},
{
"type":"null"
}
],
"default":null
},
"message":{
"type":"string"
},
"type":{
"enum":[
"stream_error"
],
"title":"StreamErrorEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"StreamErrorEventMsg",
"type":"object"
},
{
"description":"Notification that the agent is about to apply a code patch. Mirrors `ExecCommandBegin` so front‑ends can show progress indicators.",
"properties":{
"auto_approved":{
"description":"If true, there was no ApplyPatchApprovalRequest for this patch.",
"type":"boolean"
},
"call_id":{
"description":"Identifier so this can be paired with the PatchApplyEnd event.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"description":"The changes to be applied.",
"type":"object"
},
"turn_id":{
"default":"",
"description":"Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"patch_apply_begin"
],
"title":"PatchApplyBeginEventMsgType",
"type":"string"
}
},
"required":[
"auto_approved",
"call_id",
"changes",
"type"
],
"title":"PatchApplyBeginEventMsg",
"type":"object"
},
{
"description":"Notification that a patch application has finished.",
"properties":{
"call_id":{
"description":"Identifier for the PatchApplyBegin that finished.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"default":{},
"description":"The changes that were applied (mirrors PatchApplyBeginEvent::changes).",
"description":"Responses API compatible content items that can be returned by a tool call. This is a subset of ContentItem with the types we support as function call outputs.",
"description":"The payload we send back to OpenAI when reporting a tool call result.\n\n`body` serializes directly as the wire value for `function_call_output.output`. `success` remains internal metadata for downstream handling.",
"description":"Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.",
"oneOf":[
{
"description":"Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
"enum":[
"commentary"
],
"type":"string"
},
{
"description":"The assistant's terminal answer text for the current turn.",
"description":"Represents whether outbound network access is available to the agent.",
"enum":[
"restricted",
"enabled"
],
"type":"string"
},
"ParsedCommand":{
"oneOf":[
{
"properties":{
"cmd":{
"type":"string"
},
"name":{
"type":"string"
},
"path":{
"description":"(Best effort) Path to the file being read by the command. When possible, this is an absolute path, though when relative, it should be resolved against the `cwd`` that will be used to run the command to derive the absolute path.",
"type":"string"
},
"type":{
"enum":[
"read"
],
"title":"ReadParsedCommandType",
"type":"string"
}
},
"required":[
"cmd",
"name",
"path",
"type"
],
"title":"ReadParsedCommand",
"type":"object"
},
{
"properties":{
"cmd":{
"type":"string"
},
"path":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"list_files"
],
"title":"ListFilesParsedCommandType",
"type":"string"
}
},
"required":[
"cmd",
"type"
],
"title":"ListFilesParsedCommand",
"type":"object"
},
{
"properties":{
"cmd":{
"type":"string"
},
"path":{
"type":[
"string",
"null"
]
},
"query":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"search"
],
"title":"SearchParsedCommandType",
"type":"string"
}
},
"required":[
"cmd",
"type"
],
"title":"SearchParsedCommand",
"type":"object"
},
{
"properties":{
"cmd":{
"type":"string"
},
"type":{
"enum":[
"unknown"
],
"title":"UnknownParsedCommandType",
"type":"string"
}
},
"required":[
"cmd",
"type"
],
"title":"UnknownParsedCommand",
"type":"object"
}
]
},
"PlanItemArg":{
"additionalProperties":false,
"properties":{
"status":{
"$ref":"#/definitions/StepStatus"
},
"step":{
"type":"string"
}
},
"required":[
"status",
"step"
],
"type":"object"
},
"PlanType":{
"enum":[
"free",
"go",
"plus",
"pro",
"team",
"business",
"enterprise",
"edu",
"unknown"
],
"type":"string"
},
"RateLimitSnapshot":{
"properties":{
"credits":{
"anyOf":[
{
"$ref":"#/definitions/CreditsSnapshot"
},
{
"type":"null"
}
]
},
"plan_type":{
"anyOf":[
{
"$ref":"#/definitions/PlanType"
},
{
"type":"null"
}
]
},
"primary":{
"anyOf":[
{
"$ref":"#/definitions/RateLimitWindow"
},
{
"type":"null"
}
]
},
"secondary":{
"anyOf":[
{
"$ref":"#/definitions/RateLimitWindow"
},
{
"type":"null"
}
]
}
},
"type":"object"
},
"RateLimitWindow":{
"properties":{
"resets_at":{
"description":"Unix timestamp (seconds since epoch) when the window resets.",
"format":"int64",
"type":[
"integer",
"null"
]
},
"used_percent":{
"description":"Percentage (0-100) of the window that has been consumed.",
"format":"double",
"type":"number"
},
"window_minutes":{
"description":"Rolling window duration, in minutes.",
"description":"Location of the code related to a review finding.",
"properties":{
"absolute_file_path":{
"type":"string"
},
"line_range":{
"$ref":"#/definitions/ReviewLineRange"
}
},
"required":[
"absolute_file_path",
"line_range"
],
"type":"object"
},
"ReviewFinding":{
"description":"A single review finding describing an observed issue or recommendation.",
"properties":{
"body":{
"type":"string"
},
"code_location":{
"$ref":"#/definitions/ReviewCodeLocation"
},
"confidence_score":{
"format":"float",
"type":"number"
},
"priority":{
"format":"int32",
"type":"integer"
},
"title":{
"type":"string"
}
},
"required":[
"body",
"code_location",
"confidence_score",
"priority",
"title"
],
"type":"object"
},
"ReviewLineRange":{
"description":"Inclusive line range in a file associated with the finding.",
"properties":{
"end":{
"format":"uint32",
"minimum":0.0,
"type":"integer"
},
"start":{
"format":"uint32",
"minimum":0.0,
"type":"integer"
}
},
"required":[
"end",
"start"
],
"type":"object"
},
"ReviewOutputEvent":{
"description":"Structured review result produced by a child review session.",
"properties":{
"findings":{
"items":{
"$ref":"#/definitions/ReviewFinding"
},
"type":"array"
},
"overall_confidence_score":{
"format":"float",
"type":"number"
},
"overall_correctness":{
"type":"string"
},
"overall_explanation":{
"type":"string"
}
},
"required":[
"findings",
"overall_confidence_score",
"overall_correctness",
"overall_explanation"
],
"type":"object"
},
"ReviewTarget":{
"oneOf":[
{
"description":"Review the working tree: staged, unstaged, and untracked files.",
"properties":{
"type":{
"enum":[
"uncommittedChanges"
],
"title":"UncommittedChangesReviewTargetType",
"type":"string"
}
},
"required":[
"type"
],
"title":"UncommittedChangesReviewTarget",
"type":"object"
},
{
"description":"Review changes between the current branch and the given base branch.",
"properties":{
"branch":{
"type":"string"
},
"type":{
"enum":[
"baseBranch"
],
"title":"BaseBranchReviewTargetType",
"type":"string"
}
},
"required":[
"branch",
"type"
],
"title":"BaseBranchReviewTarget",
"type":"object"
},
{
"description":"Review the changes introduced by a specific commit.",
"properties":{
"sha":{
"type":"string"
},
"title":{
"description":"Optional human-readable label (e.g., commit subject) for UIs.",
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"commit"
],
"title":"CommitReviewTargetType",
"type":"string"
}
},
"required":[
"sha",
"type"
],
"title":"CommitReviewTarget",
"type":"object"
},
{
"description":"Arbitrary instructions provided by the user.",
"properties":{
"instructions":{
"type":"string"
},
"type":{
"enum":[
"custom"
],
"title":"CustomReviewTargetType",
"type":"string"
}
},
"required":[
"instructions",
"type"
],
"title":"CustomReviewTarget",
"type":"object"
}
]
},
"SandboxPolicy":{
"description":"Determines execution restrictions for model shell commands.",
"oneOf":[
{
"description":"No restrictions whatsoever. Use with caution.",
"properties":{
"type":{
"enum":[
"danger-full-access"
],
"title":"DangerFullAccessSandboxPolicyType",
"type":"string"
}
},
"required":[
"type"
],
"title":"DangerFullAccessSandboxPolicy",
"type":"object"
},
{
"description":"Read-only access to the entire file-system.",
"properties":{
"type":{
"enum":[
"read-only"
],
"title":"ReadOnlySandboxPolicyType",
"type":"string"
}
},
"required":[
"type"
],
"title":"ReadOnlySandboxPolicy",
"type":"object"
},
{
"description":"Indicates the process is already in an external sandbox. Allows full disk access while honoring the provided network setting.",
"properties":{
"network_access":{
"allOf":[
{
"$ref":"#/definitions/NetworkAccess"
}
],
"default":"restricted",
"description":"Whether the external sandbox permits outbound network traffic."
},
"type":{
"enum":[
"external-sandbox"
],
"title":"ExternalSandboxSandboxPolicyType",
"type":"string"
}
},
"required":[
"type"
],
"title":"ExternalSandboxSandboxPolicy",
"type":"object"
},
{
"description":"Same as `ReadOnly` but additionally grants write access to the current working directory (\"workspace\").",
"properties":{
"exclude_slash_tmp":{
"default":false,
"description":"When set to `true`, will NOT include the `/tmp` among the default writable roots on UNIX. Defaults to `false`.",
"type":"boolean"
},
"exclude_tmpdir_env_var":{
"default":false,
"description":"When set to `true`, will NOT include the per-user `TMPDIR` environment variable among the default writable roots. Defaults to `false`.",
"type":"boolean"
},
"network_access":{
"default":false,
"description":"When set to `true`, outbound network access is allowed. `false` by default.",
"type":"boolean"
},
"type":{
"enum":[
"workspace-write"
],
"title":"WorkspaceWriteSandboxPolicyType",
"type":"string"
},
"writable_roots":{
"description":"Additional folders (beyond cwd and possibly TMPDIR) that should be writable from within the sandbox.",
"items":{
"$ref":"#/definitions/AbsolutePathBuf"
},
"type":"array"
}
},
"required":[
"type"
],
"title":"WorkspaceWriteSandboxPolicy",
"type":"object"
}
]
},
"SkillDependencies":{
"properties":{
"tools":{
"items":{
"$ref":"#/definitions/SkillToolDependency"
},
"type":"array"
}
},
"required":[
"tools"
],
"type":"object"
},
"SkillErrorInfo":{
"properties":{
"message":{
"type":"string"
},
"path":{
"type":"string"
}
},
"required":[
"message",
"path"
],
"type":"object"
},
"SkillInterface":{
"properties":{
"brand_color":{
"type":[
"string",
"null"
]
},
"default_prompt":{
"type":[
"string",
"null"
]
},
"display_name":{
"type":[
"string",
"null"
]
},
"icon_large":{
"type":[
"string",
"null"
]
},
"icon_small":{
"type":[
"string",
"null"
]
},
"short_description":{
"type":[
"string",
"null"
]
}
},
"type":"object"
},
"SkillMetadata":{
"properties":{
"dependencies":{
"anyOf":[
{
"$ref":"#/definitions/SkillDependencies"
},
{
"type":"null"
}
]
},
"description":{
"type":"string"
},
"enabled":{
"type":"boolean"
},
"interface":{
"anyOf":[
{
"$ref":"#/definitions/SkillInterface"
},
{
"type":"null"
}
]
},
"name":{
"type":"string"
},
"path":{
"type":"string"
},
"scope":{
"$ref":"#/definitions/SkillScope"
},
"short_description":{
"description":"Legacy short_description from SKILL.md. Prefer SKILL.json interface.short_description.",
"type":[
"string",
"null"
]
}
},
"required":[
"description",
"enabled",
"name",
"path",
"scope"
],
"type":"object"
},
"SkillScope":{
"enum":[
"user",
"repo",
"system",
"admin"
],
"type":"string"
},
"SkillToolDependency":{
"properties":{
"command":{
"type":[
"string",
"null"
]
},
"description":{
"type":[
"string",
"null"
]
},
"transport":{
"type":[
"string",
"null"
]
},
"type":{
"type":"string"
},
"url":{
"type":[
"string",
"null"
]
},
"value":{
"type":"string"
}
},
"required":[
"type",
"value"
],
"type":"object"
},
"SkillsListEntry":{
"properties":{
"cwd":{
"type":"string"
},
"errors":{
"items":{
"$ref":"#/definitions/SkillErrorInfo"
},
"type":"array"
},
"skills":{
"items":{
"$ref":"#/definitions/SkillMetadata"
},
"type":"array"
}
},
"required":[
"cwd",
"errors",
"skills"
],
"type":"object"
},
"StepStatus":{
"enum":[
"pending",
"in_progress",
"completed"
],
"type":"string"
},
"TextElement":{
"properties":{
"byte_range":{
"allOf":[
{
"$ref":"#/definitions/ByteRange"
}
],
"description":"Byte range in the parent `text` buffer that this element occupies."
},
"placeholder":{
"description":"Optional human-readable placeholder for the element, displayed in the UI.",
"type":[
"string",
"null"
]
}
},
"required":[
"byte_range"
],
"type":"object"
},
"ThreadId":{
"type":"string"
},
"TokenUsage":{
"properties":{
"cached_input_tokens":{
"format":"int64",
"type":"integer"
},
"input_tokens":{
"format":"int64",
"type":"integer"
},
"output_tokens":{
"format":"int64",
"type":"integer"
},
"reasoning_output_tokens":{
"format":"int64",
"type":"integer"
},
"total_tokens":{
"format":"int64",
"type":"integer"
}
},
"required":[
"cached_input_tokens",
"input_tokens",
"output_tokens",
"reasoning_output_tokens",
"total_tokens"
],
"type":"object"
},
"TokenUsageInfo":{
"properties":{
"last_token_usage":{
"$ref":"#/definitions/TokenUsage"
},
"model_context_window":{
"format":"int64",
"type":[
"integer",
"null"
]
},
"total_token_usage":{
"$ref":"#/definitions/TokenUsage"
}
},
"required":[
"last_token_usage",
"total_token_usage"
],
"type":"object"
},
"Tool":{
"description":"Definition for a tool the client can call.",
"description":"Assistant-authored message payload used in turn-item streams.\n\n`phase` is optional because not all providers/models emit it. Consumers should use it when present, but retain legacy completion semantics when it is `None`.",
"description":"Optional phase metadata carried through from `ResponseItem::Message`.\n\nThis is currently used by TUI rendering to distinguish mid-turn commentary from a final answer and avoid status-indicator jitter."
"description":"UI-defined spans within `text` that should be treated as special elements. These are byte ranges into the UTF-8 `text` buffer and are used to render or persist rich input markers (e.g., image placeholders) across history and resume without mutating the literal text.",
"items":{
"$ref":"#/definitions/TextElement"
},
"type":"array"
},
"type":{
"enum":[
"text"
],
"title":"TextUserInputType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"TextUserInput",
"type":"object"
},
{
"description":"Pre‑encoded data: URI image.",
"properties":{
"image_url":{
"type":"string"
},
"type":{
"enum":[
"image"
],
"title":"ImageUserInputType",
"type":"string"
}
},
"required":[
"image_url",
"type"
],
"title":"ImageUserInput",
"type":"object"
},
{
"description":"Local image path provided by the user. This will be converted to an `Image` variant (base64 data URL) during request serialization.",
"properties":{
"path":{
"type":"string"
},
"type":{
"enum":[
"local_image"
],
"title":"LocalImageUserInputType",
"type":"string"
}
},
"required":[
"path",
"type"
],
"title":"LocalImageUserInput",
"type":"object"
},
{
"description":"Skill selected by the user (name + path to SKILL.md).",
"properties":{
"name":{
"type":"string"
},
"path":{
"type":"string"
},
"type":{
"enum":[
"skill"
],
"title":"SkillUserInputType",
"type":"string"
}
},
"required":[
"name",
"path",
"type"
],
"title":"SkillUserInput",
"type":"object"
},
{
"description":"Explicit mention selected by the user (name + app://connector id).",
"properties":{
"name":{
"type":"string"
},
"path":{
"type":"string"
},
"type":{
"enum":[
"mention"
],
"title":"MentionUserInputType",
"type":"string"
}
},
"required":[
"name",
"path",
"type"
],
"title":"MentionUserInput",
"type":"object"
}
]
},
"WebSearchAction":{
"oneOf":[
{
"properties":{
"queries":{
"items":{
"type":"string"
},
"type":[
"array",
"null"
]
},
"query":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"search"
],
"title":"SearchWebSearchActionType",
"type":"string"
}
},
"required":[
"type"
],
"title":"SearchWebSearchAction",
"type":"object"
},
{
"properties":{
"type":{
"enum":[
"open_page"
],
"title":"OpenPageWebSearchActionType",
"type":"string"
},
"url":{
"type":[
"string",
"null"
]
}
},
"required":[
"type"
],
"title":"OpenPageWebSearchAction",
"type":"object"
},
{
"properties":{
"pattern":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"find_in_page"
],
"title":"FindInPageWebSearchActionType",
"type":"string"
},
"url":{
"type":[
"string",
"null"
]
}
},
"required":[
"type"
],
"title":"FindInPageWebSearchAction",
"type":"object"
},
{
"properties":{
"type":{
"enum":[
"other"
],
"title":"OtherWebSearchActionType",
"type":"string"
}
},
"required":[
"type"
],
"title":"OtherWebSearchAction",
"type":"object"
}
]
}
},
"description":"Response event from the agent NOTE: Make sure none of these values have optional types, as it will mess up the extension code-gen.",
"oneOf":[
{
"description":"Error while executing a submission",
"properties":{
"codex_error_info":{
"anyOf":[
{
"$ref":"#/definitions/CodexErrorInfo"
},
{
"type":"null"
}
],
"default":null
},
"message":{
"type":"string"
},
"type":{
"enum":[
"error"
],
"title":"ErrorEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"ErrorEventMsg",
"type":"object"
},
{
"description":"Warning issued while processing a submission. Unlike `Error`, this indicates the turn continued but the user should still be notified.",
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"warning"
],
"title":"WarningEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"WarningEventMsg",
"type":"object"
},
{
"description":"Conversation history was compacted (either automatically or manually).",
"properties":{
"type":{
"enum":[
"context_compacted"
],
"title":"ContextCompactedEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"ContextCompactedEventMsg",
"type":"object"
},
{
"description":"Conversation history was rolled back by dropping the last N user turns.",
"properties":{
"num_turns":{
"description":"Number of user turns that were removed from context.",
"format":"uint32",
"minimum":0.0,
"type":"integer"
},
"type":{
"enum":[
"thread_rolled_back"
],
"title":"ThreadRolledBackEventMsgType",
"type":"string"
}
},
"required":[
"num_turns",
"type"
],
"title":"ThreadRolledBackEventMsg",
"type":"object"
},
{
"description":"Agent has started a turn. v1 wire format uses `task_started`; accept `turn_started` for v2 interop.",
"description":"Agent has completed all actions. v1 wire format uses `task_complete`; accept `turn_complete` for v2 interop.",
"properties":{
"last_agent_message":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"task_complete"
],
"title":"TaskCompleteEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"TaskCompleteEventMsg",
"type":"object"
},
{
"description":"Usage update for the current session, including totals and last turn. Optional means unknown — UIs should not display when `None`.",
"properties":{
"info":{
"anyOf":[
{
"$ref":"#/definitions/TokenUsageInfo"
},
{
"type":"null"
}
]
},
"rate_limits":{
"anyOf":[
{
"$ref":"#/definitions/RateLimitSnapshot"
},
{
"type":"null"
}
]
},
"type":{
"enum":[
"token_count"
],
"title":"TokenCountEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"TokenCountEventMsg",
"type":"object"
},
{
"description":"Agent text output message",
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"agent_message"
],
"title":"AgentMessageEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"AgentMessageEventMsg",
"type":"object"
},
{
"description":"User/system input message (what was sent to the model)",
"properties":{
"images":{
"description":"Image URLs sourced from `UserInput::Image`. These are safe to replay in legacy UI history events and correspond to images sent to the model.",
"items":{
"type":"string"
},
"type":[
"array",
"null"
]
},
"local_images":{
"default":[],
"description":"Local file paths sourced from `UserInput::LocalImage`. These are kept so the UI can reattach images when editing history, and should not be sent to the model or treated as API-ready URLs.",
"items":{
"type":"string"
},
"type":"array"
},
"message":{
"type":"string"
},
"text_elements":{
"default":[],
"description":"UI-defined spans within `message` used to render or persist special elements.",
"items":{
"$ref":"#/definitions/TextElement"
},
"type":"array"
},
"type":{
"enum":[
"user_message"
],
"title":"UserMessageEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"UserMessageEventMsg",
"type":"object"
},
{
"description":"Agent text output delta message",
"properties":{
"delta":{
"type":"string"
},
"type":{
"enum":[
"agent_message_delta"
],
"title":"AgentMessageDeltaEventMsgType",
"type":"string"
}
},
"required":[
"delta",
"type"
],
"title":"AgentMessageDeltaEventMsg",
"type":"object"
},
{
"description":"Reasoning event from agent.",
"properties":{
"text":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning"
],
"title":"AgentReasoningEventMsgType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"AgentReasoningEventMsg",
"type":"object"
},
{
"description":"Agent reasoning delta event from agent.",
"properties":{
"delta":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning_delta"
],
"title":"AgentReasoningDeltaEventMsgType",
"type":"string"
}
},
"required":[
"delta",
"type"
],
"title":"AgentReasoningDeltaEventMsg",
"type":"object"
},
{
"description":"Raw chain-of-thought from agent.",
"properties":{
"text":{
"type":"string"
},
"type":{
"enum":[
"agent_reasoning_raw_content"
],
"title":"AgentReasoningRawContentEventMsgType",
"type":"string"
}
},
"required":[
"text",
"type"
],
"title":"AgentReasoningRawContentEventMsg",
"type":"object"
},
{
"description":"Agent reasoning content delta event from agent.",
"description":"Result of the tool call. Note this could be an error."
},
"type":{
"enum":[
"mcp_tool_call_end"
],
"title":"McpToolCallEndEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"duration",
"invocation",
"result",
"type"
],
"title":"McpToolCallEndEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"type":"string"
},
"type":{
"enum":[
"web_search_begin"
],
"title":"WebSearchBeginEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"type"
],
"title":"WebSearchBeginEventMsg",
"type":"object"
},
{
"properties":{
"action":{
"$ref":"#/definitions/WebSearchAction"
},
"call_id":{
"type":"string"
},
"query":{
"type":"string"
},
"type":{
"enum":[
"web_search_end"
],
"title":"WebSearchEndEventMsgType",
"type":"string"
}
},
"required":[
"action",
"call_id",
"query",
"type"
],
"title":"WebSearchEndEventMsg",
"type":"object"
},
{
"description":"Notification that the server is about to execute a command.",
"properties":{
"call_id":{
"description":"Identifier so this can be paired with the ExecCommandEnd event.",
"type":"string"
},
"command":{
"description":"The command to be executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory if not the default cwd for the agent.",
"type":"string"
},
"interaction_input":{
"description":"Raw input sent to a unified exec session (if this is an interaction event).",
"type":[
"string",
"null"
]
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"process_id":{
"description":"Identifier for the underlying PTY process (when available).",
"type":[
"string",
"null"
]
},
"source":{
"allOf":[
{
"$ref":"#/definitions/ExecCommandSource"
}
],
"default":"agent",
"description":"Where the command originated. Defaults to Agent for backward compatibility."
},
"turn_id":{
"description":"Turn ID that this command belongs to.",
"type":"string"
},
"type":{
"enum":[
"exec_command_begin"
],
"title":"ExecCommandBeginEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"parsed_cmd",
"turn_id",
"type"
],
"title":"ExecCommandBeginEventMsg",
"type":"object"
},
{
"description":"Incremental chunk of output from a running command.",
"properties":{
"call_id":{
"description":"Identifier for the ExecCommandBegin that produced this chunk.",
"type":"string"
},
"chunk":{
"description":"Raw bytes from the stream (may not be valid UTF-8).",
"type":"string"
},
"stream":{
"allOf":[
{
"$ref":"#/definitions/ExecOutputStream"
}
],
"description":"Which stream produced this chunk."
},
"type":{
"enum":[
"exec_command_output_delta"
],
"title":"ExecCommandOutputDeltaEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"chunk",
"stream",
"type"
],
"title":"ExecCommandOutputDeltaEventMsg",
"type":"object"
},
{
"description":"Terminal interaction for an in-progress command (stdin sent and stdout observed).",
"properties":{
"call_id":{
"description":"Identifier for the ExecCommandBegin that produced this chunk.",
"type":"string"
},
"process_id":{
"description":"Process id associated with the running command.",
"type":"string"
},
"stdin":{
"description":"Stdin sent to the running session.",
"type":"string"
},
"type":{
"enum":[
"terminal_interaction"
],
"title":"TerminalInteractionEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"process_id",
"stdin",
"type"
],
"title":"TerminalInteractionEventMsg",
"type":"object"
},
{
"properties":{
"aggregated_output":{
"default":"",
"description":"Captured aggregated output",
"type":"string"
},
"call_id":{
"description":"Identifier for the ExecCommandBegin that finished.",
"type":"string"
},
"command":{
"description":"The command that was executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory if not the default cwd for the agent.",
"type":"string"
},
"duration":{
"allOf":[
{
"$ref":"#/definitions/Duration"
}
],
"description":"The duration of the command execution."
},
"exit_code":{
"description":"The command's exit code.",
"format":"int32",
"type":"integer"
},
"formatted_output":{
"description":"Formatted output from the command, as seen by the model.",
"type":"string"
},
"interaction_input":{
"description":"Raw input sent to a unified exec session (if this is an interaction event).",
"type":[
"string",
"null"
]
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"process_id":{
"description":"Identifier for the underlying PTY process (when available).",
"type":[
"string",
"null"
]
},
"source":{
"allOf":[
{
"$ref":"#/definitions/ExecCommandSource"
}
],
"default":"agent",
"description":"Where the command originated. Defaults to Agent for backward compatibility."
},
"stderr":{
"description":"Captured stderr",
"type":"string"
},
"stdout":{
"description":"Captured stdout",
"type":"string"
},
"turn_id":{
"description":"Turn ID that this command belongs to.",
"type":"string"
},
"type":{
"enum":[
"exec_command_end"
],
"title":"ExecCommandEndEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"duration",
"exit_code",
"formatted_output",
"parsed_cmd",
"stderr",
"stdout",
"turn_id",
"type"
],
"title":"ExecCommandEndEventMsg",
"type":"object"
},
{
"description":"Notification that the agent attached a local image via the view_image tool.",
"properties":{
"call_id":{
"description":"Identifier for the originating tool call.",
"type":"string"
},
"path":{
"description":"Local filesystem path provided to the tool.",
"type":"string"
},
"type":{
"enum":[
"view_image_tool_call"
],
"title":"ViewImageToolCallEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"path",
"type"
],
"title":"ViewImageToolCallEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Identifier for the associated exec call, if available.",
"type":"string"
},
"command":{
"description":"The command to be executed.",
"items":{
"type":"string"
},
"type":"array"
},
"cwd":{
"description":"The command's working directory.",
"type":"string"
},
"parsed_cmd":{
"items":{
"$ref":"#/definitions/ParsedCommand"
},
"type":"array"
},
"proposed_execpolicy_amendment":{
"description":"Proposed execpolicy amendment that can be applied to allow future runs.",
"items":{
"type":"string"
},
"type":[
"array",
"null"
]
},
"reason":{
"description":"Optional human-readable reason for the approval (e.g. retry without sandbox).",
"type":[
"string",
"null"
]
},
"turn_id":{
"default":"",
"description":"Turn ID that this command belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"exec_approval_request"
],
"title":"ExecApprovalRequestEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"command",
"cwd",
"parsed_cmd",
"type"
],
"title":"ExecApprovalRequestEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Responses API call id for the associated tool call, if available.",
"type":"string"
},
"questions":{
"items":{
"$ref":"#/definitions/RequestUserInputQuestion"
},
"type":"array"
},
"turn_id":{
"default":"",
"description":"Turn ID that this request belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"request_user_input"
],
"title":"RequestUserInputEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"questions",
"type"
],
"title":"RequestUserInputEventMsg",
"type":"object"
},
{
"properties":{
"arguments":true,
"callId":{
"type":"string"
},
"tool":{
"type":"string"
},
"turnId":{
"type":"string"
},
"type":{
"enum":[
"dynamic_tool_call_request"
],
"title":"DynamicToolCallRequestEventMsgType",
"type":"string"
}
},
"required":[
"arguments",
"callId",
"tool",
"turnId",
"type"
],
"title":"DynamicToolCallRequestEventMsg",
"type":"object"
},
{
"properties":{
"id":{
"$ref":"#/definitions/RequestId"
},
"message":{
"type":"string"
},
"server_name":{
"type":"string"
},
"type":{
"enum":[
"elicitation_request"
],
"title":"ElicitationRequestEventMsgType",
"type":"string"
}
},
"required":[
"id",
"message",
"server_name",
"type"
],
"title":"ElicitationRequestEventMsg",
"type":"object"
},
{
"properties":{
"call_id":{
"description":"Responses API call id for the associated patch apply call, if available.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"type":"object"
},
"grant_root":{
"description":"When set, the agent is asking the user to allow writes under this root for the remainder of the session.",
"type":[
"string",
"null"
]
},
"reason":{
"description":"Optional explanatory reason (e.g. request for extra write access).",
"type":[
"string",
"null"
]
},
"turn_id":{
"default":"",
"description":"Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility with older senders.",
"type":"string"
},
"type":{
"enum":[
"apply_patch_approval_request"
],
"title":"ApplyPatchApprovalRequestEventMsgType",
"type":"string"
}
},
"required":[
"call_id",
"changes",
"type"
],
"title":"ApplyPatchApprovalRequestEventMsg",
"type":"object"
},
{
"description":"Notification advising the user that something they are using has been deprecated and should be phased out.",
"properties":{
"details":{
"description":"Optional extra guidance, such as migration steps or rationale.",
"type":[
"string",
"null"
]
},
"summary":{
"description":"Concise summary of what is deprecated.",
"type":"string"
},
"type":{
"enum":[
"deprecation_notice"
],
"title":"DeprecationNoticeEventMsgType",
"type":"string"
}
},
"required":[
"summary",
"type"
],
"title":"DeprecationNoticeEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":"string"
},
"type":{
"enum":[
"background_event"
],
"title":"BackgroundEventEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"BackgroundEventEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":[
"string",
"null"
]
},
"type":{
"enum":[
"undo_started"
],
"title":"UndoStartedEventMsgType",
"type":"string"
}
},
"required":[
"type"
],
"title":"UndoStartedEventMsg",
"type":"object"
},
{
"properties":{
"message":{
"type":[
"string",
"null"
]
},
"success":{
"type":"boolean"
},
"type":{
"enum":[
"undo_completed"
],
"title":"UndoCompletedEventMsgType",
"type":"string"
}
},
"required":[
"success",
"type"
],
"title":"UndoCompletedEventMsg",
"type":"object"
},
{
"description":"Notification that a model stream experienced an error or disconnect and the system is handling it (e.g., retrying with backoff).",
"properties":{
"additional_details":{
"default":null,
"description":"Optional details about the underlying stream failure (often the same human-readable message that is surfaced as the terminal error if retries are exhausted).",
"type":[
"string",
"null"
]
},
"codex_error_info":{
"anyOf":[
{
"$ref":"#/definitions/CodexErrorInfo"
},
{
"type":"null"
}
],
"default":null
},
"message":{
"type":"string"
},
"type":{
"enum":[
"stream_error"
],
"title":"StreamErrorEventMsgType",
"type":"string"
}
},
"required":[
"message",
"type"
],
"title":"StreamErrorEventMsg",
"type":"object"
},
{
"description":"Notification that the agent is about to apply a code patch. Mirrors `ExecCommandBegin` so front‑ends can show progress indicators.",
"properties":{
"auto_approved":{
"description":"If true, there was no ApplyPatchApprovalRequest for this patch.",
"type":"boolean"
},
"call_id":{
"description":"Identifier so this can be paired with the PatchApplyEnd event.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"description":"The changes to be applied.",
"type":"object"
},
"turn_id":{
"default":"",
"description":"Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type":"string"
},
"type":{
"enum":[
"patch_apply_begin"
],
"title":"PatchApplyBeginEventMsgType",
"type":"string"
}
},
"required":[
"auto_approved",
"call_id",
"changes",
"type"
],
"title":"PatchApplyBeginEventMsg",
"type":"object"
},
{
"description":"Notification that a patch application has finished.",
"properties":{
"call_id":{
"description":"Identifier for the PatchApplyBegin that finished.",
"type":"string"
},
"changes":{
"additionalProperties":{
"$ref":"#/definitions/FileChange"
},
"default":{},
"description":"The changes that were applied (mirrors PatchApplyBeginEvent::changes).",