Files
codex/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json
Celia Chen 1151972fb2 feat: add experimental additionalPermissions to v2 command execution approval requests (#12737)
This adds additionalPermissions to the app-server v2
item/commandExecution/requestApproval payload as an experimental field.

The field is now exposed on CommandExecutionRequestApprovalParams and is
populated from the existing core approval event when a command requests
additional sandbox permissions.

This PR also contains changes to make server requests to support
experiment API.

A real app server test client test:

sample payload with experimental flag off:
```
 {
<   "id": 0,
<   "method": "item/commandExecution/requestApproval",
<   "params": {
<     "command": "/bin/zsh -lc 'mkdir -p ~/some/test && touch ~/some/test/file'",
<     "commandActions": [
<       {
<         "command": "mkdir -p '~/some/test'",
<         "type": "unknown"
<       },
<       {
<         "command": "touch '~/some/test/file'",
<         "type": "unknown"
<       }
<     ],
<     "cwd": "/Users/celia/code/codex/codex-rs",
<     "itemId": "call_QLp0LWkQ1XkU6VW9T2vUZFWB",
<     "proposedExecpolicyAmendment": [
<       "mkdir",
<       "-p",
<       "~/some/test"
<     ],
<     "reason": "Do you want to allow creating ~/some/test/file outside the workspace?",
<     "threadId": "019c9309-e209-7d82-a01b-dcf9556a354d",
<     "turnId": "019c9309-e27a-7f33-834f-6011e795c2d6"
<   }
< }
```
with experimental flag on: 
```
< {
<   "id": 0,
<   "method": "item/commandExecution/requestApproval",
<   "params": {
<     "additionalPermissions": {
<       "fileSystem": null,
<       "macos": null,
<       "network": true
<     },
<     "command": "/bin/zsh -lc 'install -D /dev/null ~/some/test/file'",
<     "commandActions": [
<       {
<         "command": "install -D /dev/null '~/some/test/file'",
<         "type": "unknown"
<       }
<     ],
<     "cwd": "/Users/celia/code/codex/codex-rs",
<     "itemId": "call_K3U4b3dRbj3eMCqslmncbGsq",
<     "proposedExecpolicyAmendment": [
<       "install",
<       "-D"
<     ],
<     "reason": "Do you want to allow creating the file at ~/some/test/file outside the workspace sandbox?",
<     "threadId": "019c9303-3a8e-76e1-81bf-d67ac446d892",
<     "turnId": "019c9303-3af1-7143-88a1-73132f771234"
<   }
< }
```
2026-02-25 05:16:35 +00:00

14290 lines
368 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"AdditionalFileSystemPermissions": {
"properties": {
"read": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"write": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"AdditionalMacOsPermissions": {
"properties": {
"accessibility": {
"type": [
"boolean",
"null"
]
},
"automations": {
"anyOf": [
{
"$ref": "#/definitions/MacOsAutomationValue"
},
{
"type": "null"
}
]
},
"calendar": {
"type": [
"boolean",
"null"
]
},
"preferences": {
"anyOf": [
{
"$ref": "#/definitions/MacOsPreferencesValue"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"AdditionalPermissionProfile": {
"properties": {
"fileSystem": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalFileSystemPermissions"
},
{
"type": "null"
}
]
},
"macos": {
"anyOf": [
{
"$ref": "#/definitions/AdditionalMacOsPermissions"
},
{
"type": "null"
}
]
},
"network": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
},
"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"
}
]
},
"ApplyPatchApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::PatchApplyBeginEvent] and [codex_protocol::protocol::PatchApplyEndEvent].",
"type": "string"
},
"conversationId": {
"$ref": "#/definitions/v2/ThreadId"
},
"fileChanges": {
"additionalProperties": {
"$ref": "#/definitions/FileChange"
},
"type": "object"
},
"grantRoot": {
"description": "When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
"type": [
"string",
"null"
]
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": [
"string",
"null"
]
}
},
"required": [
"callId",
"conversationId",
"fileChanges"
],
"title": "ApplyPatchApprovalParams",
"type": "object"
},
"ApplyPatchApprovalResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"required": [
"decision"
],
"title": "ApplyPatchApprovalResponse",
"type": "object"
},
"CallToolResult": {
"description": "The server's response to a tool call.",
"properties": {
"_meta": true,
"content": {
"items": true,
"type": "array"
},
"isError": {
"type": [
"boolean",
"null"
]
},
"structuredContent": true
},
"required": [
"content"
],
"type": "object"
},
"ChatgptAuthTokensRefreshParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"previousAccountId": {
"description": "Workspace/account identifier that Codex was previously using.\n\nClients that manage multiple accounts/workspaces can use this as a hint to refresh the token for the correct workspace.\n\nThis may be `null` when the prior auth state did not include a workspace identifier (`chatgpt_account_id`).",
"type": [
"string",
"null"
]
},
"reason": {
"$ref": "#/definitions/ChatgptAuthTokensRefreshReason"
}
},
"required": [
"reason"
],
"title": "ChatgptAuthTokensRefreshParams",
"type": "object"
},
"ChatgptAuthTokensRefreshReason": {
"oneOf": [
{
"description": "Codex attempted a backend request and received `401 Unauthorized`.",
"enum": [
"unauthorized"
],
"type": "string"
}
]
},
"ChatgptAuthTokensRefreshResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"accessToken": {
"type": "string"
},
"chatgptAccountId": {
"type": "string"
},
"chatgptPlanType": {
"type": [
"string",
"null"
]
}
},
"required": [
"accessToken",
"chatgptAccountId"
],
"title": "ChatgptAuthTokensRefreshResponse",
"type": "object"
},
"ClientInfo": {
"properties": {
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
],
"type": "object"
},
"ClientNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"method": {
"enum": [
"initialized"
],
"title": "InitializedNotificationMethod",
"type": "string"
}
},
"required": [
"method"
],
"title": "InitializedNotification",
"type": "object"
}
],
"title": "ClientNotification"
},
"ClientRequest": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Request from the client to the server.",
"oneOf": [
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"initialize"
],
"title": "InitializeRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/InitializeParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "InitializeRequest",
"type": "object"
},
{
"description": "NEW APIs",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/start"
],
"title": "Thread/startRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadStartParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/startRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/resume"
],
"title": "Thread/resumeRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadResumeParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/resumeRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/fork"
],
"title": "Thread/forkRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadForkParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/forkRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/archive"
],
"title": "Thread/archiveRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadArchiveParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/archiveRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/name/set"
],
"title": "Thread/name/setRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadSetNameParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/name/setRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/unarchive"
],
"title": "Thread/unarchiveRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadUnarchiveParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/unarchiveRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/compact/start"
],
"title": "Thread/compact/startRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadCompactStartParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/compact/startRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/rollback"
],
"title": "Thread/rollbackRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadRollbackParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/rollbackRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/list"
],
"title": "Thread/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/loaded/list"
],
"title": "Thread/loaded/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadLoadedListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/loaded/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"thread/read"
],
"title": "Thread/readRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadReadParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Thread/readRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"skills/list"
],
"title": "Skills/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/SkillsListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Skills/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"skills/remote/list"
],
"title": "Skills/remote/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/SkillsRemoteReadParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Skills/remote/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"skills/remote/export"
],
"title": "Skills/remote/exportRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/SkillsRemoteWriteParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Skills/remote/exportRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"app/list"
],
"title": "App/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AppsListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "App/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"skills/config/write"
],
"title": "Skills/config/writeRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/SkillsConfigWriteParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Skills/config/writeRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"turn/start"
],
"title": "Turn/startRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnStartParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Turn/startRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"turn/steer"
],
"title": "Turn/steerRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnSteerParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Turn/steerRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"turn/interrupt"
],
"title": "Turn/interruptRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnInterruptParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Turn/interruptRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"review/start"
],
"title": "Review/startRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ReviewStartParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Review/startRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"model/list"
],
"title": "Model/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ModelListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Model/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"experimentalFeature/list"
],
"title": "ExperimentalFeature/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ExperimentalFeatureListParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ExperimentalFeature/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"mcpServer/oauth/login"
],
"title": "McpServer/oauth/loginRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/McpServerOauthLoginParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "McpServer/oauth/loginRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"config/mcpServer/reload"
],
"title": "Config/mcpServer/reloadRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "Config/mcpServer/reloadRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"mcpServerStatus/list"
],
"title": "McpServerStatus/listRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ListMcpServerStatusParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "McpServerStatus/listRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"windowsSandbox/setupStart"
],
"title": "WindowsSandbox/setupStartRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/WindowsSandboxSetupStartParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "WindowsSandbox/setupStartRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/login/start"
],
"title": "Account/login/startRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/LoginAccountParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Account/login/startRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/login/cancel"
],
"title": "Account/login/cancelRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/CancelLoginAccountParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Account/login/cancelRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/logout"
],
"title": "Account/logoutRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "Account/logoutRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/rateLimits/read"
],
"title": "Account/rateLimits/readRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "Account/rateLimits/readRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"feedback/upload"
],
"title": "Feedback/uploadRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/FeedbackUploadParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Feedback/uploadRequest",
"type": "object"
},
{
"description": "Execute a command (argv vector) under the server's sandbox.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"command/exec"
],
"title": "Command/execRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/CommandExecParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Command/execRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"config/read"
],
"title": "Config/readRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ConfigReadParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Config/readRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"config/value/write"
],
"title": "Config/value/writeRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ConfigValueWriteParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Config/value/writeRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"config/batchWrite"
],
"title": "Config/batchWriteRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ConfigBatchWriteParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Config/batchWriteRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"configRequirements/read"
],
"title": "ConfigRequirements/readRequestMethod",
"type": "string"
},
"params": {
"type": "null"
}
},
"required": [
"id",
"method"
],
"title": "ConfigRequirements/readRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/read"
],
"title": "Account/readRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/GetAccountParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Account/readRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"fuzzyFileSearch"
],
"title": "FuzzyFileSearchRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/FuzzyFileSearchParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "FuzzyFileSearchRequest",
"type": "object"
}
],
"title": "ClientRequest"
},
"CollabAgentRef": {
"properties": {
"agent_nickname": {
"description": "Optional nickname assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"agent_role": {
"description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"thread_id": {
"allOf": [
{
"$ref": "#/definitions/ThreadId"
}
],
"description": "Thread ID of the receiver/new agent."
}
},
"required": [
"thread_id"
],
"type": "object"
},
"CollabAgentStatusEntry": {
"properties": {
"agent_nickname": {
"description": "Optional nickname assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"agent_role": {
"description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"status": {
"allOf": [
{
"$ref": "#/definitions/AgentStatus"
}
],
"description": "Last known status of the agent."
},
"thread_id": {
"allOf": [
{
"$ref": "#/definitions/ThreadId"
}
],
"description": "Thread ID of the receiver/new agent."
}
},
"required": [
"status",
"thread_id"
],
"type": "object"
},
"CommandExecutionApprovalDecision": {
"oneOf": [
{
"description": "User approved the command.",
"enum": [
"accept"
],
"type": "string"
},
{
"description": "User approved the command and future identical commands should run without prompting.",
"enum": [
"acceptForSession"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User approved the command, and wants to apply the proposed execpolicy amendment so future matching commands can run without prompting.",
"properties": {
"acceptWithExecpolicyAmendment": {
"properties": {
"execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"execpolicy_amendment"
],
"type": "object"
}
},
"required": [
"acceptWithExecpolicyAmendment"
],
"title": "AcceptWithExecpolicyAmendmentCommandExecutionApprovalDecision",
"type": "object"
},
{
"description": "User denied the command. The agent will continue the turn.",
"enum": [
"decline"
],
"type": "string"
},
{
"description": "User denied the command. The turn will also be immediately interrupted.",
"enum": [
"cancel"
],
"type": "string"
}
]
},
"CommandExecutionRequestApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalId": {
"description": "Unique identifier for this specific approval callback.\n\nFor regular shell/unified_exec approvals, this is null.\n\nFor zsh-exec-bridge subcommand approvals, multiple callbacks can belong to one parent `itemId`, so `approvalId` is a distinct opaque callback id (a UUID) used to disambiguate routing.",
"type": [
"string",
"null"
]
},
"command": {
"description": "The command to be executed.",
"type": [
"string",
"null"
]
},
"commandActions": {
"description": "Best-effort parsed command actions for friendly display.",
"items": {
"$ref": "#/definitions/v2/CommandAction"
},
"type": [
"array",
"null"
]
},
"cwd": {
"description": "The command's working directory.",
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
"networkApprovalContext": {
"anyOf": [
{
"$ref": "#/definitions/NetworkApprovalContext"
},
{
"type": "null"
}
],
"description": "Optional context for managed-network approval prompts."
},
"proposedExecpolicyAmendment": {
"description": "Optional proposed execpolicy amendment to allow similar commands without prompting.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"reason": {
"description": "Optional explanatory reason (e.g. request for network access).",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"threadId",
"turnId"
],
"title": "CommandExecutionRequestApprovalParams",
"type": "object"
},
"CommandExecutionRequestApprovalResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"decision": {
"$ref": "#/definitions/CommandExecutionApprovalDecision"
}
},
"required": [
"decision"
],
"title": "CommandExecutionRequestApprovalResponse",
"type": "object"
},
"CustomPrompt": {
"properties": {
"argument_hint": {
"type": [
"string",
"null"
]
},
"content": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"content",
"name",
"path"
],
"type": "object"
},
"Duration": {
"properties": {
"nanos": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"secs": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"nanos",
"secs"
],
"type": "object"
},
"DynamicToolCallOutputContentItem": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"inputText"
],
"title": "InputTextDynamicToolCallOutputContentItemType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "InputTextDynamicToolCallOutputContentItem",
"type": "object"
},
{
"properties": {
"imageUrl": {
"type": "string"
},
"type": {
"enum": [
"inputImage"
],
"title": "InputImageDynamicToolCallOutputContentItemType",
"type": "string"
}
},
"required": [
"imageUrl",
"type"
],
"title": "InputImageDynamicToolCallOutputContentItem",
"type": "object"
}
]
},
"DynamicToolCallParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"arguments": true,
"callId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"tool": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"arguments",
"callId",
"threadId",
"tool",
"turnId"
],
"title": "DynamicToolCallParams",
"type": "object"
},
"DynamicToolCallResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"contentItems": {
"items": {
"$ref": "#/definitions/DynamicToolCallOutputContentItem"
},
"type": "array"
},
"success": {
"type": "boolean"
}
},
"required": [
"contentItems",
"success"
],
"title": "DynamicToolCallResponse",
"type": "object"
},
"EventMsg": {
"$schema": "http://json-schema.org/draft-07/schema#",
"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/v2/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": "Realtime conversation lifecycle start event.",
"properties": {
"session_id": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"realtime_conversation_started"
],
"title": "RealtimeConversationStartedEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "RealtimeConversationStartedEventMsg",
"type": "object"
},
{
"description": "Realtime conversation streaming payload event.",
"properties": {
"payload": {
"$ref": "#/definitions/RealtimeEvent"
},
"type": {
"enum": [
"realtime_conversation_realtime"
],
"title": "RealtimeConversationRealtimeEventMsgType",
"type": "string"
}
},
"required": [
"payload",
"type"
],
"title": "RealtimeConversationRealtimeEventMsg",
"type": "object"
},
{
"description": "Realtime conversation lifecycle close event.",
"properties": {
"reason": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"realtime_conversation_closed"
],
"title": "RealtimeConversationClosedEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "RealtimeConversationClosedEventMsg",
"type": "object"
},
{
"description": "Model routing changed from the requested model to a different model.",
"properties": {
"from_model": {
"type": "string"
},
"reason": {
"$ref": "#/definitions/v2/ModelRerouteReason"
},
"to_model": {
"type": "string"
},
"type": {
"enum": [
"model_reroute"
],
"title": "ModelRerouteEventMsgType",
"type": "string"
}
},
"required": [
"from_model",
"reason",
"to_model",
"type"
],
"title": "ModelRerouteEventMsg",
"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.",
"properties": {
"collaboration_mode_kind": {
"allOf": [
{
"$ref": "#/definitions/v2/ModeKind"
}
],
"default": "default"
},
"model_context_window": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"task_started"
],
"title": "TaskStartedEventMsgType",
"type": "string"
}
},
"required": [
"turn_id",
"type"
],
"title": "TaskStartedEventMsg",
"type": "object"
},
{
"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"
]
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"task_complete"
],
"title": "TaskCompleteEventMsgType",
"type": "string"
}
},
"required": [
"turn_id",
"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/v2/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"
},
"phase": {
"anyOf": [
{
"$ref": "#/definitions/v2/MessagePhase"
},
{
"type": "null"
}
],
"default": null
},
"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/v2/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.",
"properties": {
"delta": {
"type": "string"
},
"type": {
"enum": [
"agent_reasoning_raw_content_delta"
],
"title": "AgentReasoningRawContentDeltaEventMsgType",
"type": "string"
}
},
"required": [
"delta",
"type"
],
"title": "AgentReasoningRawContentDeltaEventMsg",
"type": "object"
},
{
"description": "Signaled when the model begins a new reasoning summary section (e.g., a new titled block).",
"properties": {
"item_id": {
"default": "",
"type": "string"
},
"summary_index": {
"default": 0,
"format": "int64",
"type": "integer"
},
"type": {
"enum": [
"agent_reasoning_section_break"
],
"title": "AgentReasoningSectionBreakEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "AgentReasoningSectionBreakEventMsg",
"type": "object"
},
{
"description": "Ack the client's configure message.",
"properties": {
"approval_policy": {
"allOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
}
],
"description": "When to escalate for approval for execution"
},
"cwd": {
"description": "Working directory that should be treated as the *root* of the session.",
"type": "string"
},
"forked_from_id": {
"anyOf": [
{
"$ref": "#/definitions/v2/ThreadId"
},
{
"type": "null"
}
]
},
"history_entry_count": {
"description": "Current number of entries in the history log.",
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"history_log_id": {
"description": "Identifier of the history log file (inode on Unix, 0 otherwise).",
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"initial_messages": {
"description": "Optional initial messages (as events) for resumed sessions. When present, UIs can use these to seed the history.",
"items": {
"$ref": "#/definitions/EventMsg"
},
"type": [
"array",
"null"
]
},
"model": {
"description": "Tell the client what model is being queried.",
"type": "string"
},
"model_provider_id": {
"type": "string"
},
"network_proxy": {
"anyOf": [
{
"$ref": "#/definitions/SessionNetworkProxyRuntime"
},
{
"type": "null"
}
],
"description": "Runtime proxy bind addresses, when the managed proxy was started for this session."
},
"reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
],
"description": "The effort the model is putting into reasoning about the user's request."
},
"rollout_path": {
"description": "Path in which the rollout is stored. Can be `None` for ephemeral threads",
"type": [
"string",
"null"
]
},
"sandbox_policy": {
"allOf": [
{
"$ref": "#/definitions/v2/SandboxPolicy"
}
],
"description": "How to sandbox commands executed in the system"
},
"session_id": {
"$ref": "#/definitions/v2/ThreadId"
},
"thread_name": {
"description": "Optional user-facing thread name (may be unset).",
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"session_configured"
],
"title": "SessionConfiguredEventMsgType",
"type": "string"
}
},
"required": [
"approval_policy",
"cwd",
"history_entry_count",
"history_log_id",
"model",
"model_provider_id",
"sandbox_policy",
"session_id",
"type"
],
"title": "SessionConfiguredEventMsg",
"type": "object"
},
{
"description": "Updated session metadata (e.g., thread name changes).",
"properties": {
"thread_id": {
"$ref": "#/definitions/v2/ThreadId"
},
"thread_name": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"thread_name_updated"
],
"title": "ThreadNameUpdatedEventMsgType",
"type": "string"
}
},
"required": [
"thread_id",
"type"
],
"title": "ThreadNameUpdatedEventMsg",
"type": "object"
},
{
"description": "Incremental MCP startup progress updates.",
"properties": {
"server": {
"description": "Server name being started.",
"type": "string"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/McpStartupStatus"
}
],
"description": "Current startup status."
},
"type": {
"enum": [
"mcp_startup_update"
],
"title": "McpStartupUpdateEventMsgType",
"type": "string"
}
},
"required": [
"server",
"status",
"type"
],
"title": "McpStartupUpdateEventMsg",
"type": "object"
},
{
"description": "Aggregate MCP startup completion summary.",
"properties": {
"cancelled": {
"items": {
"type": "string"
},
"type": "array"
},
"failed": {
"items": {
"$ref": "#/definitions/McpStartupFailure"
},
"type": "array"
},
"ready": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"enum": [
"mcp_startup_complete"
],
"title": "McpStartupCompleteEventMsgType",
"type": "string"
}
},
"required": [
"cancelled",
"failed",
"ready",
"type"
],
"title": "McpStartupCompleteEventMsg",
"type": "object"
},
{
"properties": {
"call_id": {
"description": "Identifier so this can be paired with the McpToolCallEnd event.",
"type": "string"
},
"invocation": {
"$ref": "#/definitions/McpInvocation"
},
"type": {
"enum": [
"mcp_tool_call_begin"
],
"title": "McpToolCallBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"invocation",
"type"
],
"title": "McpToolCallBeginEventMsg",
"type": "object"
},
{
"properties": {
"call_id": {
"description": "Identifier for the corresponding McpToolCallBegin that finished.",
"type": "string"
},
"duration": {
"$ref": "#/definitions/Duration"
},
"invocation": {
"$ref": "#/definitions/McpInvocation"
},
"result": {
"allOf": [
{
"$ref": "#/definitions/Result_of_CallToolResult_or_String"
}
],
"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/v2/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."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/ExecCommandStatus"
}
],
"description": "Completion status for this command execution."
},
"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",
"status",
"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": {
"additional_permissions": {
"anyOf": [
{
"$ref": "#/definitions/PermissionProfile"
},
{
"type": "null"
}
],
"description": "Optional additional filesystem permissions requested for this command."
},
"approval_id": {
"description": "Identifier for this specific approval callback.\n\nWhen absent, the approval is for the command item itself (`call_id`). This is present for subcommand approvals (via execve intercept).",
"type": [
"string",
"null"
]
},
"call_id": {
"description": "Identifier for the associated command execution item.",
"type": "string"
},
"command": {
"description": "The command to be executed.",
"items": {
"type": "string"
},
"type": "array"
},
"cwd": {
"description": "The command's working directory.",
"type": "string"
},
"network_approval_context": {
"anyOf": [
{
"$ref": "#/definitions/NetworkApprovalContext"
},
{
"type": "null"
}
],
"description": "Optional network context for a blocked request that can be approved."
},
"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"
]
},
"proposed_network_policy_amendments": {
"description": "Proposed network policy amendments (for example allow/deny this host in future).",
"items": {
"$ref": "#/definitions/NetworkPolicyAmendment"
},
"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": {
"item_id": {
"type": "string"
},
"skill_name": {
"type": "string"
},
"type": {
"enum": [
"skill_request_approval"
],
"title": "SkillRequestApprovalEventMsgType",
"type": "string"
}
},
"required": [
"item_id",
"skill_name",
"type"
],
"title": "SkillRequestApprovalEventMsg",
"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/v2/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 frontends 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).",
"type": "object"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/v2/PatchApplyStatus"
}
],
"description": "Completion status for this patch application."
},
"stderr": {
"description": "Captured stderr (parser errors, IO failures, etc.).",
"type": "string"
},
"stdout": {
"description": "Captured stdout (summary printed by apply_patch).",
"type": "string"
},
"success": {
"description": "Whether the patch was applied successfully.",
"type": "boolean"
},
"turn_id": {
"default": "",
"description": "Turn ID that this patch belongs to. Uses `#[serde(default)]` for backwards compatibility.",
"type": "string"
},
"type": {
"enum": [
"patch_apply_end"
],
"title": "PatchApplyEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"status",
"stderr",
"stdout",
"success",
"type"
],
"title": "PatchApplyEndEventMsg",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"turn_diff"
],
"title": "TurnDiffEventMsgType",
"type": "string"
},
"unified_diff": {
"type": "string"
}
},
"required": [
"type",
"unified_diff"
],
"title": "TurnDiffEventMsg",
"type": "object"
},
{
"description": "Response to GetHistoryEntryRequest.",
"properties": {
"entry": {
"anyOf": [
{
"$ref": "#/definitions/HistoryEntry"
},
{
"type": "null"
}
],
"description": "The entry at the requested offset, if available and parseable."
},
"log_id": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
},
"offset": {
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"type": {
"enum": [
"get_history_entry_response"
],
"title": "GetHistoryEntryResponseEventMsgType",
"type": "string"
}
},
"required": [
"log_id",
"offset",
"type"
],
"title": "GetHistoryEntryResponseEventMsg",
"type": "object"
},
{
"description": "List of MCP tools available to the agent.",
"properties": {
"auth_statuses": {
"additionalProperties": {
"$ref": "#/definitions/v2/McpAuthStatus"
},
"description": "Authentication status for each configured MCP server.",
"type": "object"
},
"resource_templates": {
"additionalProperties": {
"items": {
"$ref": "#/definitions/v2/ResourceTemplate"
},
"type": "array"
},
"description": "Known resource templates grouped by server name.",
"type": "object"
},
"resources": {
"additionalProperties": {
"items": {
"$ref": "#/definitions/v2/Resource"
},
"type": "array"
},
"description": "Known resources grouped by server name.",
"type": "object"
},
"tools": {
"additionalProperties": {
"$ref": "#/definitions/v2/Tool"
},
"description": "Fully qualified tool name -> tool definition.",
"type": "object"
},
"type": {
"enum": [
"mcp_list_tools_response"
],
"title": "McpListToolsResponseEventMsgType",
"type": "string"
}
},
"required": [
"auth_statuses",
"resource_templates",
"resources",
"tools",
"type"
],
"title": "McpListToolsResponseEventMsg",
"type": "object"
},
{
"description": "List of custom prompts available to the agent.",
"properties": {
"custom_prompts": {
"items": {
"$ref": "#/definitions/CustomPrompt"
},
"type": "array"
},
"type": {
"enum": [
"list_custom_prompts_response"
],
"title": "ListCustomPromptsResponseEventMsgType",
"type": "string"
}
},
"required": [
"custom_prompts",
"type"
],
"title": "ListCustomPromptsResponseEventMsg",
"type": "object"
},
{
"description": "List of skills available to the agent.",
"properties": {
"skills": {
"items": {
"$ref": "#/definitions/v2/SkillsListEntry"
},
"type": "array"
},
"type": {
"enum": [
"list_skills_response"
],
"title": "ListSkillsResponseEventMsgType",
"type": "string"
}
},
"required": [
"skills",
"type"
],
"title": "ListSkillsResponseEventMsg",
"type": "object"
},
{
"description": "List of remote skills available to the agent.",
"properties": {
"skills": {
"items": {
"$ref": "#/definitions/v2/RemoteSkillSummary"
},
"type": "array"
},
"type": {
"enum": [
"list_remote_skills_response"
],
"title": "ListRemoteSkillsResponseEventMsgType",
"type": "string"
}
},
"required": [
"skills",
"type"
],
"title": "ListRemoteSkillsResponseEventMsg",
"type": "object"
},
{
"description": "Remote skill downloaded to local cache.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"enum": [
"remote_skill_downloaded"
],
"title": "RemoteSkillDownloadedEventMsgType",
"type": "string"
}
},
"required": [
"id",
"name",
"path",
"type"
],
"title": "RemoteSkillDownloadedEventMsg",
"type": "object"
},
{
"description": "Notification that skill data may have been updated and clients may want to reload.",
"properties": {
"type": {
"enum": [
"skills_update_available"
],
"title": "SkillsUpdateAvailableEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "SkillsUpdateAvailableEventMsg",
"type": "object"
},
{
"properties": {
"explanation": {
"default": null,
"description": "Arguments for the `update_plan` todo/checklist tool (not plan mode).",
"type": [
"string",
"null"
]
},
"plan": {
"items": {
"$ref": "#/definitions/PlanItemArg"
},
"type": "array"
},
"type": {
"enum": [
"plan_update"
],
"title": "PlanUpdateEventMsgType",
"type": "string"
}
},
"required": [
"plan",
"type"
],
"title": "PlanUpdateEventMsg",
"type": "object"
},
{
"properties": {
"reason": {
"$ref": "#/definitions/TurnAbortReason"
},
"turn_id": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"turn_aborted"
],
"title": "TurnAbortedEventMsgType",
"type": "string"
}
},
"required": [
"reason",
"type"
],
"title": "TurnAbortedEventMsg",
"type": "object"
},
{
"description": "Notification that the agent is shutting down.",
"properties": {
"type": {
"enum": [
"shutdown_complete"
],
"title": "ShutdownCompleteEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ShutdownCompleteEventMsg",
"type": "object"
},
{
"description": "Entered review mode.",
"properties": {
"target": {
"$ref": "#/definitions/v2/ReviewTarget"
},
"type": {
"enum": [
"entered_review_mode"
],
"title": "EnteredReviewModeEventMsgType",
"type": "string"
},
"user_facing_hint": {
"type": [
"string",
"null"
]
}
},
"required": [
"target",
"type"
],
"title": "EnteredReviewModeEventMsg",
"type": "object"
},
{
"description": "Exited review mode with an optional final result to apply.",
"properties": {
"review_output": {
"anyOf": [
{
"$ref": "#/definitions/ReviewOutputEvent"
},
{
"type": "null"
}
]
},
"type": {
"enum": [
"exited_review_mode"
],
"title": "ExitedReviewModeEventMsgType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ExitedReviewModeEventMsg",
"type": "object"
},
{
"properties": {
"item": {
"$ref": "#/definitions/v2/ResponseItem"
},
"type": {
"enum": [
"raw_response_item"
],
"title": "RawResponseItemEventMsgType",
"type": "string"
}
},
"required": [
"item",
"type"
],
"title": "RawResponseItemEventMsg",
"type": "object"
},
{
"properties": {
"item": {
"$ref": "#/definitions/TurnItem"
},
"thread_id": {
"$ref": "#/definitions/v2/ThreadId"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"item_started"
],
"title": "ItemStartedEventMsgType",
"type": "string"
}
},
"required": [
"item",
"thread_id",
"turn_id",
"type"
],
"title": "ItemStartedEventMsg",
"type": "object"
},
{
"properties": {
"item": {
"$ref": "#/definitions/TurnItem"
},
"thread_id": {
"$ref": "#/definitions/v2/ThreadId"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"item_completed"
],
"title": "ItemCompletedEventMsgType",
"type": "string"
}
},
"required": [
"item",
"thread_id",
"turn_id",
"type"
],
"title": "ItemCompletedEventMsg",
"type": "object"
},
{
"properties": {
"delta": {
"type": "string"
},
"item_id": {
"type": "string"
},
"thread_id": {
"type": "string"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"agent_message_content_delta"
],
"title": "AgentMessageContentDeltaEventMsgType",
"type": "string"
}
},
"required": [
"delta",
"item_id",
"thread_id",
"turn_id",
"type"
],
"title": "AgentMessageContentDeltaEventMsg",
"type": "object"
},
{
"properties": {
"delta": {
"type": "string"
},
"item_id": {
"type": "string"
},
"thread_id": {
"type": "string"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"plan_delta"
],
"title": "PlanDeltaEventMsgType",
"type": "string"
}
},
"required": [
"delta",
"item_id",
"thread_id",
"turn_id",
"type"
],
"title": "PlanDeltaEventMsg",
"type": "object"
},
{
"properties": {
"delta": {
"type": "string"
},
"item_id": {
"type": "string"
},
"summary_index": {
"default": 0,
"format": "int64",
"type": "integer"
},
"thread_id": {
"type": "string"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"reasoning_content_delta"
],
"title": "ReasoningContentDeltaEventMsgType",
"type": "string"
}
},
"required": [
"delta",
"item_id",
"thread_id",
"turn_id",
"type"
],
"title": "ReasoningContentDeltaEventMsg",
"type": "object"
},
{
"properties": {
"content_index": {
"default": 0,
"format": "int64",
"type": "integer"
},
"delta": {
"type": "string"
},
"item_id": {
"type": "string"
},
"thread_id": {
"type": "string"
},
"turn_id": {
"type": "string"
},
"type": {
"enum": [
"reasoning_raw_content_delta"
],
"title": "ReasoningRawContentDeltaEventMsgType",
"type": "string"
}
},
"required": [
"delta",
"item_id",
"thread_id",
"turn_id",
"type"
],
"title": "ReasoningRawContentDeltaEventMsg",
"type": "object"
},
{
"description": "Collab interaction: agent spawn begin.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"prompt": {
"description": "Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.",
"type": "string"
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"type": {
"enum": [
"collab_agent_spawn_begin"
],
"title": "CollabAgentSpawnBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"prompt",
"sender_thread_id",
"type"
],
"title": "CollabAgentSpawnBeginEventMsg",
"type": "object"
},
{
"description": "Collab interaction: agent spawn end.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"new_agent_nickname": {
"description": "Optional nickname assigned to the new agent.",
"type": [
"string",
"null"
]
},
"new_agent_role": {
"description": "Optional role assigned to the new agent.",
"type": [
"string",
"null"
]
},
"new_thread_id": {
"anyOf": [
{
"$ref": "#/definitions/v2/ThreadId"
},
{
"type": "null"
}
],
"description": "Thread ID of the newly spawned agent, if it was created."
},
"prompt": {
"description": "Initial prompt sent to the agent. Can be empty to prevent CoT leaking at the beginning.",
"type": "string"
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/AgentStatus"
}
],
"description": "Last known status of the new agent reported to the sender agent."
},
"type": {
"enum": [
"collab_agent_spawn_end"
],
"title": "CollabAgentSpawnEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"prompt",
"sender_thread_id",
"status",
"type"
],
"title": "CollabAgentSpawnEndEventMsg",
"type": "object"
},
{
"description": "Collab interaction: agent interaction begin.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"prompt": {
"description": "Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.",
"type": "string"
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"type": {
"enum": [
"collab_agent_interaction_begin"
],
"title": "CollabAgentInteractionBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"prompt",
"receiver_thread_id",
"sender_thread_id",
"type"
],
"title": "CollabAgentInteractionBeginEventMsg",
"type": "object"
},
{
"description": "Collab interaction: agent interaction end.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"prompt": {
"description": "Prompt sent from the sender to the receiver. Can be empty to prevent CoT leaking at the beginning.",
"type": "string"
},
"receiver_agent_nickname": {
"description": "Optional nickname assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_agent_role": {
"description": "Optional role assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/AgentStatus"
}
],
"description": "Last known status of the receiver agent reported to the sender agent."
},
"type": {
"enum": [
"collab_agent_interaction_end"
],
"title": "CollabAgentInteractionEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"prompt",
"receiver_thread_id",
"sender_thread_id",
"status",
"type"
],
"title": "CollabAgentInteractionEndEventMsg",
"type": "object"
},
{
"description": "Collab interaction: waiting begin.",
"properties": {
"call_id": {
"description": "ID of the waiting call.",
"type": "string"
},
"receiver_agents": {
"description": "Optional nicknames/roles for receivers.",
"items": {
"$ref": "#/definitions/CollabAgentRef"
},
"type": "array"
},
"receiver_thread_ids": {
"description": "Thread ID of the receivers.",
"items": {
"$ref": "#/definitions/v2/ThreadId"
},
"type": "array"
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"type": {
"enum": [
"collab_waiting_begin"
],
"title": "CollabWaitingBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"receiver_thread_ids",
"sender_thread_id",
"type"
],
"title": "CollabWaitingBeginEventMsg",
"type": "object"
},
{
"description": "Collab interaction: waiting end.",
"properties": {
"agent_statuses": {
"description": "Optional receiver metadata paired with final statuses.",
"items": {
"$ref": "#/definitions/CollabAgentStatusEntry"
},
"type": "array"
},
"call_id": {
"description": "ID of the waiting call.",
"type": "string"
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"statuses": {
"additionalProperties": {
"$ref": "#/definitions/AgentStatus"
},
"description": "Last known status of the receiver agents reported to the sender agent.",
"type": "object"
},
"type": {
"enum": [
"collab_waiting_end"
],
"title": "CollabWaitingEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"sender_thread_id",
"statuses",
"type"
],
"title": "CollabWaitingEndEventMsg",
"type": "object"
},
{
"description": "Collab interaction: close begin.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"type": {
"enum": [
"collab_close_begin"
],
"title": "CollabCloseBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"receiver_thread_id",
"sender_thread_id",
"type"
],
"title": "CollabCloseBeginEventMsg",
"type": "object"
},
{
"description": "Collab interaction: close end.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"receiver_agent_nickname": {
"description": "Optional nickname assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_agent_role": {
"description": "Optional role assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/AgentStatus"
}
],
"description": "Last known status of the receiver agent reported to the sender agent before the close."
},
"type": {
"enum": [
"collab_close_end"
],
"title": "CollabCloseEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"receiver_thread_id",
"sender_thread_id",
"status",
"type"
],
"title": "CollabCloseEndEventMsg",
"type": "object"
},
{
"description": "Collab interaction: resume begin.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"receiver_agent_nickname": {
"description": "Optional nickname assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_agent_role": {
"description": "Optional role assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"type": {
"enum": [
"collab_resume_begin"
],
"title": "CollabResumeBeginEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"receiver_thread_id",
"sender_thread_id",
"type"
],
"title": "CollabResumeBeginEventMsg",
"type": "object"
},
{
"description": "Collab interaction: resume end.",
"properties": {
"call_id": {
"description": "Identifier for the collab tool call.",
"type": "string"
},
"receiver_agent_nickname": {
"description": "Optional nickname assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_agent_role": {
"description": "Optional role assigned to the receiver agent.",
"type": [
"string",
"null"
]
},
"receiver_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the receiver."
},
"sender_thread_id": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadId"
}
],
"description": "Thread ID of the sender."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/AgentStatus"
}
],
"description": "Last known status of the receiver agent reported to the sender agent after resume."
},
"type": {
"enum": [
"collab_resume_end"
],
"title": "CollabResumeEndEventMsgType",
"type": "string"
}
},
"required": [
"call_id",
"receiver_thread_id",
"sender_thread_id",
"status",
"type"
],
"title": "CollabResumeEndEventMsg",
"type": "object"
}
],
"title": "EventMsg"
},
"ExecCommandApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalId": {
"description": "Identifier for this specific approval callback.",
"type": [
"string",
"null"
]
},
"callId": {
"description": "Use to correlate this with [codex_protocol::protocol::ExecCommandBeginEvent] and [codex_protocol::protocol::ExecCommandEndEvent].",
"type": "string"
},
"command": {
"items": {
"type": "string"
},
"type": "array"
},
"conversationId": {
"$ref": "#/definitions/v2/ThreadId"
},
"cwd": {
"type": "string"
},
"parsedCmd": {
"items": {
"$ref": "#/definitions/ParsedCommand"
},
"type": "array"
},
"reason": {
"type": [
"string",
"null"
]
}
},
"required": [
"callId",
"command",
"conversationId",
"cwd",
"parsedCmd"
],
"title": "ExecCommandApprovalParams",
"type": "object"
},
"ExecCommandApprovalResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"decision": {
"$ref": "#/definitions/ReviewDecision"
}
},
"required": [
"decision"
],
"title": "ExecCommandApprovalResponse",
"type": "object"
},
"ExecCommandSource": {
"enum": [
"agent",
"user_shell",
"unified_exec_startup",
"unified_exec_interaction"
],
"type": "string"
},
"ExecCommandStatus": {
"enum": [
"completed",
"failed",
"declined"
],
"type": "string"
},
"ExecOutputStream": {
"enum": [
"stdout",
"stderr"
],
"type": "string"
},
"FileChange": {
"oneOf": [
{
"properties": {
"content": {
"type": "string"
},
"type": {
"enum": [
"add"
],
"title": "AddFileChangeType",
"type": "string"
}
},
"required": [
"content",
"type"
],
"title": "AddFileChange",
"type": "object"
},
{
"properties": {
"content": {
"type": "string"
},
"type": {
"enum": [
"delete"
],
"title": "DeleteFileChangeType",
"type": "string"
}
},
"required": [
"content",
"type"
],
"title": "DeleteFileChange",
"type": "object"
},
{
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"update"
],
"title": "UpdateFileChangeType",
"type": "string"
},
"unified_diff": {
"type": "string"
}
},
"required": [
"type",
"unified_diff"
],
"title": "UpdateFileChange",
"type": "object"
}
]
},
"FileChangeApprovalDecision": {
"oneOf": [
{
"description": "User approved the file changes.",
"enum": [
"accept"
],
"type": "string"
},
{
"description": "User approved the file changes and future changes to the same files should run without prompting.",
"enum": [
"acceptForSession"
],
"type": "string"
},
{
"description": "User denied the file changes. The agent will continue the turn.",
"enum": [
"decline"
],
"type": "string"
},
{
"description": "User denied the file changes. The turn will also be immediately interrupted.",
"enum": [
"cancel"
],
"type": "string"
}
]
},
"FileChangeRequestApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"grantRoot": {
"description": "[UNSTABLE] When set, the agent is asking the user to allow writes under this root for the remainder of the session (unclear if this is honored today).",
"type": [
"string",
"null"
]
},
"itemId": {
"type": "string"
},
"reason": {
"description": "Optional explanatory reason (e.g. request for extra write access).",
"type": [
"string",
"null"
]
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"threadId",
"turnId"
],
"title": "FileChangeRequestApprovalParams",
"type": "object"
},
"FileChangeRequestApprovalResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"decision": {
"$ref": "#/definitions/FileChangeApprovalDecision"
}
},
"required": [
"decision"
],
"title": "FileChangeRequestApprovalResponse",
"type": "object"
},
"FileSystemPermissions": {
"properties": {
"read": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"write": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"FuzzyFileSearchParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cancellationToken": {
"type": [
"string",
"null"
]
},
"query": {
"type": "string"
},
"roots": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"query",
"roots"
],
"title": "FuzzyFileSearchParams",
"type": "object"
},
"FuzzyFileSearchResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"files": {
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
},
"type": "array"
}
},
"required": [
"files"
],
"title": "FuzzyFileSearchResponse",
"type": "object"
},
"FuzzyFileSearchResult": {
"description": "Superset of [`codex_file_search::FileMatch`]",
"properties": {
"file_name": {
"type": "string"
},
"indices": {
"items": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"type": [
"array",
"null"
]
},
"path": {
"type": "string"
},
"root": {
"type": "string"
},
"score": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"file_name",
"path",
"root",
"score"
],
"type": "object"
},
"FuzzyFileSearchSessionCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"sessionId": {
"type": "string"
}
},
"required": [
"sessionId"
],
"title": "FuzzyFileSearchSessionCompletedNotification",
"type": "object"
},
"FuzzyFileSearchSessionUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"files": {
"items": {
"$ref": "#/definitions/FuzzyFileSearchResult"
},
"type": "array"
},
"query": {
"type": "string"
},
"sessionId": {
"type": "string"
}
},
"required": [
"files",
"query",
"sessionId"
],
"title": "FuzzyFileSearchSessionUpdatedNotification",
"type": "object"
},
"HistoryEntry": {
"properties": {
"conversation_id": {
"type": "string"
},
"text": {
"type": "string"
},
"ts": {
"format": "uint64",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"conversation_id",
"text",
"ts"
],
"type": "object"
},
"InitializeCapabilities": {
"description": "Client-declared capabilities negotiated during initialize.",
"properties": {
"experimentalApi": {
"default": false,
"description": "Opt into receiving experimental API methods and fields.",
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names that should be suppressed for this connection (for example `codex/event/session_configured`).",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"InitializeParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"capabilities": {
"anyOf": [
{
"$ref": "#/definitions/InitializeCapabilities"
},
{
"type": "null"
}
]
},
"clientInfo": {
"$ref": "#/definitions/ClientInfo"
}
},
"required": [
"clientInfo"
],
"title": "InitializeParams",
"type": "object"
},
"InitializeResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"userAgent": {
"type": "string"
}
},
"required": [
"userAgent"
],
"title": "InitializeResponse",
"type": "object"
},
"JSONRPCError": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A response to a request that indicates an error occurred.",
"properties": {
"error": {
"$ref": "#/definitions/JSONRPCErrorError"
},
"id": {
"$ref": "#/definitions/RequestId"
}
},
"required": [
"error",
"id"
],
"title": "JSONRPCError",
"type": "object"
},
"JSONRPCErrorError": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"code": {
"format": "int64",
"type": "integer"
},
"data": true,
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"title": "JSONRPCErrorError",
"type": "object"
},
"JSONRPCMessage": {
"$schema": "http://json-schema.org/draft-07/schema#",
"anyOf": [
{
"$ref": "#/definitions/JSONRPCRequest"
},
{
"$ref": "#/definitions/JSONRPCNotification"
},
{
"$ref": "#/definitions/JSONRPCResponse"
},
{
"$ref": "#/definitions/JSONRPCError"
}
],
"description": "Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.",
"title": "JSONRPCMessage"
},
"JSONRPCNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A notification which does not expect a response.",
"properties": {
"method": {
"type": "string"
},
"params": true
},
"required": [
"method"
],
"title": "JSONRPCNotification",
"type": "object"
},
"JSONRPCRequest": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A request that expects a response.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"type": "string"
},
"params": true
},
"required": [
"id",
"method"
],
"title": "JSONRPCRequest",
"type": "object"
},
"JSONRPCResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "A successful (non-error) response to a request.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"result": true
},
"required": [
"id",
"result"
],
"title": "JSONRPCResponse",
"type": "object"
},
"MacOsAutomationValue": {
"anyOf": [
{
"type": "boolean"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"MacOsPermissions": {
"properties": {
"accessibility": {
"type": [
"boolean",
"null"
]
},
"automations": {
"anyOf": [
{
"$ref": "#/definitions/MacOsAutomationValue"
},
{
"type": "null"
}
]
},
"calendar": {
"type": [
"boolean",
"null"
]
},
"preferences": {
"anyOf": [
{
"$ref": "#/definitions/MacOsPreferencesValue"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"MacOsPreferencesValue": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"McpInvocation": {
"properties": {
"arguments": {
"description": "Arguments to the tool call."
},
"server": {
"description": "Name of the MCP server as defined in the config.",
"type": "string"
},
"tool": {
"description": "Name of the tool as given by the MCP server.",
"type": "string"
}
},
"required": [
"server",
"tool"
],
"type": "object"
},
"McpStartupFailure": {
"properties": {
"error": {
"type": "string"
},
"server": {
"type": "string"
}
},
"required": [
"error",
"server"
],
"type": "object"
},
"McpStartupStatus": {
"oneOf": [
{
"properties": {
"state": {
"enum": [
"starting"
],
"type": "string"
}
},
"required": [
"state"
],
"title": "StartingMcpStartupStatus",
"type": "object"
},
{
"properties": {
"state": {
"enum": [
"ready"
],
"type": "string"
}
},
"required": [
"state"
],
"title": "ReadyMcpStartupStatus",
"type": "object"
},
{
"properties": {
"error": {
"type": "string"
},
"state": {
"enum": [
"failed"
],
"type": "string"
}
},
"required": [
"error",
"state"
],
"type": "object"
},
{
"properties": {
"state": {
"enum": [
"cancelled"
],
"type": "string"
}
},
"required": [
"state"
],
"title": "CancelledMcpStartupStatus",
"type": "object"
}
]
},
"NetworkApprovalContext": {
"properties": {
"host": {
"type": "string"
},
"protocol": {
"$ref": "#/definitions/NetworkApprovalProtocol"
}
},
"required": [
"host",
"protocol"
],
"type": "object"
},
"NetworkApprovalProtocol": {
"enum": [
"http",
"https",
"socks5Tcp",
"socks5Udp"
],
"type": "string"
},
"NetworkPolicyAmendment": {
"properties": {
"action": {
"$ref": "#/definitions/NetworkPolicyRuleAction"
},
"host": {
"type": "string"
}
},
"required": [
"action",
"host"
],
"type": "object"
},
"NetworkPolicyRuleAction": {
"enum": [
"allow",
"deny"
],
"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"
}
]
},
"PermissionProfile": {
"properties": {
"file_system": {
"anyOf": [
{
"$ref": "#/definitions/FileSystemPermissions"
},
{
"type": "null"
}
]
},
"macos": {
"anyOf": [
{
"$ref": "#/definitions/MacOsPermissions"
},
{
"type": "null"
}
]
},
"network": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
},
"PlanItemArg": {
"additionalProperties": false,
"properties": {
"status": {
"$ref": "#/definitions/StepStatus"
},
"step": {
"type": "string"
}
},
"required": [
"status",
"step"
],
"type": "object"
},
"RealtimeAudioFrame": {
"properties": {
"data": {
"type": "string"
},
"num_channels": {
"format": "uint16",
"minimum": 0.0,
"type": "integer"
},
"sample_rate": {
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"samples_per_channel": {
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"required": [
"data",
"num_channels",
"sample_rate"
],
"type": "object"
},
"RealtimeEvent": {
"oneOf": [
{
"additionalProperties": false,
"properties": {
"SessionCreated": {
"properties": {
"session_id": {
"type": "string"
}
},
"required": [
"session_id"
],
"type": "object"
}
},
"required": [
"SessionCreated"
],
"title": "SessionCreatedRealtimeEvent",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"SessionUpdated": {
"properties": {
"backend_prompt": {
"type": [
"string",
"null"
]
}
},
"type": "object"
}
},
"required": [
"SessionUpdated"
],
"title": "SessionUpdatedRealtimeEvent",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"AudioOut": {
"$ref": "#/definitions/RealtimeAudioFrame"
}
},
"required": [
"AudioOut"
],
"title": "AudioOutRealtimeEvent",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"ConversationItemAdded": true
},
"required": [
"ConversationItemAdded"
],
"title": "ConversationItemAddedRealtimeEvent",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"Error": {
"type": "string"
}
},
"required": [
"Error"
],
"title": "ErrorRealtimeEvent",
"type": "object"
}
]
},
"RejectConfig": {
"properties": {
"mcp_elicitations": {
"description": "Reject MCP elicitation prompts.",
"type": "boolean"
},
"rules": {
"description": "Reject prompts triggered by execpolicy `prompt` rules.",
"type": "boolean"
},
"sandbox_approval": {
"description": "Reject approval prompts related to sandbox escalation.",
"type": "boolean"
}
},
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"type": "object"
},
"RequestId": {
"anyOf": [
{
"type": "string"
},
{
"format": "int64",
"type": "integer"
}
],
"description": "ID of a request, which can be either a string or an integer."
},
"RequestUserInputQuestion": {
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"items": {
"$ref": "#/definitions/RequestUserInputQuestionOption"
},
"type": [
"array",
"null"
]
},
"question": {
"type": "string"
}
},
"required": [
"header",
"id",
"question"
],
"type": "object"
},
"RequestUserInputQuestionOption": {
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"description",
"label"
],
"type": "object"
},
"Result_of_CallToolResult_or_String": {
"oneOf": [
{
"properties": {
"Ok": {
"$ref": "#/definitions/CallToolResult"
}
},
"required": [
"Ok"
],
"title": "OkResult_of_CallToolResult_or_String",
"type": "object"
},
{
"properties": {
"Err": {
"type": "string"
}
},
"required": [
"Err"
],
"title": "ErrResult_of_CallToolResult_or_String",
"type": "object"
}
]
},
"ReviewCodeLocation": {
"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"
},
"ReviewDecision": {
"description": "User's decision in response to an ExecApprovalRequest.",
"oneOf": [
{
"description": "User has approved this command and the agent should execute it.",
"enum": [
"approved"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User has approved this command and wants to apply the proposed execpolicy amendment so future matching commands are permitted.",
"properties": {
"approved_execpolicy_amendment": {
"properties": {
"proposed_execpolicy_amendment": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"proposed_execpolicy_amendment"
],
"type": "object"
}
},
"required": [
"approved_execpolicy_amendment"
],
"title": "ApprovedExecpolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has approved this command and wants to automatically approve any future identical instances (`command` and `cwd` match exactly) for the remainder of the session.",
"enum": [
"approved_for_session"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "User chose to persist a network policy rule (allow/deny) for future requests to the same host.",
"properties": {
"network_policy_amendment": {
"properties": {
"network_policy_amendment": {
"$ref": "#/definitions/NetworkPolicyAmendment"
}
},
"required": [
"network_policy_amendment"
],
"type": "object"
}
},
"required": [
"network_policy_amendment"
],
"title": "NetworkPolicyAmendmentReviewDecision",
"type": "object"
},
{
"description": "User has denied this command and the agent should not execute it, but it should continue the session and try something else.",
"enum": [
"denied"
],
"type": "string"
},
{
"description": "User has denied this command and the agent should not do anything until the user's next command.",
"enum": [
"abort"
],
"type": "string"
}
]
},
"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"
},
"ServerNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Notification sent from the server to the client.",
"oneOf": [
{
"description": "NEW NOTIFICATIONS",
"properties": {
"method": {
"enum": [
"error"
],
"title": "ErrorNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ErrorNotification"
}
},
"required": [
"method",
"params"
],
"title": "ErrorNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/started"
],
"title": "Thread/startedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadStartedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/startedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/status/changed"
],
"title": "Thread/status/changedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadStatusChangedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/status/changedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/archived"
],
"title": "Thread/archivedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadArchivedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/archivedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/unarchived"
],
"title": "Thread/unarchivedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadUnarchivedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/unarchivedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/name/updated"
],
"title": "Thread/name/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadNameUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/name/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"thread/tokenUsage/updated"
],
"title": "Thread/tokenUsage/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ThreadTokenUsageUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/tokenUsage/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/started"
],
"title": "Turn/startedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnStartedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/startedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/completed"
],
"title": "Turn/completedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/completedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/diff/updated"
],
"title": "Turn/diff/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnDiffUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/diff/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"turn/plan/updated"
],
"title": "Turn/plan/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TurnPlanUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Turn/plan/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/started"
],
"title": "Item/startedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ItemStartedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/startedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/completed"
],
"title": "Item/completedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ItemCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/completedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/agentMessage/delta"
],
"title": "Item/agentMessage/deltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AgentMessageDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/agentMessage/deltaNotification",
"type": "object"
},
{
"description": "EXPERIMENTAL - proposed plan streaming deltas for plan items.",
"properties": {
"method": {
"enum": [
"item/plan/delta"
],
"title": "Item/plan/deltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/PlanDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/plan/deltaNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/commandExecution/outputDelta"
],
"title": "Item/commandExecution/outputDeltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/CommandExecutionOutputDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/commandExecution/outputDeltaNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/commandExecution/terminalInteraction"
],
"title": "Item/commandExecution/terminalInteractionNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/TerminalInteractionNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/commandExecution/terminalInteractionNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/fileChange/outputDelta"
],
"title": "Item/fileChange/outputDeltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/FileChangeOutputDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/fileChange/outputDeltaNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/mcpToolCall/progress"
],
"title": "Item/mcpToolCall/progressNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/McpToolCallProgressNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/mcpToolCall/progressNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"mcpServer/oauthLogin/completed"
],
"title": "McpServer/oauthLogin/completedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/McpServerOauthLoginCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "McpServer/oauthLogin/completedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"account/updated"
],
"title": "Account/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AccountUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Account/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"account/rateLimits/updated"
],
"title": "Account/rateLimits/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AccountRateLimitsUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Account/rateLimits/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"app/list/updated"
],
"title": "App/list/updatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AppListUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "App/list/updatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/reasoning/summaryTextDelta"
],
"title": "Item/reasoning/summaryTextDeltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ReasoningSummaryTextDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/reasoning/summaryTextDeltaNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/reasoning/summaryPartAdded"
],
"title": "Item/reasoning/summaryPartAddedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ReasoningSummaryPartAddedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/reasoning/summaryPartAddedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"item/reasoning/textDelta"
],
"title": "Item/reasoning/textDeltaNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ReasoningTextDeltaNotification"
}
},
"required": [
"method",
"params"
],
"title": "Item/reasoning/textDeltaNotification",
"type": "object"
},
{
"description": "Deprecated: Use `ContextCompaction` item type instead.",
"properties": {
"method": {
"enum": [
"thread/compacted"
],
"title": "Thread/compactedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ContextCompactedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Thread/compactedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"model/rerouted"
],
"title": "Model/reroutedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ModelReroutedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Model/reroutedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"deprecationNotice"
],
"title": "DeprecationNoticeNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/DeprecationNoticeNotification"
}
},
"required": [
"method",
"params"
],
"title": "DeprecationNoticeNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"configWarning"
],
"title": "ConfigWarningNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/ConfigWarningNotification"
}
},
"required": [
"method",
"params"
],
"title": "ConfigWarningNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"fuzzyFileSearch/sessionUpdated"
],
"title": "FuzzyFileSearch/sessionUpdatedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/FuzzyFileSearchSessionUpdatedNotification"
}
},
"required": [
"method",
"params"
],
"title": "FuzzyFileSearch/sessionUpdatedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"fuzzyFileSearch/sessionCompleted"
],
"title": "FuzzyFileSearch/sessionCompletedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/FuzzyFileSearchSessionCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "FuzzyFileSearch/sessionCompletedNotification",
"type": "object"
},
{
"description": "Notifies the user of world-writable directories on Windows, which cannot be protected by the sandbox.",
"properties": {
"method": {
"enum": [
"windows/worldWritableWarning"
],
"title": "Windows/worldWritableWarningNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/WindowsWorldWritableWarningNotification"
}
},
"required": [
"method",
"params"
],
"title": "Windows/worldWritableWarningNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"windowsSandbox/setupCompleted"
],
"title": "WindowsSandbox/setupCompletedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/WindowsSandboxSetupCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "WindowsSandbox/setupCompletedNotification",
"type": "object"
},
{
"properties": {
"method": {
"enum": [
"account/login/completed"
],
"title": "Account/login/completedNotificationMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/v2/AccountLoginCompletedNotification"
}
},
"required": [
"method",
"params"
],
"title": "Account/login/completedNotification",
"type": "object"
}
],
"title": "ServerNotification"
},
"ServerRequest": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Request initiated from the server and sent to the client.",
"oneOf": [
{
"description": "NEW APIs Sent when approval is requested for a specific command execution. This request is used for Turns started via turn/start.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"item/commandExecution/requestApproval"
],
"title": "Item/commandExecution/requestApprovalRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/CommandExecutionRequestApprovalParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Item/commandExecution/requestApprovalRequest",
"type": "object"
},
{
"description": "Sent when approval is requested for a specific file change. This request is used for Turns started via turn/start.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"item/fileChange/requestApproval"
],
"title": "Item/fileChange/requestApprovalRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/FileChangeRequestApprovalParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Item/fileChange/requestApprovalRequest",
"type": "object"
},
{
"description": "EXPERIMENTAL - Request input from the user for a tool call.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"item/tool/requestUserInput"
],
"title": "Item/tool/requestUserInputRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ToolRequestUserInputParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Item/tool/requestUserInputRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"skill/requestApproval"
],
"title": "Skill/requestApprovalRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/SkillRequestApprovalParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Skill/requestApprovalRequest",
"type": "object"
},
{
"description": "Execute a dynamic tool call on the client.",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"item/tool/call"
],
"title": "Item/tool/callRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/DynamicToolCallParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Item/tool/callRequest",
"type": "object"
},
{
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"account/chatgptAuthTokens/refresh"
],
"title": "Account/chatgptAuthTokens/refreshRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ChatgptAuthTokensRefreshParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "Account/chatgptAuthTokens/refreshRequest",
"type": "object"
},
{
"description": "DEPRECATED APIs below Request to approve a patch. This request is used for Turns started via the legacy APIs (i.e. SendUserTurn, SendUserMessage).",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"applyPatchApproval"
],
"title": "ApplyPatchApprovalRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ApplyPatchApprovalParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ApplyPatchApprovalRequest",
"type": "object"
},
{
"description": "Request to exec a command. This request is used for Turns started via the legacy APIs (i.e. SendUserTurn, SendUserMessage).",
"properties": {
"id": {
"$ref": "#/definitions/RequestId"
},
"method": {
"enum": [
"execCommandApproval"
],
"title": "ExecCommandApprovalRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/ExecCommandApprovalParams"
}
},
"required": [
"id",
"method",
"params"
],
"title": "ExecCommandApprovalRequest",
"type": "object"
}
],
"title": "ServerRequest"
},
"SessionNetworkProxyRuntime": {
"properties": {
"admin_addr": {
"type": "string"
},
"http_addr": {
"type": "string"
},
"socks_addr": {
"type": "string"
}
},
"required": [
"admin_addr",
"http_addr",
"socks_addr"
],
"type": "object"
},
"SkillApprovalDecision": {
"enum": [
"approve",
"decline"
],
"type": "string"
},
"SkillRequestApprovalParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"itemId": {
"type": "string"
},
"skillName": {
"type": "string"
}
},
"required": [
"itemId",
"skillName"
],
"title": "SkillRequestApprovalParams",
"type": "object"
},
"SkillRequestApprovalResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"decision": {
"$ref": "#/definitions/SkillApprovalDecision"
}
},
"required": [
"decision"
],
"title": "SkillRequestApprovalResponse",
"type": "object"
},
"StepStatus": {
"enum": [
"pending",
"in_progress",
"completed"
],
"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"
},
"ToolRequestUserInputAnswer": {
"description": "EXPERIMENTAL. Captures a user's answer to a request_user_input question.",
"properties": {
"answers": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"answers"
],
"type": "object"
},
"ToolRequestUserInputOption": {
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
"properties": {
"description": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"description",
"label"
],
"type": "object"
},
"ToolRequestUserInputParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL. Params sent with a request_user_input event.",
"properties": {
"itemId": {
"type": "string"
},
"questions": {
"items": {
"$ref": "#/definitions/ToolRequestUserInputQuestion"
},
"type": "array"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"questions",
"threadId",
"turnId"
],
"title": "ToolRequestUserInputParams",
"type": "object"
},
"ToolRequestUserInputQuestion": {
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
"properties": {
"header": {
"type": "string"
},
"id": {
"type": "string"
},
"isOther": {
"default": false,
"type": "boolean"
},
"isSecret": {
"default": false,
"type": "boolean"
},
"options": {
"items": {
"$ref": "#/definitions/ToolRequestUserInputOption"
},
"type": [
"array",
"null"
]
},
"question": {
"type": "string"
}
},
"required": [
"header",
"id",
"question"
],
"type": "object"
},
"ToolRequestUserInputResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL. Response payload mapping question ids to answers.",
"properties": {
"answers": {
"additionalProperties": {
"$ref": "#/definitions/ToolRequestUserInputAnswer"
},
"type": "object"
}
},
"required": [
"answers"
],
"title": "ToolRequestUserInputResponse",
"type": "object"
},
"TurnAbortReason": {
"enum": [
"interrupted",
"replaced",
"review_ended"
],
"type": "string"
},
"TurnItem": {
"oneOf": [
{
"properties": {
"content": {
"items": {
"$ref": "#/definitions/UserInput"
},
"type": "array"
},
"id": {
"type": "string"
},
"type": {
"enum": [
"UserMessage"
],
"title": "UserMessageTurnItemType",
"type": "string"
}
},
"required": [
"content",
"id",
"type"
],
"title": "UserMessageTurnItem",
"type": "object"
},
{
"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`.",
"properties": {
"content": {
"items": {
"$ref": "#/definitions/AgentMessageContent"
},
"type": "array"
},
"id": {
"type": "string"
},
"phase": {
"anyOf": [
{
"$ref": "#/definitions/MessagePhase"
},
{
"type": "null"
}
],
"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."
},
"type": {
"enum": [
"AgentMessage"
],
"title": "AgentMessageTurnItemType",
"type": "string"
}
},
"required": [
"content",
"id",
"type"
],
"title": "AgentMessageTurnItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"enum": [
"Plan"
],
"title": "PlanTurnItemType",
"type": "string"
}
},
"required": [
"id",
"text",
"type"
],
"title": "PlanTurnItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"raw_content": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"summary_text": {
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"enum": [
"Reasoning"
],
"title": "ReasoningTurnItemType",
"type": "string"
}
},
"required": [
"id",
"summary_text",
"type"
],
"title": "ReasoningTurnItem",
"type": "object"
},
{
"properties": {
"action": {
"$ref": "#/definitions/WebSearchAction"
},
"id": {
"type": "string"
},
"query": {
"type": "string"
},
"type": {
"enum": [
"WebSearch"
],
"title": "WebSearchTurnItemType",
"type": "string"
}
},
"required": [
"action",
"id",
"query",
"type"
],
"title": "WebSearchTurnItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [
"ContextCompaction"
],
"title": "ContextCompactionTurnItemType",
"type": "string"
}
},
"required": [
"id",
"type"
],
"title": "ContextCompactionTurnItem",
"type": "object"
}
]
},
"v2": {
"AbsolutePathBuf": {
"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"
},
"Account": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"apiKey"
],
"title": "ApiKeyAccountType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ApiKeyAccount",
"type": "object"
},
{
"properties": {
"email": {
"type": "string"
},
"planType": {
"$ref": "#/definitions/v2/PlanType"
},
"type": {
"enum": [
"chatgpt"
],
"title": "ChatgptAccountType",
"type": "string"
}
},
"required": [
"email",
"planType",
"type"
],
"title": "ChatgptAccount",
"type": "object"
}
]
},
"AccountLoginCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"loginId": {
"type": [
"string",
"null"
]
},
"success": {
"type": "boolean"
}
},
"required": [
"success"
],
"title": "AccountLoginCompletedNotification",
"type": "object"
},
"AccountRateLimitsUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"rateLimits": {
"$ref": "#/definitions/v2/RateLimitSnapshot"
}
},
"required": [
"rateLimits"
],
"title": "AccountRateLimitsUpdatedNotification",
"type": "object"
},
"AccountUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"authMode": {
"anyOf": [
{
"$ref": "#/definitions/v2/AuthMode"
},
{
"type": "null"
}
]
}
},
"title": "AccountUpdatedNotification",
"type": "object"
},
"AgentMessageDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"title": "AgentMessageDeltaNotification",
"type": "object"
},
"AnalyticsConfig": {
"additionalProperties": true,
"properties": {
"enabled": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
},
"AppBranding": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"category": {
"type": [
"string",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"isDiscoverableApp": {
"type": "boolean"
},
"privacyPolicy": {
"type": [
"string",
"null"
]
},
"termsOfService": {
"type": [
"string",
"null"
]
},
"website": {
"type": [
"string",
"null"
]
}
},
"required": [
"isDiscoverableApp"
],
"type": "object"
},
"AppConfig": {
"properties": {
"default_tools_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppToolApproval"
},
{
"type": "null"
}
]
},
"default_tools_enabled": {
"type": [
"boolean",
"null"
]
},
"destructive_enabled": {
"type": [
"boolean",
"null"
]
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"type": [
"boolean",
"null"
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppToolsConfig"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"AppInfo": {
"description": "EXPERIMENTAL - app metadata returned by app-list APIs.",
"properties": {
"appMetadata": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppMetadata"
},
{
"type": "null"
}
]
},
"branding": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppBranding"
},
{
"type": "null"
}
]
},
"description": {
"type": [
"string",
"null"
]
},
"distributionChannel": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string"
},
"installUrl": {
"type": [
"string",
"null"
]
},
"isAccessible": {
"default": false,
"type": "boolean"
},
"isEnabled": {
"default": true,
"description": "Whether this app is enabled in config.toml. Example: ```toml [apps.bad_app] enabled = false ```",
"type": "boolean"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"type": [
"object",
"null"
]
},
"logoUrl": {
"type": [
"string",
"null"
]
},
"logoUrlDark": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"AppListUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - notification emitted when the app list changes.",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/AppInfo"
},
"type": "array"
}
},
"required": [
"data"
],
"title": "AppListUpdatedNotification",
"type": "object"
},
"AppMetadata": {
"properties": {
"categories": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"developer": {
"type": [
"string",
"null"
]
},
"firstPartyRequiresInstall": {
"type": [
"boolean",
"null"
]
},
"firstPartyType": {
"type": [
"string",
"null"
]
},
"review": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppReview"
},
{
"type": "null"
}
]
},
"screenshots": {
"items": {
"$ref": "#/definitions/v2/AppScreenshot"
},
"type": [
"array",
"null"
]
},
"seoDescription": {
"type": [
"string",
"null"
]
},
"showInComposerWhenUnlinked": {
"type": [
"boolean",
"null"
]
},
"subCategories": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"version": {
"type": [
"string",
"null"
]
},
"versionId": {
"type": [
"string",
"null"
]
},
"versionNotes": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"AppReview": {
"properties": {
"status": {
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"AppScreenshot": {
"properties": {
"fileId": {
"type": [
"string",
"null"
]
},
"url": {
"type": [
"string",
"null"
]
},
"userPrompt": {
"type": "string"
}
},
"required": [
"userPrompt"
],
"type": "object"
},
"AppToolApproval": {
"enum": [
"auto",
"prompt",
"approve"
],
"type": "string"
},
"AppToolConfig": {
"properties": {
"approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppToolApproval"
},
{
"type": "null"
}
]
},
"enabled": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
},
"AppToolsConfig": {
"type": "object"
},
"AppsConfig": {
"properties": {
"_default": {
"anyOf": [
{
"$ref": "#/definitions/v2/AppsDefaultConfig"
},
{
"type": "null"
}
],
"default": null
}
},
"type": "object"
},
"AppsDefaultConfig": {
"properties": {
"destructive_enabled": {
"default": true,
"type": "boolean"
},
"enabled": {
"default": true,
"type": "boolean"
},
"open_world_enabled": {
"default": true,
"type": "boolean"
}
},
"type": "object"
},
"AppsListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - list available apps/connectors.",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"forceRefetch": {
"description": "When true, bypass app caches and fetch the latest data from sources.",
"type": "boolean"
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"threadId": {
"description": "Optional thread id used to evaluate app feature gating from that thread's config.",
"type": [
"string",
"null"
]
}
},
"title": "AppsListParams",
"type": "object"
},
"AppsListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - app list response.",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/AppInfo"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "AppsListResponse",
"type": "object"
},
"AskForApproval": {
"oneOf": [
{
"enum": [
"untrusted",
"on-failure",
"on-request",
"never"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"reject": {
"properties": {
"mcp_elicitations": {
"type": "boolean"
},
"rules": {
"type": "boolean"
},
"sandbox_approval": {
"type": "boolean"
}
},
"required": [
"mcp_elicitations",
"rules",
"sandbox_approval"
],
"type": "object"
}
},
"required": [
"reject"
],
"title": "RejectAskForApproval",
"type": "object"
}
]
},
"AuthMode": {
"description": "Authentication mode for OpenAI-backed providers.",
"oneOf": [
{
"description": "OpenAI API key provided by the caller and stored by Codex.",
"enum": [
"apikey"
],
"type": "string"
},
{
"description": "ChatGPT OAuth managed by Codex (tokens persisted and refreshed by Codex).",
"enum": [
"chatgpt"
],
"type": "string"
},
{
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE.\n\nChatGPT auth tokens are supplied by an external host app and are only stored in memory. Token refresh must be handled by the external host app.",
"enum": [
"chatgptAuthTokens"
],
"type": "string"
}
]
},
"ByteRange": {
"properties": {
"end": {
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"start": {
"format": "uint",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"end",
"start"
],
"type": "object"
},
"CancelLoginAccountParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"loginId": {
"type": "string"
}
},
"required": [
"loginId"
],
"title": "CancelLoginAccountParams",
"type": "object"
},
"CancelLoginAccountResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"status": {
"$ref": "#/definitions/v2/CancelLoginAccountStatus"
}
},
"required": [
"status"
],
"title": "CancelLoginAccountResponse",
"type": "object"
},
"CancelLoginAccountStatus": {
"enum": [
"canceled",
"notFound"
],
"type": "string"
},
"CodexErrorInfo": {
"description": "This translation layer make sure that we expose codex error code in camel case.\n\nWhen an upstream HTTP status is available (for example, from the Responses API or a provider), it is forwarded in `httpStatusCode` on the relevant `codexErrorInfo` variant.",
"oneOf": [
{
"enum": [
"contextWindowExceeded",
"usageLimitExceeded",
"serverOverloaded",
"internalServerError",
"unauthorized",
"badRequest",
"threadRollbackFailed",
"sandboxError",
"other"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"httpConnectionFailed": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
},
"required": [
"httpConnectionFailed"
],
"title": "HttpConnectionFailedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "Failed to connect to the response SSE stream.",
"properties": {
"responseStreamConnectionFailed": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
},
"required": [
"responseStreamConnectionFailed"
],
"title": "ResponseStreamConnectionFailedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "The response SSE stream disconnected in the middle of a turn before completion.",
"properties": {
"responseStreamDisconnected": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
},
"required": [
"responseStreamDisconnected"
],
"title": "ResponseStreamDisconnectedCodexErrorInfo",
"type": "object"
},
{
"additionalProperties": false,
"description": "Reached the retry limit for responses.",
"properties": {
"responseTooManyFailedAttempts": {
"properties": {
"httpStatusCode": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
}
},
"required": [
"responseTooManyFailedAttempts"
],
"title": "ResponseTooManyFailedAttemptsCodexErrorInfo",
"type": "object"
}
]
},
"CollabAgentState": {
"properties": {
"message": {
"type": [
"string",
"null"
]
},
"status": {
"$ref": "#/definitions/v2/CollabAgentStatus"
}
},
"required": [
"status"
],
"type": "object"
},
"CollabAgentStatus": {
"enum": [
"pendingInit",
"running",
"completed",
"errored",
"shutdown",
"notFound"
],
"type": "string"
},
"CollabAgentTool": {
"enum": [
"spawnAgent",
"sendInput",
"resumeAgent",
"wait",
"closeAgent"
],
"type": "string"
},
"CollabAgentToolCallStatus": {
"enum": [
"inProgress",
"completed",
"failed"
],
"type": "string"
},
"CollaborationMode": {
"description": "Collaboration mode for a Codex session.",
"properties": {
"mode": {
"$ref": "#/definitions/v2/ModeKind"
},
"settings": {
"$ref": "#/definitions/v2/Settings"
}
},
"required": [
"mode",
"settings"
],
"type": "object"
},
"CollaborationModeMask": {
"description": "A mask for collaboration mode settings, allowing partial updates. All fields except `name` are optional, enabling selective updates.",
"properties": {
"developer_instructions": {
"type": [
"string",
"null"
]
},
"mode": {
"anyOf": [
{
"$ref": "#/definitions/v2/ModeKind"
},
{
"type": "null"
}
]
},
"model": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"reasoning_effort": {
"anyOf": [
{
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
{
"type": "null"
}
]
}
},
"required": [
"name"
],
"type": "object"
},
"CommandAction": {
"oneOf": [
{
"properties": {
"command": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"enum": [
"read"
],
"title": "ReadCommandActionType",
"type": "string"
}
},
"required": [
"command",
"name",
"path",
"type"
],
"title": "ReadCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"listFiles"
],
"title": "ListFilesCommandActionType",
"type": "string"
}
},
"required": [
"command",
"type"
],
"title": "ListFilesCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"path": {
"type": [
"string",
"null"
]
},
"query": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"search"
],
"title": "SearchCommandActionType",
"type": "string"
}
},
"required": [
"command",
"type"
],
"title": "SearchCommandAction",
"type": "object"
},
{
"properties": {
"command": {
"type": "string"
},
"type": {
"enum": [
"unknown"
],
"title": "UnknownCommandActionType",
"type": "string"
}
},
"required": [
"command",
"type"
],
"title": "UnknownCommandAction",
"type": "object"
}
]
},
"CommandExecParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
},
"cwd": {
"type": [
"string",
"null"
]
},
"sandboxPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxPolicy"
},
{
"type": "null"
}
]
},
"timeoutMs": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"command"
],
"title": "CommandExecParams",
"type": "object"
},
"CommandExecResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"exitCode": {
"format": "int32",
"type": "integer"
},
"stderr": {
"type": "string"
},
"stdout": {
"type": "string"
}
},
"required": [
"exitCode",
"stderr",
"stdout"
],
"title": "CommandExecResponse",
"type": "object"
},
"CommandExecutionOutputDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"title": "CommandExecutionOutputDeltaNotification",
"type": "object"
},
"CommandExecutionStatus": {
"enum": [
"inProgress",
"completed",
"failed",
"declined"
],
"type": "string"
},
"Config": {
"additionalProperties": true,
"properties": {
"analytics": {
"anyOf": [
{
"$ref": "#/definitions/v2/AnalyticsConfig"
},
{
"type": "null"
}
]
},
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
]
},
"compact_prompt": {
"type": [
"string",
"null"
]
},
"developer_instructions": {
"type": [
"string",
"null"
]
},
"forced_chatgpt_workspace_id": {
"type": [
"string",
"null"
]
},
"forced_login_method": {
"anyOf": [
{
"$ref": "#/definitions/v2/ForcedLoginMethod"
},
{
"type": "null"
}
]
},
"instructions": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"model_auto_compact_token_limit": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"model_context_window": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"model_provider": {
"type": [
"string",
"null"
]
},
"model_reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model_reasoning_summary": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningSummary"
},
{
"type": "null"
}
]
},
"model_verbosity": {
"anyOf": [
{
"$ref": "#/definitions/v2/Verbosity"
},
{
"type": "null"
}
]
},
"profile": {
"type": [
"string",
"null"
]
},
"profiles": {
"additionalProperties": {
"$ref": "#/definitions/v2/ProfileV2"
},
"default": {},
"type": "object"
},
"review_model": {
"type": [
"string",
"null"
]
},
"sandbox_mode": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxMode"
},
{
"type": "null"
}
]
},
"sandbox_workspace_write": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxWorkspaceWrite"
},
{
"type": "null"
}
]
},
"tools": {
"anyOf": [
{
"$ref": "#/definitions/v2/ToolsV2"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/v2/WebSearchMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"ConfigBatchWriteParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"edits": {
"items": {
"$ref": "#/definitions/v2/ConfigEdit"
},
"type": "array"
},
"expectedVersion": {
"type": [
"string",
"null"
]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": [
"string",
"null"
]
}
},
"required": [
"edits"
],
"title": "ConfigBatchWriteParams",
"type": "object"
},
"ConfigEdit": {
"properties": {
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/v2/MergeStrategy"
},
"value": true
},
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"type": "object"
},
"ConfigLayer": {
"properties": {
"config": true,
"disabledReason": {
"type": [
"string",
"null"
]
},
"name": {
"$ref": "#/definitions/v2/ConfigLayerSource"
},
"version": {
"type": "string"
}
},
"required": [
"config",
"name",
"version"
],
"type": "object"
},
"ConfigLayerMetadata": {
"properties": {
"name": {
"$ref": "#/definitions/v2/ConfigLayerSource"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
],
"type": "object"
},
"ConfigLayerSource": {
"oneOf": [
{
"description": "Managed preferences layer delivered by MDM (macOS only).",
"properties": {
"domain": {
"type": "string"
},
"key": {
"type": "string"
},
"type": {
"enum": [
"mdm"
],
"title": "MdmConfigLayerSourceType",
"type": "string"
}
},
"required": [
"domain",
"key",
"type"
],
"title": "MdmConfigLayerSource",
"type": "object"
},
{
"description": "Managed config layer from a file (usually `managed_config.toml`).",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/v2/AbsolutePathBuf"
}
],
"description": "This is the path to the system config.toml file, though it is not guaranteed to exist."
},
"type": {
"enum": [
"system"
],
"title": "SystemConfigLayerSourceType",
"type": "string"
}
},
"required": [
"file",
"type"
],
"title": "SystemConfigLayerSource",
"type": "object"
},
{
"description": "User config layer from $CODEX_HOME/config.toml. This layer is special in that it is expected to be: - writable by the user - generally outside the workspace directory",
"properties": {
"file": {
"allOf": [
{
"$ref": "#/definitions/v2/AbsolutePathBuf"
}
],
"description": "This is the path to the user's config.toml file, though it is not guaranteed to exist."
},
"type": {
"enum": [
"user"
],
"title": "UserConfigLayerSourceType",
"type": "string"
}
},
"required": [
"file",
"type"
],
"title": "UserConfigLayerSource",
"type": "object"
},
{
"description": "Path to a .codex/ folder within a project. There could be multiple of these between `cwd` and the project/repo root.",
"properties": {
"dotCodexFolder": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": {
"enum": [
"project"
],
"title": "ProjectConfigLayerSourceType",
"type": "string"
}
},
"required": [
"dotCodexFolder",
"type"
],
"title": "ProjectConfigLayerSource",
"type": "object"
},
{
"description": "Session-layer overrides supplied via `-c`/`--config`.",
"properties": {
"type": {
"enum": [
"sessionFlags"
],
"title": "SessionFlagsConfigLayerSourceType",
"type": "string"
}
},
"required": [
"type"
],
"title": "SessionFlagsConfigLayerSource",
"type": "object"
},
{
"description": "`managed_config.toml` was designed to be a config that was loaded as the last layer on top of everything else. This scheme did not quite work out as intended, but we keep this variant as a \"best effort\" while we phase out `managed_config.toml` in favor of `requirements.toml`.",
"properties": {
"file": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": {
"enum": [
"legacyManagedConfigTomlFromFile"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSourceType",
"type": "string"
}
},
"required": [
"file",
"type"
],
"title": "LegacyManagedConfigTomlFromFileConfigLayerSource",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"legacyManagedConfigTomlFromMdm"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSourceType",
"type": "string"
}
},
"required": [
"type"
],
"title": "LegacyManagedConfigTomlFromMdmConfigLayerSource",
"type": "object"
}
]
},
"ConfigReadParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cwd": {
"description": "Optional working directory to resolve project config layers. If specified, return the effective config as seen from that directory (i.e., including any project layers between `cwd` and the project/repo root).",
"type": [
"string",
"null"
]
},
"includeLayers": {
"default": false,
"type": "boolean"
}
},
"title": "ConfigReadParams",
"type": "object"
},
"ConfigReadResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"config": {
"$ref": "#/definitions/v2/Config"
},
"layers": {
"items": {
"$ref": "#/definitions/v2/ConfigLayer"
},
"type": [
"array",
"null"
]
},
"origins": {
"additionalProperties": {
"$ref": "#/definitions/v2/ConfigLayerMetadata"
},
"type": "object"
}
},
"required": [
"config",
"origins"
],
"title": "ConfigReadResponse",
"type": "object"
},
"ConfigRequirements": {
"properties": {
"allowedApprovalPolicies": {
"items": {
"$ref": "#/definitions/v2/AskForApproval"
},
"type": [
"array",
"null"
]
},
"allowedSandboxModes": {
"items": {
"$ref": "#/definitions/v2/SandboxMode"
},
"type": [
"array",
"null"
]
},
"allowedWebSearchModes": {
"items": {
"$ref": "#/definitions/v2/WebSearchMode"
},
"type": [
"array",
"null"
]
},
"enforceResidency": {
"anyOf": [
{
"$ref": "#/definitions/v2/ResidencyRequirement"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"ConfigRequirementsReadResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"requirements": {
"anyOf": [
{
"$ref": "#/definitions/v2/ConfigRequirements"
},
{
"type": "null"
}
],
"description": "Null if no requirements are configured (e.g. no requirements.toml/MDM entries)."
}
},
"title": "ConfigRequirementsReadResponse",
"type": "object"
},
"ConfigValueWriteParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"expectedVersion": {
"type": [
"string",
"null"
]
},
"filePath": {
"description": "Path to the config file to write; defaults to the user's `config.toml` when omitted.",
"type": [
"string",
"null"
]
},
"keyPath": {
"type": "string"
},
"mergeStrategy": {
"$ref": "#/definitions/v2/MergeStrategy"
},
"value": true
},
"required": [
"keyPath",
"mergeStrategy",
"value"
],
"title": "ConfigValueWriteParams",
"type": "object"
},
"ConfigWarningNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"details": {
"description": "Optional extra guidance or error details.",
"type": [
"string",
"null"
]
},
"path": {
"description": "Optional path to the config file that triggered the warning.",
"type": [
"string",
"null"
]
},
"range": {
"anyOf": [
{
"$ref": "#/definitions/v2/TextRange"
},
{
"type": "null"
}
],
"description": "Optional range for the error location inside the config file."
},
"summary": {
"description": "Concise summary of the warning.",
"type": "string"
}
},
"required": [
"summary"
],
"title": "ConfigWarningNotification",
"type": "object"
},
"ConfigWriteResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"filePath": {
"allOf": [
{
"$ref": "#/definitions/v2/AbsolutePathBuf"
}
],
"description": "Canonical path to the config file that was written."
},
"overriddenMetadata": {
"anyOf": [
{
"$ref": "#/definitions/v2/OverriddenMetadata"
},
{
"type": "null"
}
]
},
"status": {
"$ref": "#/definitions/v2/WriteStatus"
},
"version": {
"type": "string"
}
},
"required": [
"filePath",
"status",
"version"
],
"title": "ConfigWriteResponse",
"type": "object"
},
"ContentItem": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"input_text"
],
"title": "InputTextContentItemType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "InputTextContentItem",
"type": "object"
},
{
"properties": {
"image_url": {
"type": "string"
},
"type": {
"enum": [
"input_image"
],
"title": "InputImageContentItemType",
"type": "string"
}
},
"required": [
"image_url",
"type"
],
"title": "InputImageContentItem",
"type": "object"
},
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"output_text"
],
"title": "OutputTextContentItemType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "OutputTextContentItem",
"type": "object"
}
]
},
"ContextCompactedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Deprecated: Use `ContextCompaction` item type instead.",
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId"
],
"title": "ContextCompactedNotification",
"type": "object"
},
"CreditsSnapshot": {
"properties": {
"balance": {
"type": [
"string",
"null"
]
},
"hasCredits": {
"type": "boolean"
},
"unlimited": {
"type": "boolean"
}
},
"required": [
"hasCredits",
"unlimited"
],
"type": "object"
},
"DeprecationNoticeNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"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"
}
},
"required": [
"summary"
],
"title": "DeprecationNoticeNotification",
"type": "object"
},
"DynamicToolSpec": {
"properties": {
"description": {
"type": "string"
},
"inputSchema": true,
"name": {
"type": "string"
}
},
"required": [
"description",
"inputSchema",
"name"
],
"type": "object"
},
"ErrorNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"error": {
"$ref": "#/definitions/v2/TurnError"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
},
"willRetry": {
"type": "boolean"
}
},
"required": [
"error",
"threadId",
"turnId",
"willRetry"
],
"title": "ErrorNotification",
"type": "object"
},
"ExperimentalFeature": {
"properties": {
"announcement": {
"description": "Announcement copy shown to users when the feature is introduced. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"defaultEnabled": {
"description": "Whether this feature is enabled by default.",
"type": "boolean"
},
"description": {
"description": "Short summary describing what the feature does. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"displayName": {
"description": "User-facing display name shown in the experimental features UI. Null when this feature is not in beta.",
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Whether this feature is currently enabled in the loaded config.",
"type": "boolean"
},
"name": {
"description": "Stable key used in config.toml and CLI flag toggles.",
"type": "string"
},
"stage": {
"allOf": [
{
"$ref": "#/definitions/v2/ExperimentalFeatureStage"
}
],
"description": "Lifecycle stage of this feature flag."
}
},
"required": [
"defaultEnabled",
"enabled",
"name",
"stage"
],
"type": "object"
},
"ExperimentalFeatureListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"title": "ExperimentalFeatureListParams",
"type": "object"
},
"ExperimentalFeatureListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/ExperimentalFeature"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "ExperimentalFeatureListResponse",
"type": "object"
},
"ExperimentalFeatureStage": {
"oneOf": [
{
"description": "Feature is available for user testing and feedback.",
"enum": [
"beta"
],
"type": "string"
},
{
"description": "Feature is still being built and not ready for broad use.",
"enum": [
"underDevelopment"
],
"type": "string"
},
{
"description": "Feature is production-ready.",
"enum": [
"stable"
],
"type": "string"
},
{
"description": "Feature is deprecated and should be avoided.",
"enum": [
"deprecated"
],
"type": "string"
},
{
"description": "Feature flag is retained only for backwards compatibility.",
"enum": [
"removed"
],
"type": "string"
}
]
},
"FeedbackUploadParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"classification": {
"type": "string"
},
"extraLogFiles": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"includeLogs": {
"type": "boolean"
},
"reason": {
"type": [
"string",
"null"
]
},
"threadId": {
"type": [
"string",
"null"
]
}
},
"required": [
"classification",
"includeLogs"
],
"title": "FeedbackUploadParams",
"type": "object"
},
"FeedbackUploadResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "FeedbackUploadResponse",
"type": "object"
},
"FileChangeOutputDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"title": "FileChangeOutputDeltaNotification",
"type": "object"
},
"FileUpdateChange": {
"properties": {
"diff": {
"type": "string"
},
"kind": {
"$ref": "#/definitions/v2/PatchChangeKind"
},
"path": {
"type": "string"
}
},
"required": [
"diff",
"kind",
"path"
],
"type": "object"
},
"ForcedLoginMethod": {
"enum": [
"chatgpt",
"api"
],
"type": "string"
},
"FunctionCallOutputBody": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"$ref": "#/definitions/v2/FunctionCallOutputContentItem"
},
"type": "array"
}
]
},
"FunctionCallOutputContentItem": {
"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.",
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"input_text"
],
"title": "InputTextFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "InputTextFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"image_url": {
"type": "string"
},
"type": {
"enum": [
"input_image"
],
"title": "InputImageFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"image_url",
"type"
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
}
]
},
"FunctionCallOutputPayload": {
"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.",
"properties": {
"body": {
"$ref": "#/definitions/v2/FunctionCallOutputBody"
},
"success": {
"type": [
"boolean",
"null"
]
}
},
"required": [
"body"
],
"type": "object"
},
"GetAccountParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"refreshToken": {
"default": false,
"description": "When `true`, requests a proactive token refresh before returning.\n\nIn managed auth mode this triggers the normal refresh-token flow. In external auth mode this flag is ignored. Clients should refresh tokens themselves and call `account/login/start` with `chatgptAuthTokens`.",
"type": "boolean"
}
},
"title": "GetAccountParams",
"type": "object"
},
"GetAccountRateLimitsResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"rateLimits": {
"allOf": [
{
"$ref": "#/definitions/v2/RateLimitSnapshot"
}
],
"description": "Backward-compatible single-bucket view; mirrors the historical payload."
},
"rateLimitsByLimitId": {
"additionalProperties": {
"$ref": "#/definitions/v2/RateLimitSnapshot"
},
"description": "Multi-bucket view keyed by metered `limit_id` (for example, `codex`).",
"type": [
"object",
"null"
]
}
},
"required": [
"rateLimits"
],
"title": "GetAccountRateLimitsResponse",
"type": "object"
},
"GetAccountResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"account": {
"anyOf": [
{
"$ref": "#/definitions/v2/Account"
},
{
"type": "null"
}
]
},
"requiresOpenaiAuth": {
"type": "boolean"
}
},
"required": [
"requiresOpenaiAuth"
],
"title": "GetAccountResponse",
"type": "object"
},
"GhostCommit": {
"description": "Details of a ghost commit created from a repository state.",
"properties": {
"id": {
"type": "string"
},
"parent": {
"type": [
"string",
"null"
]
},
"preexisting_untracked_dirs": {
"items": {
"type": "string"
},
"type": "array"
},
"preexisting_untracked_files": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"id",
"preexisting_untracked_dirs",
"preexisting_untracked_files"
],
"type": "object"
},
"GitInfo": {
"properties": {
"branch": {
"type": [
"string",
"null"
]
},
"originUrl": {
"type": [
"string",
"null"
]
},
"sha": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"HazelnutScope": {
"enum": [
"example",
"workspace-shared",
"all-shared",
"personal"
],
"type": "string"
},
"InputModality": {
"description": "Canonical user-input modality tags advertised by a model.",
"oneOf": [
{
"description": "Plain text turns and tool payloads.",
"enum": [
"text"
],
"type": "string"
},
{
"description": "Image attachments included in user turns.",
"enum": [
"image"
],
"type": "string"
}
]
},
"ItemCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"item": {
"$ref": "#/definitions/v2/ThreadItem"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"item",
"threadId",
"turnId"
],
"title": "ItemCompletedNotification",
"type": "object"
},
"ItemStartedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"item": {
"$ref": "#/definitions/v2/ThreadItem"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"item",
"threadId",
"turnId"
],
"title": "ItemStartedNotification",
"type": "object"
},
"ListMcpServerStatusParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to a server-defined value.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"title": "ListMcpServerStatusParams",
"type": "object"
},
"ListMcpServerStatusResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/McpServerStatus"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "ListMcpServerStatusResponse",
"type": "object"
},
"LocalShellAction": {
"oneOf": [
{
"properties": {
"command": {
"items": {
"type": "string"
},
"type": "array"
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": [
"object",
"null"
]
},
"timeout_ms": {
"format": "uint64",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"type": {
"enum": [
"exec"
],
"title": "ExecLocalShellActionType",
"type": "string"
},
"user": {
"type": [
"string",
"null"
]
},
"working_directory": {
"type": [
"string",
"null"
]
}
},
"required": [
"command",
"type"
],
"title": "ExecLocalShellAction",
"type": "object"
}
]
},
"LocalShellStatus": {
"enum": [
"completed",
"in_progress",
"incomplete"
],
"type": "string"
},
"LoginAccountParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"apiKey": {
"type": "string"
},
"type": {
"enum": [
"apiKey"
],
"title": "ApiKeyv2::LoginAccountParamsType",
"type": "string"
}
},
"required": [
"apiKey",
"type"
],
"title": "ApiKeyv2::LoginAccountParams",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"chatgpt"
],
"title": "Chatgptv2::LoginAccountParamsType",
"type": "string"
}
},
"required": [
"type"
],
"title": "Chatgptv2::LoginAccountParams",
"type": "object"
},
{
"description": "[UNSTABLE] FOR OPENAI INTERNAL USE ONLY - DO NOT USE. The access token must contain the same scopes that Codex-managed ChatGPT auth tokens have.",
"properties": {
"accessToken": {
"description": "Access token (JWT) supplied by the client. This token is used for backend API requests and email extraction.",
"type": "string"
},
"chatgptAccountId": {
"description": "Workspace/account identifier supplied by the client.",
"type": "string"
},
"chatgptPlanType": {
"description": "Optional plan type supplied by the client.\n\nWhen `null`, Codex attempts to derive the plan type from access-token claims. If unavailable, the plan defaults to `unknown`.",
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"chatgptAuthTokens"
],
"title": "ChatgptAuthTokensv2::LoginAccountParamsType",
"type": "string"
}
},
"required": [
"accessToken",
"chatgptAccountId",
"type"
],
"title": "ChatgptAuthTokensv2::LoginAccountParams",
"type": "object"
}
],
"title": "LoginAccountParams"
},
"LoginAccountResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"properties": {
"type": {
"enum": [
"apiKey"
],
"title": "ApiKeyv2::LoginAccountResponseType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ApiKeyv2::LoginAccountResponse",
"type": "object"
},
{
"properties": {
"authUrl": {
"description": "URL the client should open in a browser to initiate the OAuth flow.",
"type": "string"
},
"loginId": {
"type": "string"
},
"type": {
"enum": [
"chatgpt"
],
"title": "Chatgptv2::LoginAccountResponseType",
"type": "string"
}
},
"required": [
"authUrl",
"loginId",
"type"
],
"title": "Chatgptv2::LoginAccountResponse",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"chatgptAuthTokens"
],
"title": "ChatgptAuthTokensv2::LoginAccountResponseType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ChatgptAuthTokensv2::LoginAccountResponse",
"type": "object"
}
],
"title": "LoginAccountResponse"
},
"LogoutAccountResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "LogoutAccountResponse",
"type": "object"
},
"McpAuthStatus": {
"enum": [
"unsupported",
"notLoggedIn",
"bearerToken",
"oAuth"
],
"type": "string"
},
"McpServerOauthLoginCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"success": {
"type": "boolean"
}
},
"required": [
"name",
"success"
],
"title": "McpServerOauthLoginCompletedNotification",
"type": "object"
},
"McpServerOauthLoginParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"name": {
"type": "string"
},
"scopes": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"timeoutSecs": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"name"
],
"title": "McpServerOauthLoginParams",
"type": "object"
},
"McpServerOauthLoginResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"authorizationUrl": {
"type": "string"
}
},
"required": [
"authorizationUrl"
],
"title": "McpServerOauthLoginResponse",
"type": "object"
},
"McpServerRefreshResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerRefreshResponse",
"type": "object"
},
"McpServerStatus": {
"properties": {
"authStatus": {
"$ref": "#/definitions/v2/McpAuthStatus"
},
"name": {
"type": "string"
},
"resourceTemplates": {
"items": {
"$ref": "#/definitions/v2/ResourceTemplate"
},
"type": "array"
},
"resources": {
"items": {
"$ref": "#/definitions/v2/Resource"
},
"type": "array"
},
"tools": {
"additionalProperties": {
"$ref": "#/definitions/v2/Tool"
},
"type": "object"
}
},
"required": [
"authStatus",
"name",
"resourceTemplates",
"resources",
"tools"
],
"type": "object"
},
"McpToolCallError": {
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"McpToolCallProgressNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"itemId": {
"type": "string"
},
"message": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"message",
"threadId",
"turnId"
],
"title": "McpToolCallProgressNotification",
"type": "object"
},
"McpToolCallResult": {
"properties": {
"content": {
"items": true,
"type": "array"
},
"structuredContent": true
},
"required": [
"content"
],
"type": "object"
},
"McpToolCallStatus": {
"enum": [
"inProgress",
"completed",
"failed"
],
"type": "string"
},
"MergeStrategy": {
"enum": [
"replace",
"upsert"
],
"type": "string"
},
"MessagePhase": {
"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.",
"enum": [
"final_answer"
],
"type": "string"
}
]
},
"ModeKind": {
"description": "Initial collaboration mode to use when the TUI starts.",
"enum": [
"plan",
"default"
],
"type": "string"
},
"Model": {
"properties": {
"defaultReasoningEffort": {
"$ref": "#/definitions/v2/ReasoningEffort"
},
"description": {
"type": "string"
},
"displayName": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"id": {
"type": "string"
},
"inputModalities": {
"default": [
"text",
"image"
],
"items": {
"$ref": "#/definitions/v2/InputModality"
},
"type": "array"
},
"isDefault": {
"type": "boolean"
},
"model": {
"type": "string"
},
"supportedReasoningEfforts": {
"items": {
"$ref": "#/definitions/v2/ReasoningEffortOption"
},
"type": "array"
},
"supportsPersonality": {
"default": false,
"type": "boolean"
},
"upgrade": {
"type": [
"string",
"null"
]
}
},
"required": [
"defaultReasoningEffort",
"description",
"displayName",
"hidden",
"id",
"isDefault",
"model",
"supportedReasoningEfforts"
],
"type": "object"
},
"ModelListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"includeHidden": {
"description": "When true, include models that are hidden from the default picker list.",
"type": [
"boolean",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"title": "ModelListParams",
"type": "object"
},
"ModelListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/Model"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. If None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "ModelListResponse",
"type": "object"
},
"ModelRerouteReason": {
"enum": [
"highRiskCyberActivity"
],
"type": "string"
},
"ModelReroutedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"fromModel": {
"type": "string"
},
"reason": {
"$ref": "#/definitions/v2/ModelRerouteReason"
},
"threadId": {
"type": "string"
},
"toModel": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"fromModel",
"reason",
"threadId",
"toModel",
"turnId"
],
"title": "ModelReroutedNotification",
"type": "object"
},
"NetworkAccess": {
"enum": [
"restricted",
"enabled"
],
"type": "string"
},
"NetworkRequirements": {
"properties": {
"allowLocalBinding": {
"type": [
"boolean",
"null"
]
},
"allowUnixSockets": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"allowUpstreamProxy": {
"type": [
"boolean",
"null"
]
},
"allowedDomains": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"dangerouslyAllowAllUnixSockets": {
"type": [
"boolean",
"null"
]
},
"dangerouslyAllowNonLoopbackAdmin": {
"type": [
"boolean",
"null"
]
},
"dangerouslyAllowNonLoopbackProxy": {
"type": [
"boolean",
"null"
]
},
"deniedDomains": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"enabled": {
"type": [
"boolean",
"null"
]
},
"httpPort": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"socksPort": {
"format": "uint16",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"type": "object"
},
"OverriddenMetadata": {
"properties": {
"effectiveValue": true,
"message": {
"type": "string"
},
"overridingLayer": {
"$ref": "#/definitions/v2/ConfigLayerMetadata"
}
},
"required": [
"effectiveValue",
"message",
"overridingLayer"
],
"type": "object"
},
"PatchApplyStatus": {
"enum": [
"inProgress",
"completed",
"failed",
"declined"
],
"type": "string"
},
"PatchChangeKind": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"add"
],
"title": "AddPatchChangeKindType",
"type": "string"
}
},
"required": [
"type"
],
"title": "AddPatchChangeKind",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"delete"
],
"title": "DeletePatchChangeKindType",
"type": "string"
}
},
"required": [
"type"
],
"title": "DeletePatchChangeKind",
"type": "object"
},
{
"properties": {
"move_path": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"update"
],
"title": "UpdatePatchChangeKindType",
"type": "string"
}
},
"required": [
"type"
],
"title": "UpdatePatchChangeKind",
"type": "object"
}
]
},
"Personality": {
"enum": [
"none",
"friendly",
"pragmatic"
],
"type": "string"
},
"PlanDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "EXPERIMENTAL - proposed plan streaming deltas for plan items. Clients should not assume concatenated deltas match the completed plan item content.",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"delta",
"itemId",
"threadId",
"turnId"
],
"title": "PlanDeltaNotification",
"type": "object"
},
"PlanType": {
"enum": [
"free",
"go",
"plus",
"pro",
"team",
"business",
"enterprise",
"edu",
"unknown"
],
"type": "string"
},
"ProductSurface": {
"enum": [
"chatgpt",
"codex",
"api",
"atlas"
],
"type": "string"
},
"ProfileV2": {
"additionalProperties": true,
"properties": {
"approval_policy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
]
},
"chatgpt_base_url": {
"type": [
"string",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"model_provider": {
"type": [
"string",
"null"
]
},
"model_reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
"model_reasoning_summary": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningSummary"
},
{
"type": "null"
}
]
},
"model_verbosity": {
"anyOf": [
{
"$ref": "#/definitions/v2/Verbosity"
},
{
"type": "null"
}
]
},
"web_search": {
"anyOf": [
{
"$ref": "#/definitions/v2/WebSearchMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"RateLimitSnapshot": {
"properties": {
"credits": {
"anyOf": [
{
"$ref": "#/definitions/v2/CreditsSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
"null"
]
},
"limitName": {
"type": [
"string",
"null"
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/v2/PlanType"
},
{
"type": "null"
}
]
},
"primary": {
"anyOf": [
{
"$ref": "#/definitions/v2/RateLimitWindow"
},
{
"type": "null"
}
]
},
"secondary": {
"anyOf": [
{
"$ref": "#/definitions/v2/RateLimitWindow"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"RateLimitWindow": {
"properties": {
"resetsAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"usedPercent": {
"format": "int32",
"type": "integer"
},
"windowDurationMins": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"usedPercent"
],
"type": "object"
},
"RawResponseItemCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"item": {
"$ref": "#/definitions/v2/ResponseItem"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"item",
"threadId",
"turnId"
],
"title": "RawResponseItemCompletedNotification",
"type": "object"
},
"ReadOnlyAccess": {
"oneOf": [
{
"properties": {
"includePlatformDefaults": {
"default": true,
"type": "boolean"
},
"readableRoots": {
"default": [],
"items": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": "array"
},
"type": {
"enum": [
"restricted"
],
"title": "RestrictedReadOnlyAccessType",
"type": "string"
}
},
"required": [
"type"
],
"title": "RestrictedReadOnlyAccess",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"fullAccess"
],
"title": "FullAccessReadOnlyAccessType",
"type": "string"
}
},
"required": [
"type"
],
"title": "FullAccessReadOnlyAccess",
"type": "object"
}
]
},
"ReasoningEffort": {
"description": "See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#get-started-with-reasoning",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh"
],
"type": "string"
},
"ReasoningEffortOption": {
"properties": {
"description": {
"type": "string"
},
"reasoningEffort": {
"$ref": "#/definitions/v2/ReasoningEffort"
}
},
"required": [
"description",
"reasoningEffort"
],
"type": "object"
},
"ReasoningItemContent": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"reasoning_text"
],
"title": "ReasoningTextReasoningItemContentType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "ReasoningTextReasoningItemContent",
"type": "object"
},
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"text"
],
"title": "TextReasoningItemContentType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "TextReasoningItemContent",
"type": "object"
}
]
},
"ReasoningItemReasoningSummary": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"type": {
"enum": [
"summary_text"
],
"title": "SummaryTextReasoningItemReasoningSummaryType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "SummaryTextReasoningItemReasoningSummary",
"type": "object"
}
]
},
"ReasoningSummary": {
"description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. See https://platform.openai.com/docs/guides/reasoning?api-mode=responses#reasoning-summaries",
"oneOf": [
{
"enum": [
"auto",
"concise",
"detailed"
],
"type": "string"
},
{
"description": "Option to disable reasoning summaries.",
"enum": [
"none"
],
"type": "string"
}
]
},
"ReasoningSummaryPartAddedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"itemId": {
"type": "string"
},
"summaryIndex": {
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"summaryIndex",
"threadId",
"turnId"
],
"title": "ReasoningSummaryPartAddedNotification",
"type": "object"
},
"ReasoningSummaryTextDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"summaryIndex": {
"format": "int64",
"type": "integer"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"delta",
"itemId",
"summaryIndex",
"threadId",
"turnId"
],
"title": "ReasoningSummaryTextDeltaNotification",
"type": "object"
},
"ReasoningTextDeltaNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"contentIndex": {
"format": "int64",
"type": "integer"
},
"delta": {
"type": "string"
},
"itemId": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"contentIndex",
"delta",
"itemId",
"threadId",
"turnId"
],
"title": "ReasoningTextDeltaNotification",
"type": "object"
},
"RemoteSkillSummary": {
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"description",
"id",
"name"
],
"type": "object"
},
"ResidencyRequirement": {
"enum": [
"us"
],
"type": "string"
},
"Resource": {
"description": "A known resource that the server is capable of reading.",
"properties": {
"_meta": true,
"annotations": true,
"description": {
"type": [
"string",
"null"
]
},
"icons": {
"items": true,
"type": [
"array",
"null"
]
},
"mimeType": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"size": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"title": {
"type": [
"string",
"null"
]
},
"uri": {
"type": "string"
}
},
"required": [
"name",
"uri"
],
"type": "object"
},
"ResourceTemplate": {
"description": "A template description for resources available on the server.",
"properties": {
"annotations": true,
"description": {
"type": [
"string",
"null"
]
},
"mimeType": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"uriTemplate": {
"type": "string"
}
},
"required": [
"name",
"uriTemplate"
],
"type": "object"
},
"ResponseItem": {
"oneOf": [
{
"properties": {
"content": {
"items": {
"$ref": "#/definitions/v2/ContentItem"
},
"type": "array"
},
"end_turn": {
"type": [
"boolean",
"null"
]
},
"id": {
"type": [
"string",
"null"
],
"writeOnly": true
},
"phase": {
"anyOf": [
{
"$ref": "#/definitions/v2/MessagePhase"
},
{
"type": "null"
}
]
},
"role": {
"type": "string"
},
"type": {
"enum": [
"message"
],
"title": "MessageResponseItemType",
"type": "string"
}
},
"required": [
"content",
"role",
"type"
],
"title": "MessageResponseItem",
"type": "object"
},
{
"properties": {
"content": {
"default": null,
"items": {
"$ref": "#/definitions/v2/ReasoningItemContent"
},
"type": [
"array",
"null"
]
},
"encrypted_content": {
"type": [
"string",
"null"
]
},
"id": {
"type": "string",
"writeOnly": true
},
"summary": {
"items": {
"$ref": "#/definitions/v2/ReasoningItemReasoningSummary"
},
"type": "array"
},
"type": {
"enum": [
"reasoning"
],
"title": "ReasoningResponseItemType",
"type": "string"
}
},
"required": [
"id",
"summary",
"type"
],
"title": "ReasoningResponseItem",
"type": "object"
},
{
"properties": {
"action": {
"$ref": "#/definitions/v2/LocalShellAction"
},
"call_id": {
"description": "Set when using the Responses API.",
"type": [
"string",
"null"
]
},
"id": {
"description": "Legacy id field retained for compatibility with older payloads.",
"type": [
"string",
"null"
],
"writeOnly": true
},
"status": {
"$ref": "#/definitions/v2/LocalShellStatus"
},
"type": {
"enum": [
"local_shell_call"
],
"title": "LocalShellCallResponseItemType",
"type": "string"
}
},
"required": [
"action",
"status",
"type"
],
"title": "LocalShellCallResponseItem",
"type": "object"
},
{
"properties": {
"arguments": {
"type": "string"
},
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
],
"writeOnly": true
},
"name": {
"type": "string"
},
"type": {
"enum": [
"function_call"
],
"title": "FunctionCallResponseItemType",
"type": "string"
}
},
"required": [
"arguments",
"call_id",
"name",
"type"
],
"title": "FunctionCallResponseItem",
"type": "object"
},
{
"properties": {
"call_id": {
"type": "string"
},
"output": {
"$ref": "#/definitions/v2/FunctionCallOutputPayload"
},
"type": {
"enum": [
"function_call_output"
],
"title": "FunctionCallOutputResponseItemType",
"type": "string"
}
},
"required": [
"call_id",
"output",
"type"
],
"title": "FunctionCallOutputResponseItem",
"type": "object"
},
{
"properties": {
"call_id": {
"type": "string"
},
"id": {
"type": [
"string",
"null"
],
"writeOnly": true
},
"input": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"custom_tool_call"
],
"title": "CustomToolCallResponseItemType",
"type": "string"
}
},
"required": [
"call_id",
"input",
"name",
"type"
],
"title": "CustomToolCallResponseItem",
"type": "object"
},
{
"properties": {
"call_id": {
"type": "string"
},
"output": {
"type": "string"
},
"type": {
"enum": [
"custom_tool_call_output"
],
"title": "CustomToolCallOutputResponseItemType",
"type": "string"
}
},
"required": [
"call_id",
"output",
"type"
],
"title": "CustomToolCallOutputResponseItem",
"type": "object"
},
{
"properties": {
"action": {
"anyOf": [
{
"$ref": "#/definitions/v2/WebSearchAction"
},
{
"type": "null"
}
]
},
"id": {
"type": [
"string",
"null"
],
"writeOnly": true
},
"status": {
"type": [
"string",
"null"
]
},
"type": {
"enum": [
"web_search_call"
],
"title": "WebSearchCallResponseItemType",
"type": "string"
}
},
"required": [
"type"
],
"title": "WebSearchCallResponseItem",
"type": "object"
},
{
"properties": {
"ghost_commit": {
"$ref": "#/definitions/v2/GhostCommit"
},
"type": {
"enum": [
"ghost_snapshot"
],
"title": "GhostSnapshotResponseItemType",
"type": "string"
}
},
"required": [
"ghost_commit",
"type"
],
"title": "GhostSnapshotResponseItem",
"type": "object"
},
{
"properties": {
"encrypted_content": {
"type": "string"
},
"type": {
"enum": [
"compaction"
],
"title": "CompactionResponseItemType",
"type": "string"
}
},
"required": [
"encrypted_content",
"type"
],
"title": "CompactionResponseItem",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"other"
],
"title": "OtherResponseItemType",
"type": "string"
}
},
"required": [
"type"
],
"title": "OtherResponseItem",
"type": "object"
}
]
},
"ReviewDelivery": {
"enum": [
"inline",
"detached"
],
"type": "string"
},
"ReviewStartParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"delivery": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReviewDelivery"
},
{
"type": "null"
}
],
"default": null,
"description": "Where to run the review: inline (default) on the current thread or detached on a new thread (returned in `reviewThreadId`)."
},
"target": {
"$ref": "#/definitions/v2/ReviewTarget"
},
"threadId": {
"type": "string"
}
},
"required": [
"target",
"threadId"
],
"title": "ReviewStartParams",
"type": "object"
},
"ReviewStartResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"reviewThreadId": {
"description": "Identifies the thread where the review runs.\n\nFor inline reviews, this is the original thread id. For detached reviews, this is the id of the new review thread.",
"type": "string"
},
"turn": {
"$ref": "#/definitions/v2/Turn"
}
},
"required": [
"reviewThreadId",
"turn"
],
"title": "ReviewStartResponse",
"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, equivalent to the old free-form prompt.",
"properties": {
"instructions": {
"type": "string"
},
"type": {
"enum": [
"custom"
],
"title": "CustomReviewTargetType",
"type": "string"
}
},
"required": [
"instructions",
"type"
],
"title": "CustomReviewTarget",
"type": "object"
}
]
},
"SandboxMode": {
"enum": [
"read-only",
"workspace-write",
"danger-full-access"
],
"type": "string"
},
"SandboxPolicy": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"dangerFullAccess"
],
"title": "DangerFullAccessSandboxPolicyType",
"type": "string"
}
},
"required": [
"type"
],
"title": "DangerFullAccessSandboxPolicy",
"type": "object"
},
{
"properties": {
"access": {
"allOf": [
{
"$ref": "#/definitions/v2/ReadOnlyAccess"
}
],
"default": {
"type": "fullAccess"
}
},
"type": {
"enum": [
"readOnly"
],
"title": "ReadOnlySandboxPolicyType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ReadOnlySandboxPolicy",
"type": "object"
},
{
"properties": {
"networkAccess": {
"allOf": [
{
"$ref": "#/definitions/v2/NetworkAccess"
}
],
"default": "restricted"
},
"type": {
"enum": [
"externalSandbox"
],
"title": "ExternalSandboxSandboxPolicyType",
"type": "string"
}
},
"required": [
"type"
],
"title": "ExternalSandboxSandboxPolicy",
"type": "object"
},
{
"properties": {
"excludeSlashTmp": {
"default": false,
"type": "boolean"
},
"excludeTmpdirEnvVar": {
"default": false,
"type": "boolean"
},
"networkAccess": {
"default": false,
"type": "boolean"
},
"readOnlyAccess": {
"allOf": [
{
"$ref": "#/definitions/v2/ReadOnlyAccess"
}
],
"default": {
"type": "fullAccess"
}
},
"type": {
"enum": [
"workspaceWrite"
],
"title": "WorkspaceWriteSandboxPolicyType",
"type": "string"
},
"writableRoots": {
"default": [],
"items": {
"$ref": "#/definitions/v2/AbsolutePathBuf"
},
"type": "array"
}
},
"required": [
"type"
],
"title": "WorkspaceWriteSandboxPolicy",
"type": "object"
}
]
},
"SandboxWorkspaceWrite": {
"properties": {
"exclude_slash_tmp": {
"default": false,
"type": "boolean"
},
"exclude_tmpdir_env_var": {
"default": false,
"type": "boolean"
},
"network_access": {
"default": false,
"type": "boolean"
},
"writable_roots": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"SessionSource": {
"oneOf": [
{
"enum": [
"cli",
"vscode",
"exec",
"appServer",
"unknown"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"subAgent": {
"$ref": "#/definitions/v2/SubAgentSource"
}
},
"required": [
"subAgent"
],
"title": "SubAgentSessionSource",
"type": "object"
}
]
},
"Settings": {
"description": "Settings for a collaboration mode.",
"properties": {
"developer_instructions": {
"type": [
"string",
"null"
]
},
"model": {
"type": "string"
},
"reasoning_effort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
}
},
"required": [
"model"
],
"type": "object"
},
"SkillDependencies": {
"properties": {
"tools": {
"items": {
"$ref": "#/definitions/v2/SkillToolDependency"
},
"type": "array"
}
},
"required": [
"tools"
],
"type": "object"
},
"SkillErrorInfo": {
"properties": {
"message": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"message",
"path"
],
"type": "object"
},
"SkillInterface": {
"properties": {
"brandColor": {
"type": [
"string",
"null"
]
},
"defaultPrompt": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
},
"iconLarge": {
"type": [
"string",
"null"
]
},
"iconSmall": {
"type": [
"string",
"null"
]
},
"shortDescription": {
"type": [
"string",
"null"
]
}
},
"type": "object"
},
"SkillMetadata": {
"properties": {
"dependencies": {
"anyOf": [
{
"$ref": "#/definitions/v2/SkillDependencies"
},
{
"type": "null"
}
]
},
"description": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"interface": {
"anyOf": [
{
"$ref": "#/definitions/v2/SkillInterface"
},
{
"type": "null"
}
]
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"scope": {
"$ref": "#/definitions/v2/SkillScope"
},
"shortDescription": {
"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"
},
"SkillsConfigWriteParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"enabled": {
"type": "boolean"
},
"path": {
"type": "string"
}
},
"required": [
"enabled",
"path"
],
"title": "SkillsConfigWriteParams",
"type": "object"
},
"SkillsConfigWriteResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"effectiveEnabled": {
"type": "boolean"
}
},
"required": [
"effectiveEnabled"
],
"title": "SkillsConfigWriteResponse",
"type": "object"
},
"SkillsListEntry": {
"properties": {
"cwd": {
"type": "string"
},
"errors": {
"items": {
"$ref": "#/definitions/v2/SkillErrorInfo"
},
"type": "array"
},
"skills": {
"items": {
"$ref": "#/definitions/v2/SkillMetadata"
},
"type": "array"
}
},
"required": [
"cwd",
"errors",
"skills"
],
"type": "object"
},
"SkillsListExtraRootsForCwd": {
"properties": {
"cwd": {
"type": "string"
},
"extraUserRoots": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"cwd",
"extraUserRoots"
],
"type": "object"
},
"SkillsListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cwds": {
"description": "When empty, defaults to the current session working directory.",
"items": {
"type": "string"
},
"type": "array"
},
"forceReload": {
"description": "When true, bypass the skills cache and re-scan skills from disk.",
"type": "boolean"
},
"perCwdExtraUserRoots": {
"default": null,
"description": "Optional per-cwd extra roots to scan as user-scoped skills.",
"items": {
"$ref": "#/definitions/v2/SkillsListExtraRootsForCwd"
},
"type": [
"array",
"null"
]
}
},
"title": "SkillsListParams",
"type": "object"
},
"SkillsListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/SkillsListEntry"
},
"type": "array"
}
},
"required": [
"data"
],
"title": "SkillsListResponse",
"type": "object"
},
"SkillsRemoteReadParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"enabled": {
"default": false,
"type": "boolean"
},
"hazelnutScope": {
"allOf": [
{
"$ref": "#/definitions/v2/HazelnutScope"
}
],
"default": "example"
},
"productSurface": {
"allOf": [
{
"$ref": "#/definitions/v2/ProductSurface"
}
],
"default": "codex"
}
},
"title": "SkillsRemoteReadParams",
"type": "object"
},
"SkillsRemoteReadResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/RemoteSkillSummary"
},
"type": "array"
}
},
"required": [
"data"
],
"title": "SkillsRemoteReadResponse",
"type": "object"
},
"SkillsRemoteWriteParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"hazelnutId": {
"type": "string"
}
},
"required": [
"hazelnutId"
],
"title": "SkillsRemoteWriteParams",
"type": "object"
},
"SkillsRemoteWriteResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"id",
"path"
],
"title": "SkillsRemoteWriteResponse",
"type": "object"
},
"SubAgentSource": {
"oneOf": [
{
"enum": [
"review",
"compact",
"memory_consolidation"
],
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"thread_spawn": {
"properties": {
"agent_nickname": {
"default": null,
"type": [
"string",
"null"
]
},
"agent_role": {
"default": null,
"type": [
"string",
"null"
]
},
"depth": {
"format": "int32",
"type": "integer"
},
"parent_thread_id": {
"$ref": "#/definitions/v2/ThreadId"
}
},
"required": [
"depth",
"parent_thread_id"
],
"type": "object"
}
},
"required": [
"thread_spawn"
],
"title": "ThreadSpawnSubAgentSource",
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"other": {
"type": "string"
}
},
"required": [
"other"
],
"title": "OtherSubAgentSource",
"type": "object"
}
]
},
"TerminalInteractionNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"itemId": {
"type": "string"
},
"processId": {
"type": "string"
},
"stdin": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"itemId",
"processId",
"stdin",
"threadId",
"turnId"
],
"title": "TerminalInteractionNotification",
"type": "object"
},
"TextElement": {
"properties": {
"byteRange": {
"allOf": [
{
"$ref": "#/definitions/v2/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": [
"byteRange"
],
"type": "object"
},
"TextPosition": {
"properties": {
"column": {
"description": "1-based column number (in Unicode scalar values).",
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"line": {
"description": "1-based line number.",
"format": "uint",
"minimum": 0.0,
"type": "integer"
}
},
"required": [
"column",
"line"
],
"type": "object"
},
"TextRange": {
"properties": {
"end": {
"$ref": "#/definitions/v2/TextPosition"
},
"start": {
"$ref": "#/definitions/v2/TextPosition"
}
},
"required": [
"end",
"start"
],
"type": "object"
},
"Thread": {
"properties": {
"agentNickname": {
"description": "Optional random unique nickname assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"agentRole": {
"description": "Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.",
"type": [
"string",
"null"
]
},
"cliVersion": {
"description": "Version of the CLI that created the thread.",
"type": "string"
},
"createdAt": {
"description": "Unix timestamp (in seconds) when the thread was created.",
"format": "int64",
"type": "integer"
},
"cwd": {
"description": "Working directory captured for the thread.",
"type": "string"
},
"gitInfo": {
"anyOf": [
{
"$ref": "#/definitions/v2/GitInfo"
},
{
"type": "null"
}
],
"description": "Optional Git metadata captured when the thread was created."
},
"id": {
"type": "string"
},
"modelProvider": {
"description": "Model provider used for this thread (for example, 'openai').",
"type": "string"
},
"name": {
"description": "Optional user-facing thread title.",
"type": [
"string",
"null"
]
},
"path": {
"description": "[UNSTABLE] Path to the thread on disk.",
"type": [
"string",
"null"
]
},
"preview": {
"description": "Usually the first user message in the thread, if available.",
"type": "string"
},
"source": {
"allOf": [
{
"$ref": "#/definitions/v2/SessionSource"
}
],
"description": "Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.)."
},
"status": {
"allOf": [
{
"$ref": "#/definitions/v2/ThreadStatus"
}
],
"description": "Current runtime status for the thread."
},
"turns": {
"description": "Only populated on `thread/resume`, `thread/rollback`, `thread/fork`, and `thread/read` (when `includeTurns` is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.",
"items": {
"$ref": "#/definitions/v2/Turn"
},
"type": "array"
},
"updatedAt": {
"description": "Unix timestamp (in seconds) when the thread was last updated.",
"format": "int64",
"type": "integer"
}
},
"required": [
"cliVersion",
"createdAt",
"cwd",
"id",
"modelProvider",
"preview",
"source",
"status",
"turns",
"updatedAt"
],
"type": "object"
},
"ThreadActiveFlag": {
"enum": [
"waitingOnApproval",
"waitingOnUserInput"
],
"type": "string"
},
"ThreadArchiveParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadArchiveParams",
"type": "object"
},
"ThreadArchiveResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadArchiveResponse",
"type": "object"
},
"ThreadArchivedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadArchivedNotification",
"type": "object"
},
"ThreadCompactStartParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadCompactStartParams",
"type": "object"
},
"ThreadCompactStartResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadCompactStartResponse",
"type": "object"
},
"ThreadForkParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.\n\nIf using path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.",
"properties": {
"approvalPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
]
},
"baseInstructions": {
"type": [
"string",
"null"
]
},
"config": {
"additionalProperties": true,
"type": [
"object",
"null"
]
},
"cwd": {
"type": [
"string",
"null"
]
},
"developerInstructions": {
"type": [
"string",
"null"
]
},
"model": {
"description": "Configuration overrides for the forked thread, if any.",
"type": [
"string",
"null"
]
},
"modelProvider": {
"type": [
"string",
"null"
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxMode"
},
{
"type": "null"
}
]
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadForkParams",
"type": "object"
},
"ThreadForkResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalPolicy": {
"$ref": "#/definitions/v2/AskForApproval"
},
"cwd": {
"type": "string"
},
"model": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"reasoningEffort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
"sandbox": {
"$ref": "#/definitions/v2/SandboxPolicy"
},
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"approvalPolicy",
"cwd",
"model",
"modelProvider",
"sandbox",
"thread"
],
"title": "ThreadForkResponse",
"type": "object"
},
"ThreadId": {
"type": "string"
},
"ThreadItem": {
"oneOf": [
{
"properties": {
"content": {
"items": {
"$ref": "#/definitions/v2/UserInput"
},
"type": "array"
},
"id": {
"type": "string"
},
"type": {
"enum": [
"userMessage"
],
"title": "UserMessageThreadItemType",
"type": "string"
}
},
"required": [
"content",
"id",
"type"
],
"title": "UserMessageThreadItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"phase": {
"anyOf": [
{
"$ref": "#/definitions/v2/MessagePhase"
},
{
"type": "null"
}
],
"default": null
},
"text": {
"type": "string"
},
"type": {
"enum": [
"agentMessage"
],
"title": "AgentMessageThreadItemType",
"type": "string"
}
},
"required": [
"id",
"text",
"type"
],
"title": "AgentMessageThreadItem",
"type": "object"
},
{
"description": "EXPERIMENTAL - proposed plan item content. The completed plan item is authoritative and may not match the concatenation of `PlanDelta` text.",
"properties": {
"id": {
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"enum": [
"plan"
],
"title": "PlanThreadItemType",
"type": "string"
}
},
"required": [
"id",
"text",
"type"
],
"title": "PlanThreadItem",
"type": "object"
},
{
"properties": {
"content": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"summary": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"type": {
"enum": [
"reasoning"
],
"title": "ReasoningThreadItemType",
"type": "string"
}
},
"required": [
"id",
"type"
],
"title": "ReasoningThreadItem",
"type": "object"
},
{
"properties": {
"aggregatedOutput": {
"description": "The command's output, aggregated from stdout and stderr.",
"type": [
"string",
"null"
]
},
"command": {
"description": "The command to be executed.",
"type": "string"
},
"commandActions": {
"description": "A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.",
"items": {
"$ref": "#/definitions/v2/CommandAction"
},
"type": "array"
},
"cwd": {
"description": "The command's working directory.",
"type": "string"
},
"durationMs": {
"description": "The duration of the command execution in milliseconds.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"exitCode": {
"description": "The command's exit code.",
"format": "int32",
"type": [
"integer",
"null"
]
},
"id": {
"type": "string"
},
"processId": {
"description": "Identifier for the underlying PTY process (when available).",
"type": [
"string",
"null"
]
},
"status": {
"$ref": "#/definitions/v2/CommandExecutionStatus"
},
"type": {
"enum": [
"commandExecution"
],
"title": "CommandExecutionThreadItemType",
"type": "string"
}
},
"required": [
"command",
"commandActions",
"cwd",
"id",
"status",
"type"
],
"title": "CommandExecutionThreadItem",
"type": "object"
},
{
"properties": {
"changes": {
"items": {
"$ref": "#/definitions/v2/FileUpdateChange"
},
"type": "array"
},
"id": {
"type": "string"
},
"status": {
"$ref": "#/definitions/v2/PatchApplyStatus"
},
"type": {
"enum": [
"fileChange"
],
"title": "FileChangeThreadItemType",
"type": "string"
}
},
"required": [
"changes",
"id",
"status",
"type"
],
"title": "FileChangeThreadItem",
"type": "object"
},
{
"properties": {
"arguments": true,
"durationMs": {
"description": "The duration of the MCP tool call in milliseconds.",
"format": "int64",
"type": [
"integer",
"null"
]
},
"error": {
"anyOf": [
{
"$ref": "#/definitions/v2/McpToolCallError"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"result": {
"anyOf": [
{
"$ref": "#/definitions/v2/McpToolCallResult"
},
{
"type": "null"
}
]
},
"server": {
"type": "string"
},
"status": {
"$ref": "#/definitions/v2/McpToolCallStatus"
},
"tool": {
"type": "string"
},
"type": {
"enum": [
"mcpToolCall"
],
"title": "McpToolCallThreadItemType",
"type": "string"
}
},
"required": [
"arguments",
"id",
"server",
"status",
"tool",
"type"
],
"title": "McpToolCallThreadItem",
"type": "object"
},
{
"properties": {
"agentsStates": {
"additionalProperties": {
"$ref": "#/definitions/v2/CollabAgentState"
},
"description": "Last known status of the target agents, when available.",
"type": "object"
},
"id": {
"description": "Unique identifier for this collab tool call.",
"type": "string"
},
"prompt": {
"description": "Prompt text sent as part of the collab tool call, when available.",
"type": [
"string",
"null"
]
},
"receiverThreadIds": {
"description": "Thread ID of the receiving agent, when applicable. In case of spawn operation, this corresponds to the newly spawned agent.",
"items": {
"type": "string"
},
"type": "array"
},
"senderThreadId": {
"description": "Thread ID of the agent issuing the collab request.",
"type": "string"
},
"status": {
"allOf": [
{
"$ref": "#/definitions/v2/CollabAgentToolCallStatus"
}
],
"description": "Current status of the collab tool call."
},
"tool": {
"allOf": [
{
"$ref": "#/definitions/v2/CollabAgentTool"
}
],
"description": "Name of the collab tool that was invoked."
},
"type": {
"enum": [
"collabAgentToolCall"
],
"title": "CollabAgentToolCallThreadItemType",
"type": "string"
}
},
"required": [
"agentsStates",
"id",
"receiverThreadIds",
"senderThreadId",
"status",
"tool",
"type"
],
"title": "CollabAgentToolCallThreadItem",
"type": "object"
},
{
"properties": {
"action": {
"anyOf": [
{
"$ref": "#/definitions/v2/WebSearchAction"
},
{
"type": "null"
}
]
},
"id": {
"type": "string"
},
"query": {
"type": "string"
},
"type": {
"enum": [
"webSearch"
],
"title": "WebSearchThreadItemType",
"type": "string"
}
},
"required": [
"id",
"query",
"type"
],
"title": "WebSearchThreadItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"enum": [
"imageView"
],
"title": "ImageViewThreadItemType",
"type": "string"
}
},
"required": [
"id",
"path",
"type"
],
"title": "ImageViewThreadItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"review": {
"type": "string"
},
"type": {
"enum": [
"enteredReviewMode"
],
"title": "EnteredReviewModeThreadItemType",
"type": "string"
}
},
"required": [
"id",
"review",
"type"
],
"title": "EnteredReviewModeThreadItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"review": {
"type": "string"
},
"type": {
"enum": [
"exitedReviewMode"
],
"title": "ExitedReviewModeThreadItemType",
"type": "string"
}
},
"required": [
"id",
"review",
"type"
],
"title": "ExitedReviewModeThreadItem",
"type": "object"
},
{
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [
"contextCompaction"
],
"title": "ContextCompactionThreadItemType",
"type": "string"
}
},
"required": [
"id",
"type"
],
"title": "ContextCompactionThreadItem",
"type": "object"
}
]
},
"ThreadListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"archived": {
"description": "Optional archived filter; when set to true, only archived threads are returned. If false or null, only non-archived threads are returned.",
"type": [
"boolean",
"null"
]
},
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"cwd": {
"description": "Optional cwd filter; when set, only threads whose session cwd exactly matches this path are returned.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to a reasonable server-side value.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
},
"modelProviders": {
"description": "Optional provider filter; when set, only sessions recorded under these providers are returned. When present but empty, includes all providers.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"sortKey": {
"anyOf": [
{
"$ref": "#/definitions/v2/ThreadSortKey"
},
{
"type": "null"
}
],
"description": "Optional sort key; defaults to created_at."
},
"sourceKinds": {
"description": "Optional source filter; when set, only sessions from these source kinds are returned. When omitted or empty, defaults to interactive sources.",
"items": {
"$ref": "#/definitions/v2/ThreadSourceKind"
},
"type": [
"array",
"null"
]
}
},
"title": "ThreadListParams",
"type": "object"
},
"ThreadListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"items": {
"$ref": "#/definitions/v2/Thread"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "ThreadListResponse",
"type": "object"
},
"ThreadLoadedListParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cursor": {
"description": "Opaque pagination cursor returned by a previous call.",
"type": [
"string",
"null"
]
},
"limit": {
"description": "Optional page size; defaults to no limit.",
"format": "uint32",
"minimum": 0.0,
"type": [
"integer",
"null"
]
}
},
"title": "ThreadLoadedListParams",
"type": "object"
},
"ThreadLoadedListResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"data": {
"description": "Thread ids for sessions currently loaded in memory.",
"items": {
"type": "string"
},
"type": "array"
},
"nextCursor": {
"description": "Opaque cursor to pass to the next call to continue after the last item. if None, there are no more items to return.",
"type": [
"string",
"null"
]
}
},
"required": [
"data"
],
"title": "ThreadLoadedListResponse",
"type": "object"
},
"ThreadNameUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
},
"threadName": {
"type": [
"string",
"null"
]
}
},
"required": [
"threadId"
],
"title": "ThreadNameUpdatedNotification",
"type": "object"
},
"ThreadReadParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"includeTurns": {
"default": false,
"description": "When true, include turns and their items from rollout history.",
"type": "boolean"
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadReadParams",
"type": "object"
},
"ThreadReadResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"thread"
],
"title": "ThreadReadResponse",
"type": "object"
},
"ThreadResumeParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.\n\nThe precedence is: history > path > thread_id. If using history or path, the thread_id param will be ignored.\n\nPrefer using thread_id whenever possible.",
"properties": {
"approvalPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
]
},
"baseInstructions": {
"type": [
"string",
"null"
]
},
"config": {
"additionalProperties": true,
"type": [
"object",
"null"
]
},
"cwd": {
"type": [
"string",
"null"
]
},
"developerInstructions": {
"type": [
"string",
"null"
]
},
"model": {
"description": "Configuration overrides for the resumed thread, if any.",
"type": [
"string",
"null"
]
},
"modelProvider": {
"type": [
"string",
"null"
]
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/v2/Personality"
},
{
"type": "null"
}
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxMode"
},
{
"type": "null"
}
]
},
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadResumeParams",
"type": "object"
},
"ThreadResumeResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalPolicy": {
"$ref": "#/definitions/v2/AskForApproval"
},
"cwd": {
"type": "string"
},
"model": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"reasoningEffort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
"sandbox": {
"$ref": "#/definitions/v2/SandboxPolicy"
},
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"approvalPolicy",
"cwd",
"model",
"modelProvider",
"sandbox",
"thread"
],
"title": "ThreadResumeResponse",
"type": "object"
},
"ThreadRollbackParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"numTurns": {
"description": "The number of turns to drop from the end of the thread. Must be >= 1.\n\nThis only modifies the thread's history and does not revert local file changes that have been made by the agent. Clients are responsible for reverting these changes.",
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"threadId": {
"type": "string"
}
},
"required": [
"numTurns",
"threadId"
],
"title": "ThreadRollbackParams",
"type": "object"
},
"ThreadRollbackResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"thread": {
"allOf": [
{
"$ref": "#/definitions/v2/Thread"
}
],
"description": "The updated thread after applying the rollback, with `turns` populated.\n\nThe ThreadItems stored in each Turn are lossy since we explicitly do not persist all agent interactions, such as command executions. This is the same behavior as `thread/resume`."
}
},
"required": [
"thread"
],
"title": "ThreadRollbackResponse",
"type": "object"
},
"ThreadSetNameParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"name": {
"type": "string"
},
"threadId": {
"type": "string"
}
},
"required": [
"name",
"threadId"
],
"title": "ThreadSetNameParams",
"type": "object"
},
"ThreadSetNameResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ThreadSetNameResponse",
"type": "object"
},
"ThreadSortKey": {
"enum": [
"created_at",
"updated_at"
],
"type": "string"
},
"ThreadSourceKind": {
"enum": [
"cli",
"vscode",
"exec",
"appServer",
"subAgent",
"subAgentReview",
"subAgentCompact",
"subAgentThreadSpawn",
"subAgentOther",
"unknown"
],
"type": "string"
},
"ThreadStartParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
]
},
"baseInstructions": {
"type": [
"string",
"null"
]
},
"config": {
"additionalProperties": true,
"type": [
"object",
"null"
]
},
"cwd": {
"type": [
"string",
"null"
]
},
"developerInstructions": {
"type": [
"string",
"null"
]
},
"ephemeral": {
"type": [
"boolean",
"null"
]
},
"model": {
"type": [
"string",
"null"
]
},
"modelProvider": {
"type": [
"string",
"null"
]
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/v2/Personality"
},
{
"type": "null"
}
]
},
"sandbox": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxMode"
},
{
"type": "null"
}
]
}
},
"title": "ThreadStartParams",
"type": "object"
},
"ThreadStartResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalPolicy": {
"$ref": "#/definitions/v2/AskForApproval"
},
"cwd": {
"type": "string"
},
"model": {
"type": "string"
},
"modelProvider": {
"type": "string"
},
"reasoningEffort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
]
},
"sandbox": {
"$ref": "#/definitions/v2/SandboxPolicy"
},
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"approvalPolicy",
"cwd",
"model",
"modelProvider",
"sandbox",
"thread"
],
"title": "ThreadStartResponse",
"type": "object"
},
"ThreadStartedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"thread"
],
"title": "ThreadStartedNotification",
"type": "object"
},
"ThreadStatus": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"notLoaded"
],
"title": "NotLoadedThreadStatusType",
"type": "string"
}
},
"required": [
"type"
],
"title": "NotLoadedThreadStatus",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"idle"
],
"title": "IdleThreadStatusType",
"type": "string"
}
},
"required": [
"type"
],
"title": "IdleThreadStatus",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"systemError"
],
"title": "SystemErrorThreadStatusType",
"type": "string"
}
},
"required": [
"type"
],
"title": "SystemErrorThreadStatus",
"type": "object"
},
{
"properties": {
"activeFlags": {
"items": {
"$ref": "#/definitions/v2/ThreadActiveFlag"
},
"type": "array"
},
"type": {
"enum": [
"active"
],
"title": "ActiveThreadStatusType",
"type": "string"
}
},
"required": [
"activeFlags",
"type"
],
"title": "ActiveThreadStatus",
"type": "object"
}
]
},
"ThreadStatusChangedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"status": {
"$ref": "#/definitions/v2/ThreadStatus"
},
"threadId": {
"type": "string"
}
},
"required": [
"status",
"threadId"
],
"title": "ThreadStatusChangedNotification",
"type": "object"
},
"ThreadTokenUsage": {
"properties": {
"last": {
"$ref": "#/definitions/v2/TokenUsageBreakdown"
},
"modelContextWindow": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"total": {
"$ref": "#/definitions/v2/TokenUsageBreakdown"
}
},
"required": [
"last",
"total"
],
"type": "object"
},
"ThreadTokenUsageUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
},
"tokenUsage": {
"$ref": "#/definitions/v2/ThreadTokenUsage"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"tokenUsage",
"turnId"
],
"title": "ThreadTokenUsageUpdatedNotification",
"type": "object"
},
"ThreadUnarchiveParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadUnarchiveParams",
"type": "object"
},
"ThreadUnarchiveResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"thread": {
"$ref": "#/definitions/v2/Thread"
}
},
"required": [
"thread"
],
"title": "ThreadUnarchiveResponse",
"type": "object"
},
"ThreadUnarchivedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
}
},
"required": [
"threadId"
],
"title": "ThreadUnarchivedNotification",
"type": "object"
},
"TokenUsageBreakdown": {
"properties": {
"cachedInputTokens": {
"format": "int64",
"type": "integer"
},
"inputTokens": {
"format": "int64",
"type": "integer"
},
"outputTokens": {
"format": "int64",
"type": "integer"
},
"reasoningOutputTokens": {
"format": "int64",
"type": "integer"
},
"totalTokens": {
"format": "int64",
"type": "integer"
}
},
"required": [
"cachedInputTokens",
"inputTokens",
"outputTokens",
"reasoningOutputTokens",
"totalTokens"
],
"type": "object"
},
"Tool": {
"description": "Definition for a tool the client can call.",
"properties": {
"_meta": true,
"annotations": true,
"description": {
"type": [
"string",
"null"
]
},
"icons": {
"items": true,
"type": [
"array",
"null"
]
},
"inputSchema": true,
"name": {
"type": "string"
},
"outputSchema": true,
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
"inputSchema",
"name"
],
"type": "object"
},
"ToolsV2": {
"properties": {
"view_image": {
"type": [
"boolean",
"null"
]
},
"web_search": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
},
"Turn": {
"properties": {
"error": {
"anyOf": [
{
"$ref": "#/definitions/v2/TurnError"
},
{
"type": "null"
}
],
"description": "Only populated when the Turn's status is failed."
},
"id": {
"type": "string"
},
"items": {
"description": "Only populated on a `thread/resume` or `thread/fork` response. For all other responses and notifications returning a Turn, the items field will be an empty list.",
"items": {
"$ref": "#/definitions/v2/ThreadItem"
},
"type": "array"
},
"status": {
"$ref": "#/definitions/v2/TurnStatus"
}
},
"required": [
"id",
"items",
"status"
],
"type": "object"
},
"TurnCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
},
"turn": {
"$ref": "#/definitions/v2/Turn"
}
},
"required": [
"threadId",
"turn"
],
"title": "TurnCompletedNotification",
"type": "object"
},
"TurnDiffUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Notification that the turn-level unified diff has changed. Contains the latest aggregated diff across all file changes in the turn.",
"properties": {
"diff": {
"type": "string"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"diff",
"threadId",
"turnId"
],
"title": "TurnDiffUpdatedNotification",
"type": "object"
},
"TurnError": {
"properties": {
"additionalDetails": {
"default": null,
"type": [
"string",
"null"
]
},
"codexErrorInfo": {
"anyOf": [
{
"$ref": "#/definitions/v2/CodexErrorInfo"
},
{
"type": "null"
}
]
},
"message": {
"type": "string"
}
},
"required": [
"message"
],
"type": "object"
},
"TurnInterruptParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"threadId",
"turnId"
],
"title": "TurnInterruptParams",
"type": "object"
},
"TurnInterruptResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TurnInterruptResponse",
"type": "object"
},
"TurnPlanStep": {
"properties": {
"status": {
"$ref": "#/definitions/v2/TurnPlanStepStatus"
},
"step": {
"type": "string"
}
},
"required": [
"status",
"step"
],
"type": "object"
},
"TurnPlanStepStatus": {
"enum": [
"pending",
"inProgress",
"completed"
],
"type": "string"
},
"TurnPlanUpdatedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"explanation": {
"type": [
"string",
"null"
]
},
"plan": {
"items": {
"$ref": "#/definitions/v2/TurnPlanStep"
},
"type": "array"
},
"threadId": {
"type": "string"
},
"turnId": {
"type": "string"
}
},
"required": [
"plan",
"threadId",
"turnId"
],
"title": "TurnPlanUpdatedNotification",
"type": "object"
},
"TurnStartParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"approvalPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/AskForApproval"
},
{
"type": "null"
}
],
"description": "Override the approval policy for this turn and subsequent turns."
},
"cwd": {
"description": "Override the working directory for this turn and subsequent turns.",
"type": [
"string",
"null"
]
},
"effort": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningEffort"
},
{
"type": "null"
}
],
"description": "Override the reasoning effort for this turn and subsequent turns."
},
"input": {
"items": {
"$ref": "#/definitions/v2/UserInput"
},
"type": "array"
},
"model": {
"description": "Override the model for this turn and subsequent turns.",
"type": [
"string",
"null"
]
},
"outputSchema": {
"description": "Optional JSON Schema used to constrain the final assistant message for this turn."
},
"personality": {
"anyOf": [
{
"$ref": "#/definitions/v2/Personality"
},
{
"type": "null"
}
],
"description": "Override the personality for this turn and subsequent turns."
},
"sandboxPolicy": {
"anyOf": [
{
"$ref": "#/definitions/v2/SandboxPolicy"
},
{
"type": "null"
}
],
"description": "Override the sandbox policy for this turn and subsequent turns."
},
"summary": {
"anyOf": [
{
"$ref": "#/definitions/v2/ReasoningSummary"
},
{
"type": "null"
}
],
"description": "Override the reasoning summary for this turn and subsequent turns."
},
"threadId": {
"type": "string"
}
},
"required": [
"input",
"threadId"
],
"title": "TurnStartParams",
"type": "object"
},
"TurnStartResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"turn": {
"$ref": "#/definitions/v2/Turn"
}
},
"required": [
"turn"
],
"title": "TurnStartResponse",
"type": "object"
},
"TurnStartedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"threadId": {
"type": "string"
},
"turn": {
"$ref": "#/definitions/v2/Turn"
}
},
"required": [
"threadId",
"turn"
],
"title": "TurnStartedNotification",
"type": "object"
},
"TurnStatus": {
"enum": [
"completed",
"interrupted",
"failed",
"inProgress"
],
"type": "string"
},
"TurnSteerParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"expectedTurnId": {
"description": "Required active turn id precondition. The request fails when it does not match the currently active turn.",
"type": "string"
},
"input": {
"items": {
"$ref": "#/definitions/v2/UserInput"
},
"type": "array"
},
"threadId": {
"type": "string"
}
},
"required": [
"expectedTurnId",
"input",
"threadId"
],
"title": "TurnSteerParams",
"type": "object"
},
"TurnSteerResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"turnId": {
"type": "string"
}
},
"required": [
"turnId"
],
"title": "TurnSteerResponse",
"type": "object"
},
"UserInput": {
"oneOf": [
{
"properties": {
"text": {
"type": "string"
},
"text_elements": {
"default": [],
"description": "UI-defined spans within `text` used to render or persist special elements.",
"items": {
"$ref": "#/definitions/v2/TextElement"
},
"type": "array"
},
"type": {
"enum": [
"text"
],
"title": "TextUserInputType",
"type": "string"
}
},
"required": [
"text",
"type"
],
"title": "TextUserInput",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"image"
],
"title": "ImageUserInputType",
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"url"
],
"title": "ImageUserInput",
"type": "object"
},
{
"properties": {
"path": {
"type": "string"
},
"type": {
"enum": [
"localImage"
],
"title": "LocalImageUserInputType",
"type": "string"
}
},
"required": [
"path",
"type"
],
"title": "LocalImageUserInput",
"type": "object"
},
{
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"enum": [
"skill"
],
"title": "SkillUserInputType",
"type": "string"
}
},
"required": [
"name",
"path",
"type"
],
"title": "SkillUserInput",
"type": "object"
},
{
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"enum": [
"mention"
],
"title": "MentionUserInputType",
"type": "string"
}
},
"required": [
"name",
"path",
"type"
],
"title": "MentionUserInput",
"type": "object"
}
]
},
"Verbosity": {
"description": "Controls output length/detail on GPT-5 models via the Responses API. Serialized with lowercase values to match the OpenAI API.",
"enum": [
"low",
"medium",
"high"
],
"type": "string"
},
"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"
}
]
},
"WebSearchMode": {
"enum": [
"disabled",
"cached",
"live"
],
"type": "string"
},
"WindowsSandboxSetupCompletedNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"error": {
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/definitions/v2/WindowsSandboxSetupMode"
},
"success": {
"type": "boolean"
}
},
"required": [
"mode",
"success"
],
"title": "WindowsSandboxSetupCompletedNotification",
"type": "object"
},
"WindowsSandboxSetupMode": {
"enum": [
"elevated",
"unelevated"
],
"type": "string"
},
"WindowsSandboxSetupStartParams": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"mode": {
"$ref": "#/definitions/v2/WindowsSandboxSetupMode"
}
},
"required": [
"mode"
],
"title": "WindowsSandboxSetupStartParams",
"type": "object"
},
"WindowsSandboxSetupStartResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"started": {
"type": "boolean"
}
},
"required": [
"started"
],
"title": "WindowsSandboxSetupStartResponse",
"type": "object"
},
"WindowsWorldWritableWarningNotification": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"extraCount": {
"format": "uint",
"minimum": 0.0,
"type": "integer"
},
"failedScan": {
"type": "boolean"
},
"samplePaths": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"extraCount",
"failedScan",
"samplePaths"
],
"title": "WindowsWorldWritableWarningNotification",
"type": "object"
},
"WriteStatus": {
"enum": [
"ok",
"okOverridden"
],
"type": "string"
}
}
},
"title": "CodexAppServerProtocol",
"type": "object"
}