One of the following:
AgentSessionMessage { id, content, phase, 4 more }

A user or assistant message recorded in a session.

id: string | null

The ID of this item, or null for legacy user messages whose ID was not recorded.

minLength0

The content of the message. User messages contain input text or images; assistant messages contain output text.

minItems0
maxItems2000
One of the following:
MessageContentResourceInputText { text, type }

Text supplied by the user.

text: string

The text supplied by the user.

minLength0
type: "input_text"

The type of the object. Always input_text.

MessageContentResourceInputImage { image_url, type }

An image supplied by the user.

image_url: string

The URL of the image supplied by the user, which may be a base64-encoded data URL.

minLength0
type: "input_image"

The type of the object. Always input_image.

MessageContentResourceOutputText { text, type }

Text produced by the assistant.

text: string

The text produced by the assistant.

minLength0
type: "output_text"

The type of the object. Always output_text.

phase: "commentary" | "final_answer" | null

The phase of an assistant message. Null for user messages.

One of the following:
"commentary"

Commentary produced while the agent works.

"final_answer"

The agent’s final answer.

role: "user" | "assistant"

The role of the message author.

One of the following:
"user"
"assistant"

The status of the message. User messages are always completed.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "message"

The item type. Always message.

AgentReasoningItem { id, status, summary, 2 more }

A reasoning item produced by the agent.

id: string

The ID of the reasoning item.

minLength0
status: AgentOutputItemStatus | null

The status of the reasoning item.

summary: Array<SummaryText { text, type } >

The reasoning summaries produced by the agent.

minItems0
maxItems2000
text: string

The reasoning summary text.

minLength0
type: "summary_text"

The content type. Always summary_text.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "reasoning"

The item type. Always reasoning.

AgentFunctionCallItem { id, arguments, call_id, 4 more }

A function call produced by the agent.

id: string

The ID of the function call item.

minLength0
arguments: unknown

The arguments to pass to the function.

call_id: string

The ID used to submit the function result.

minLength0
name: string

The name of the function to call.

minLength0

The status of the function call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "function_call"

The item type. Always function_call.

FunctionCallOutputItemResource { id, call_id, error, 4 more }

The result supplied for a function call.

id: string

The ID of the function call output item.

minLength0
call_id: string

The ID of the function call that produced this output.

minLength0
error: string | null

The error message, if the call failed.

minLength0

The function result, if the call succeeded.

The status of the function call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "function_call_output"

The item type. Always function_call_output.

AgentMessageItemResource { id, content, recipient_agent_id, 3 more }

A message exchanged between agent threads.

id: string

The ID of the message.

minLength0
content: Array<AgentContent>

The content exchanged between the agents.

minItems0
maxItems2000
One of the following:
OutputText { text, type }

A text content part produced by the agent.

text: string

The text produced by the agent.

minLength0
type: "output_text"

The content type. Always output_text.

EncryptedContentResource { encrypted_content, type }

Encrypted content exchanged between agents.

encrypted_content: string

The encrypted content payload.

minLength0
type: "encrypted_content"

The content type. Always encrypted_content.

recipient_agent_id: string

The ID or name of the receiving agent.

minLength0
sender_agent_id: string

The ID or name of the sending agent.

minLength0
turn_id: string

The ID of the turn that contains this item.

minLength0
type: "agent_message"

The item type. Always agent_message.

AgentMcpCallItem { id, arguments, error, 6 more }

A call to a tool on an MCP server.

id: string

The ID of the MCP call item.

minLength0
arguments: unknown

The arguments passed to the MCP tool.

error: unknown

The error returned by the MCP tool, if any.

name: string

The name of the MCP tool.

minLength0
output: unknown

The output returned by the MCP tool, if any.

server_label: string

The label of the MCP server.

minLength0

The status of the MCP tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "mcp_call"

The item type. Always mcp_call.

ComputerUseCallItemResource { id, output, status, 3 more }

One execution of the platform-provided computer-use capability.

id: string

The ID of the activity item.

minLength0
output: Output | null

The last screenshot emitted by the model. Null when screenshot inclusion is disabled or the call emitted no screenshot.

image_url: string

The complete JPEG image as a base64 data URL.

minLength0
type: "computer_screenshot"

The content type. Always computer_screenshot.

The execution status of the activity.

title: string | null

A model-generated description of the activity, when available.

minLength0
turn_id: string

The ID of the turn that contains this item.

minLength0
type: "computer_use_call"

The item type. Always computer_use_call.

BrowserAuthenticationRequestItemResource { id, request, request_id, 2 more }

A credential-free history record of the emitted login request.

id: string

The stable history item ID.

minLength0
request: Request { credential_origin, fields, options, 2 more }

A registered form awaiting the application’s response.

credential_origin: string | null

The registered form or frame origin where values will be entered.

minLength0
fields: Array<Field>

Controls to render. All submitted values are sensitive.

minItems0
maxItems2000
id: string

The field ID to submit as field_id in a fields entry.

minLength0
label: string

The label to display beside the control.

minLength0
required: boolean

Whether this control requires a nonempty value.

type: string

The rendering type, such as email, password, or text.

minLength0
options: Array<Option>

Sign-in methods. Empty for a plain form.

minItems0
maxItems2000
id: string

The option ID to submit as selected_option.

minLength0
field_ids: Array<string>

IDs from the registered fields that this method accepts.

minItems0
maxItems2000
label: string

The method label to display.

minLength0
reason: string | null

Why the agent needs the user to sign in.

minLength0
type: "browser_authentication"

The type of the object. Always browser_authentication.

request_id: string
minLength0
turn_id: string
minLength0
type: "computer_use_approval_request"

The item type. Always computer_use_approval_request.

ComputerUseApprovalRequestResultItemResource { id, request_id, response, 2 more }

A credential-free record of an admitted response, not proof of completion.

id: string

The stable history item ID.

minLength0
request_id: string

The registered request answered by this item.

minLength0
response: ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource { action, selected_option, type } | ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource { action, type }

The admitted response, without submitted credential values.

One of the following:
ComputerUseApprovalResponseKindResourceBrowserAuthenticationSubmitResource { action, selected_option, type }
action: "submit"
selected_option: string | null

The chosen sign-in method, or null when no options were offered.

minLength0
type: "browser_authentication"
ComputerUseApprovalResponseKindResourceBrowserAuthenticationCancelResource { action, type }
action: "cancel"
type: "browser_authentication"
turn_id: string

The ID of the turn that contains this item.

minLength0
type: "computer_use_approval_request_result"
AgentWebSearchCallItem { id, action, status, 2 more }

A web search call produced by the agent.

id: string

The ID of the web search call.

minLength0
action: WebSearchAction | null

The action performed by the web search tool.

The status of the web search call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "web_search_call"

The item type. Always web_search_call.

AgentCommandExecutionItem { id, command, cwd, 6 more }

A command execution produced by the agent.

id: string

The ID of the command execution item.

minLength0
command: string

The command that was executed.

minLength0
cwd: string | null

The working directory used to execute the command.

minLength0
duration_ms: number | null

The command duration in milliseconds.

formatint64
exit_code: number | null

The process exit code, if the command completed.

formatint64
output: string | null

The command output, if available.

minLength0

The status of the command execution.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "command_execution"

The item type. Always command_execution.

AgentCreateSubagentCallItem { id, agent_id, content, 5 more }

A request to spawn a subagent.

id: string

The ID of the tool call item.

minLength0
agent_id: string

The ID of the agent that requested the subagent.

minLength0
content: Array<AgentContent>

The task given to the spawned agent.

minItems0
maxItems2000
One of the following:
OutputText { text, type }

A text content part produced by the agent.

text: string

The text produced by the agent.

minLength0
type: "output_text"

The content type. Always output_text.

EncryptedContentResource { encrypted_content, type }

Encrypted content exchanged between agents.

encrypted_content: string

The encrypted content payload.

minLength0
type: "encrypted_content"

The content type. Always encrypted_content.

model: string | null

The model requested for the spawned agent.

minLength0
reasoning_effort: string | null

The reasoning effort requested for the spawned agent.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "create_subagent_call"

The item type. Always create_subagent_call.

AgentSendSubagentInputCallItem { id, content, recipient_agent_id, 4 more }

A request to send input to another agent.

id: string

The ID of the tool call item.

minLength0
content: Array<AgentContent>

The input sent to the receiving agent.

minItems0
maxItems2000
One of the following:
OutputText { text, type }

A text content part produced by the agent.

text: string

The text produced by the agent.

minLength0
type: "output_text"

The content type. Always output_text.

EncryptedContentResource { encrypted_content, type }

Encrypted content exchanged between agents.

encrypted_content: string

The encrypted content payload.

minLength0
type: "encrypted_content"

The content type. Always encrypted_content.

recipient_agent_id: string

The ID of the agent receiving the input.

minLength0
sender_agent_id: string

The ID of the agent sending the input.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "send_subagent_input_call"

The item type. Always send_subagent_input_call.

AgentResumeSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to resume a subagent.

id: string

The ID of the tool call item.

minLength0
recipient_agent_id: string

The ID of the agent to resume.

minLength0
sender_agent_id: string

The ID of the agent requesting the resume.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "resume_subagent_call"

The item type. Always resume_subagent_call.

AgentWaitForSubagentsCallItem { id, recipient_agent_ids, sender_agent_id, 3 more }

A request to wait for one or more subagents.

id: string

The ID of the tool call item.

minLength0
recipient_agent_ids: Array<string>

The IDs of the agents to wait for.

minItems0
maxItems2000
sender_agent_id: string

The ID of the agent waiting for results.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "wait_for_subagents_call"

The item type. Always wait_for_subagents_call.

AgentInterruptSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to interrupt a subagent’s current turn. The subagent remains available.

id: string

The ID of the tool call item.

minLength0
recipient_agent_id: string

The ID of the agent to interrupt.

minLength0
sender_agent_id: string

The ID of the agent requesting the interrupt.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "interrupt_subagent_call"

The item type. Always interrupt_subagent_call.

AgentCloseSubagentCallItem { id, recipient_agent_id, sender_agent_id, 3 more }

A request to close a subagent.

id: string

The ID of the tool call item.

minLength0
recipient_agent_id: string

The ID of the agent to close.

minLength0
sender_agent_id: string

The ID of the agent requesting the close.

minLength0

The status of the tool call.

turn_id: string

The ID of the turn that contains this item.

minLength0
type: "close_subagent_call"

The item type. Always close_subagent_call.