SpyBara
Go Premium Account
2026
27 Feb 2026, 18:15
14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
21 Apr 2026, 12:30
14 May 2026, 21:00 14 May 2026, 07:00 13 May 2026, 00:57 12 May 2026, 01:59 11 May 2026, 18:00 7 May 2026, 20:02 7 May 2026, 17:08 5 May 2026, 23:00 2 May 2026, 06:45 2 May 2026, 00:48 1 May 2026, 18:29 30 Apr 2026, 18:36 29 Apr 2026, 12:40 29 Apr 2026, 00:50 25 Apr 2026, 06:37 25 Apr 2026, 00:42 24 Apr 2026, 18:20 24 Apr 2026, 12:28 23 Apr 2026, 18:31 23 Apr 2026, 12:28 23 Apr 2026, 00:46 22 Apr 2026, 18:29 22 Apr 2026, 00:42 21 Apr 2026, 18:29 21 Apr 2026, 12:30 21 Apr 2026, 06:45 20 Apr 2026, 18:26 20 Apr 2026, 06:53 18 Apr 2026, 18:18 17 Apr 2026, 00:44 16 Apr 2026, 18:31 16 Apr 2026, 00:46 15 Apr 2026, 18:31 15 Apr 2026, 06:44 14 Apr 2026, 18:31 14 Apr 2026, 12:29 13 Apr 2026, 18:37 13 Apr 2026, 00:44 12 Apr 2026, 06:38 10 Apr 2026, 18:23 9 Apr 2026, 00:33 8 Apr 2026, 18:32 8 Apr 2026, 00:40 7 Apr 2026, 00:40 2 Apr 2026, 18:23 31 Mar 2026, 06:35 31 Mar 2026, 00:39 28 Mar 2026, 06:26 28 Mar 2026, 00:36 27 Mar 2026, 18:23 27 Mar 2026, 00:39 26 Mar 2026, 18:27 25 Mar 2026, 18:24 23 Mar 2026, 18:22 20 Mar 2026, 00:35 18 Mar 2026, 12:23 18 Mar 2026, 00:36 17 Mar 2026, 18:24 17 Mar 2026, 00:33 16 Mar 2026, 18:25 16 Mar 2026, 12:23 14 Mar 2026, 00:32 13 Mar 2026, 18:15 13 Mar 2026, 00:34 11 Mar 2026, 00:31 9 Mar 2026, 00:34 8 Mar 2026, 18:10 8 Mar 2026, 00:35 7 Mar 2026, 18:10 7 Mar 2026, 06:14 7 Mar 2026, 00:33 6 Mar 2026, 00:38 5 Mar 2026, 18:41 5 Mar 2026, 06:22 5 Mar 2026, 00:34 4 Mar 2026, 18:18 4 Mar 2026, 06:20 3 Mar 2026, 18:20 3 Mar 2026, 00:35 27 Feb 2026, 18:15 24 Feb 2026, 06:27 24 Feb 2026, 00:33 23 Feb 2026, 18:27 21 Feb 2026, 00:33 20 Feb 2026, 12:16 19 Feb 2026, 20:53 19 Feb 2026, 20:37
Thu 2 18:23 Tue 7 00:40 Wed 8 00:40 Wed 8 18:32 Thu 9 00:33 Fri 10 18:23 Sun 12 06:38 Mon 13 00:44 Mon 13 18:37 Tue 14 12:29 Tue 14 18:31 Wed 15 06:44 Wed 15 18:31 Thu 16 00:46 Thu 16 18:31 Fri 17 00:44 Sat 18 18:18 Mon 20 06:53 Mon 20 18:26 Tue 21 06:45 Tue 21 12:30 Tue 21 18:29 Wed 22 00:42 Wed 22 18:29 Thu 23 00:46 Thu 23 12:28 Thu 23 18:31 Fri 24 12:28 Fri 24 18:20 Sat 25 00:42 Sat 25 06:37 Wed 29 00:50 Wed 29 12:40 Thu 30 18:36

app-server.md +184 −30

Details

21Requests include `method`, `params`, and `id`:21Requests include `method`, `params`, and `id`:

22 22 

23```json23```json

24{ "method": "thread/start", "id": 10, "params": { "model": "gpt-5.1-codex" } }24{ "method": "thread/start", "id": 10, "params": { "model": "gpt-5.4" } }

25```25```

26 26 

27Responses echo the `id` with either `result` or `error`:27Responses echo the `id` with either `result` or `error`:


99 },99 },

100});100});

101send({ method: "initialized", params: {} });101send({ method: "initialized", params: {} });

102send({ method: "thread/start", id: 1, params: { model: "gpt-5.1-codex" } });102send({ method: "thread/start", id: 1, params: { model: "gpt-5.4" } });

103```103```

104 104 

105## Core primitives105## Core primitives


123 123 

124Clients must send a single `initialize` request per transport connection before invoking any other method on that connection, then acknowledge with an `initialized` notification. Requests sent before initialization receive a `Not initialized` error, and repeated `initialize` calls on the same connection return `Already initialized`.124Clients must send a single `initialize` request per transport connection before invoking any other method on that connection, then acknowledge with an `initialized` notification. Requests sent before initialization receive a `Not initialized` error, and repeated `initialize` calls on the same connection return `Already initialized`.

125 125 

126The server returns the user agent string it will present to upstream services. Set `clientInfo` to identify your integration.126The server returns the user agent string it will present to upstream services plus `platformFamily` and `platformOs` values that describe the runtime target. Set `clientInfo` to identify your integration.

127 127 

128`initialize.params.capabilities` also supports per-connection notification opt-out via `optOutNotificationMethods`, which is a list of exact method names to suppress for that connection. Matching is exact (no wildcards/prefixes). Unknown method names are accepted and ignored.128`initialize.params.capabilities` also supports per-connection notification opt-out via `optOutNotificationMethods`, which is a list of exact method names to suppress for that connection. Matching is exact (no wildcards/prefixes). Unknown method names are accepted and ignored.

129 129 


159 },159 },

160 "capabilities": {160 "capabilities": {

161 "experimentalApi": true,161 "experimentalApi": true,

162 "optOutNotificationMethods": [162 "optOutNotificationMethods": ["thread/started", "item/agentMessage/delta"]

163 "codex/event/session_configured",

164 "item/agentMessage/delta"

165 ]

166 }163 }

167 }164 }

168}165}


204- `thread/read` - read a stored thread by id without resuming it; set `includeTurns` to return full turn history. Returned `thread` objects include runtime `status`.201- `thread/read` - read a stored thread by id without resuming it; set `includeTurns` to return full turn history. Returned `thread` objects include runtime `status`.

205- `thread/list` - page through stored thread logs; supports cursor-based pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filters. Returned `thread` objects include runtime `status`.202- `thread/list` - page through stored thread logs; supports cursor-based pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filters. Returned `thread` objects include runtime `status`.

206- `thread/loaded/list` - list the thread ids currently loaded in memory.203- `thread/loaded/list` - list the thread ids currently loaded in memory.

204- `thread/name/set` - set or update a thread's user-facing name for a loaded thread or a persisted rollout; emits `thread/name/updated`.

207- `thread/archive` - move a thread's log file into the archived directory; returns `{}` on success and emits `thread/archived`.205- `thread/archive` - move a thread's log file into the archived directory; returns `{}` on success and emits `thread/archived`.

206- `thread/unsubscribe` - unsubscribe this connection from thread turn/item events. If this was the last subscriber, the server unloads the thread and emits `thread/closed`.

208- `thread/unarchive` - restore an archived thread rollout back into the active sessions directory; returns the restored `thread` and emits `thread/unarchived`.207- `thread/unarchive` - restore an archived thread rollout back into the active sessions directory; returns the restored `thread` and emits `thread/unarchived`.

209- `thread/status/changed` - notification emitted when a loaded thread's runtime `status` changes.208- `thread/status/changed` - notification emitted when a loaded thread's runtime `status` changes.

210- `thread/compact/start` - trigger conversation history compaction for a thread; returns `{}` immediately while progress streams via `turn/*` and `item/*` notifications.209- `thread/compact/start` - trigger conversation history compaction for a thread; returns `{}` immediately while progress streams via `turn/*` and `item/*` notifications.

210- `thread/shellCommand` - run a user-initiated shell command against a thread. This runs outside the sandbox with full access and doesn't inherit the thread sandbox policy.

211- `thread/backgroundTerminals/clean` - stop all running background terminals for a thread (experimental; requires `capabilities.experimentalApi`).

211- `thread/rollback` - drop the last N turns from the in-memory context and persist a rollback marker; returns the updated `thread`.212- `thread/rollback` - drop the last N turns from the in-memory context and persist a rollback marker; returns the updated `thread`.

212- `turn/start` - add user input to a thread and begin Codex generation; responds with the initial `turn` and streams events. For `collaborationMode`, `settings.developer_instructions: null` means "use built-in instructions for the selected mode."213- `turn/start` - add user input to a thread and begin Codex generation; responds with the initial `turn` and streams events. For `collaborationMode`, `settings.developer_instructions: null` means "use built-in instructions for the selected mode."

213- `turn/steer` - append user input to the active in-flight turn for a thread; returns the accepted `turnId`.214- `turn/steer` - append user input to the active in-flight turn for a thread; returns the accepted `turnId`.

214- `turn/interrupt` - request cancellation of an in-flight turn; success is `{}` and the turn ends with `status: "interrupted"`.215- `turn/interrupt` - request cancellation of an in-flight turn; success is `{}` and the turn ends with `status: "interrupted"`.

215- `review/start` - kick off the Codex reviewer for a thread; emits `enteredReviewMode` and `exitedReviewMode` items.216- `review/start` - kick off the Codex reviewer for a thread; emits `enteredReviewMode` and `exitedReviewMode` items.

216- `command/exec` - run a single command under the server sandbox without starting a thread/turn.217- `command/exec` - run a single command under the server sandbox without starting a thread/turn.

218- `command/exec/write` - write `stdin` bytes to a running `command/exec` session or close `stdin`.

219- `command/exec/resize` - resize a running PTY-backed `command/exec` session.

220- `command/exec/terminate` - stop a running `command/exec` session.

217- `model/list` - list available models (set `includeHidden: true` to include entries with `hidden: true`) with effort options, optional `upgrade`, and `inputModalities`.221- `model/list` - list available models (set `includeHidden: true` to include entries with `hidden: true`) with effort options, optional `upgrade`, and `inputModalities`.

218- `experimentalFeature/list` - list feature flags with lifecycle stage metadata and cursor pagination.222- `experimentalFeature/list` - list feature flags with lifecycle stage metadata and cursor pagination.

219- `collaborationMode/list` - list collaboration mode presets (experimental, no pagination).223- `collaborationMode/list` - list collaboration mode presets (experimental, no pagination).

220- `skills/list` - list skills for one or more `cwd` values (supports `forceReload` and optional `perCwdExtraUserRoots`).224- `skills/list` - list skills for one or more `cwd` values (supports `forceReload` and optional `perCwdExtraUserRoots`).

225- `plugin/list` - list discovered plugin marketplaces and plugin state, including install/auth policy metadata, marketplace load errors, featured plugin ids, and local, Git, or remote plugin source metadata.

226- `plugin/read` - read one plugin by marketplace path or remote marketplace name and plugin name, including bundled skills, apps, and MCP server names when those details are available.

227- `plugin/install` - install a plugin from a marketplace path or remote marketplace name.

228- `plugin/uninstall` - uninstall an installed plugin.

221- `app/list` - list available apps (connectors) with pagination plus accessibility/enabled metadata.229- `app/list` - list available apps (connectors) with pagination plus accessibility/enabled metadata.

222- `skills/config/write` - enable or disable skills by path.230- `skills/config/write` - enable or disable skills by path.

223- `mcpServer/oauth/login` - start an OAuth login for a configured MCP server; returns an authorization URL and emits `mcpServer/oauthLogin/completed` on completion.231- `mcpServer/oauth/login` - start an OAuth login for a configured MCP server; returns an authorization URL and emits `mcpServer/oauthLogin/completed` on completion.

224- `tool/requestUserInput` - prompt the user with 1-3 short questions for a tool call (experimental); questions can set `isOther` for a free-form option.232- `tool/requestUserInput` - prompt the user with 1-3 short questions for a tool call (experimental); questions can set `isOther` for a free-form option.

225- `config/mcpServer/reload` - reload MCP server configuration from disk and queue a refresh for loaded threads.233- `config/mcpServer/reload` - reload MCP server configuration from disk and queue a refresh for loaded threads.

226- `mcpServerStatus/list` - list MCP servers, tools, resources, and auth status (cursor + limit pagination).234- `mcpServerStatus/list` - list MCP servers, tools, resources, and auth status (cursor + limit pagination). Use `detail: "full"` for full data or `detail: "toolsAndAuthOnly"` to omit resources.

235- `mcpServer/resource/read` - read a single MCP resource through an initialized MCP server.

227- `windowsSandbox/setupStart` - start Windows sandbox setup for `elevated` or `unelevated` mode; returns quickly and later emits `windowsSandbox/setupCompleted`.236- `windowsSandbox/setupStart` - start Windows sandbox setup for `elevated` or `unelevated` mode; returns quickly and later emits `windowsSandbox/setupCompleted`.

228- `feedback/upload` - submit a feedback report (classification + optional reason/logs + conversation id, plus optional `extraLogFiles` attachments).237- `feedback/upload` - submit a feedback report (classification + optional reason/logs + conversation id, plus optional `extraLogFiles` attachments).

229- `config/read` - fetch the effective configuration on disk after resolving configuration layering.238- `config/read` - fetch the effective configuration on disk after resolving configuration layering.

239- `externalAgentConfig/detect` - detect external-agent artifacts that can be migrated with `includeHome` and optional `cwds`; each detected item includes `cwd` (`null` for home).

240- `externalAgentConfig/import` - apply selected external-agent migration items by passing explicit `migrationItems` with `cwd` (`null` for home).

230- `config/value/write` - write a single configuration key/value to the user's `config.toml` on disk.241- `config/value/write` - write a single configuration key/value to the user's `config.toml` on disk.

231- `config/batchWrite` - apply configuration edits atomically to the user's `config.toml` on disk.242- `config/batchWrite` - apply configuration edits atomically to the user's `config.toml` on disk.

232- `configRequirements/read` - fetch requirements from `requirements.toml` and/or MDM, including allow-lists and residency requirements (or `null` if you havent set any up).243- `configRequirements/read` - fetch requirements from `requirements.toml` and/or MDM, including allow-lists, pinned `featureRequirements`, and residency/network requirements (or `null` if you haven't set any up).

244- `fs/readFile`, `fs/writeFile`, `fs/createDirectory`, `fs/getMetadata`, `fs/readDirectory`, `fs/remove`, and `fs/copy` - operate on absolute filesystem paths through the app-server v2 filesystem API.

245 

246Plugin summaries include a `source` union. Local plugins return

247`{ "type": "local", "path": ... }`, Git-backed marketplace entries return

248`{ "type": "git", "url": ..., "path": ..., "refName": ..., "sha": ... }`,

249and remote catalog entries return `{ "type": "remote" }`. For remote-only

250catalog entries, `PluginMarketplaceEntry.path` can be `null`; pass

251`remoteMarketplaceName` instead of `marketplacePath` when reading or installing

252those plugins.

233 253 

234## Models254## Models

235 255 


241{ "method": "model/list", "id": 6, "params": { "limit": 20, "includeHidden": false } }261{ "method": "model/list", "id": 6, "params": { "limit": 20, "includeHidden": false } }

242{ "id": 6, "result": {262{ "id": 6, "result": {

243 "data": [{263 "data": [{

244 "id": "gpt-5.2-codex",264 "id": "gpt-5.4",

245 "model": "gpt-5.2-codex",265 "model": "gpt-5.4",

246 "upgrade": "gpt-5.3-codex",266 "displayName": "GPT-5.4",

247 "displayName": "GPT-5.2 Codex",

248 "hidden": false,267 "hidden": false,

249 "defaultReasoningEffort": "medium",268 "defaultReasoningEffort": "medium",

250 "reasoningEffort": [{269 "supportedReasoningEfforts": [{

251 "effort": "low",270 "reasoningEffort": "low",

252 "description": "Lower latency"271 "description": "Lower latency"

253 }],272 }],

254 "inputModalities": ["text", "image"],273 "inputModalities": ["text", "image"],


261 280 

262Each model entry can include:281Each model entry can include:

263 282 

264- `reasoningEffort` - supported effort options for the model.283- `supportedReasoningEfforts` - supported effort options for the model.

265- `defaultReasoningEffort` - suggested default effort for clients.284- `defaultReasoningEffort` - suggested default effort for clients.

266- `upgrade` - optional recommended upgrade model id for migration prompts in clients.285- `upgrade` - optional recommended upgrade model id for migration prompts in clients.

286- `upgradeInfo` - optional upgrade metadata for migration prompts in clients.

267- `hidden` - whether the model is hidden from the default picker list.287- `hidden` - whether the model is hidden from the default picker list.

268- `inputModalities` - supported input types for the model (for example `text`, `image`).288- `inputModalities` - supported input types for the model (for example `text`, `image`).

269- `supportsPersonality` - whether the model supports personality-specific instructions such as `/personality`.289- `supportsPersonality` - whether the model supports personality-specific instructions such as `/personality`.


301- `thread/list` supports cursor pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filtering.321- `thread/list` supports cursor pagination plus `modelProviders`, `sourceKinds`, `archived`, and `cwd` filtering.

302- `thread/loaded/list` returns the thread IDs currently in memory.322- `thread/loaded/list` returns the thread IDs currently in memory.

303- `thread/archive` moves the thread's persisted JSONL log into the archived directory.323- `thread/archive` moves the thread's persisted JSONL log into the archived directory.

324- `thread/unsubscribe` unsubscribes the current connection from a loaded thread and can trigger `thread/closed`.

304- `thread/unarchive` restores an archived thread rollout back into the active sessions directory.325- `thread/unarchive` restores an archived thread rollout back into the active sessions directory.

305- `thread/compact/start` triggers compaction and returns `{}` immediately.326- `thread/compact/start` triggers compaction and returns `{}` immediately.

306- `thread/rollback` drops the last N turns from the in-memory context and records a rollback marker in the thread's persisted JSONL log.327- `thread/rollback` drops the last N turns from the in-memory context and records a rollback marker in the thread's persisted JSONL log.


311 332 

312```json333```json

313{ "method": "thread/start", "id": 10, "params": {334{ "method": "thread/start", "id": 10, "params": {

314 "model": "gpt-5.1-codex",335 "model": "gpt-5.4",

315 "cwd": "/Users/me/project",336 "cwd": "/Users/me/project",

316 "approvalPolicy": "never",337 "approvalPolicy": "never",

317 "sandbox": "workspaceWrite",338 "sandbox": "workspaceWrite",

318 "personality": "friendly"339 "personality": "friendly",

340 "serviceName": "my_app_server_client"

319} }341} }

320{ "id": 10, "result": {342{ "id": 10, "result": {

321 "thread": {343 "thread": {

322 "id": "thr_123",344 "id": "thr_123",

323 "preview": "",345 "preview": "",

346 "ephemeral": false,

324 "modelProvider": "openai",347 "modelProvider": "openai",

325 "createdAt": 1730910000348 "createdAt": 1730910000

326 }349 }


328{ "method": "thread/started", "params": { "thread": { "id": "thr_123" } } }351{ "method": "thread/started", "params": { "thread": { "id": "thr_123" } } }

329```352```

330 353 

354`serviceName` is optional. Set it when you want app-server to tag thread-level metrics with your integration's service name.

355 

331To continue a stored session, call `thread/resume` with the `thread.id` you recorded earlier. The response shape matches `thread/start`. You can also pass the same configuration overrides supported by `thread/start`, such as `personality`:356To continue a stored session, call `thread/resume` with the `thread.id` you recorded earlier. The response shape matches `thread/start`. You can also pass the same configuration overrides supported by `thread/start`, such as `personality`:

332 357 

333```json358```json


335 "threadId": "thr_123",360 "threadId": "thr_123",

336 "personality": "friendly"361 "personality": "friendly"

337} }362} }

338{ "id": 11, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes" } } }363{ "id": 11, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false } } }

339```364```

340 365 

341Resuming a thread doesn't update `thread.updatedAt` (or the rollout file's modified time) by itself. The timestamp updates when you start a turn.366Resuming a thread doesn't update `thread.updatedAt` (or the rollout file's modified time) by itself. The timestamp updates when you start a turn.


365 390 

366```json391```json

367{ "method": "thread/read", "id": 19, "params": { "threadId": "thr_123", "includeTurns": true } }392{ "method": "thread/read", "id": 19, "params": { "threadId": "thr_123", "includeTurns": true } }

368{ "id": 19, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "status": { "type": "notLoaded" }, "turns": [] } } }393{ "id": 19, "result": { "thread": { "id": "thr_123", "name": "Bug bash notes", "ephemeral": false, "status": { "type": "notLoaded" }, "turns": [] } } }

369```394```

370 395 

371Unlike `thread/resume`, `thread/read` doesn't load the thread into memory or emit `thread/started`.396Unlike `thread/resume`, `thread/read` doesn't load the thread into memory or emit `thread/started`.


405} }430} }

406{ "id": 20, "result": {431{ "id": 20, "result": {

407 "data": [432 "data": [

408 { "id": "thr_a", "preview": "Create a TUI", "modelProvider": "openai", "createdAt": 1730831111, "updatedAt": 1730831111, "name": "TUI prototype", "status": { "type": "notLoaded" } },433 { "id": "thr_a", "preview": "Create a TUI", "ephemeral": false, "modelProvider": "openai", "createdAt": 1730831111, "updatedAt": 1730831111, "name": "TUI prototype", "status": { "type": "notLoaded" } },

409 { "id": "thr_b", "preview": "Fix tests", "modelProvider": "openai", "createdAt": 1730750000, "updatedAt": 1730750000, "status": { "type": "notLoaded" } }434 { "id": "thr_b", "preview": "Fix tests", "ephemeral": true, "modelProvider": "openai", "createdAt": 1730750000, "updatedAt": 1730750000, "status": { "type": "notLoaded" } }

410 ],435 ],

411 "nextCursor": "opaque-token-or-null"436 "nextCursor": "opaque-token-or-null"

412} }437} }


437{ "id": 21, "result": { "data": ["thr_123", "thr_456"] } }462{ "id": 21, "result": { "data": ["thr_123", "thr_456"] } }

438```463```

439 464 

465### Unsubscribe from a loaded thread

466 

467`thread/unsubscribe` removes the current connection's subscription to a thread. The response status is one of:

468 

469- `unsubscribed` when the connection was subscribed and is now removed.

470- `notSubscribed` when the connection wasn't subscribed to that thread.

471- `notLoaded` when the thread isn't loaded.

472 

473If this was the last subscriber, the server unloads the thread and emits a `thread/status/changed` transition to `notLoaded` plus `thread/closed`.

474 

475```json

476{ "method": "thread/unsubscribe", "id": 22, "params": { "threadId": "thr_123" } }

477{ "id": 22, "result": { "status": "unsubscribed" } }

478{ "method": "thread/status/changed", "params": {

479 "threadId": "thr_123",

480 "status": { "type": "notLoaded" }

481} }

482{ "method": "thread/closed", "params": { "threadId": "thr_123" } }

483```

484 

440### Archive a thread485### Archive a thread

441 486 

442Use `thread/archive` to move the persisted thread log (stored as a JSONL file on disk) into the archived sessions directory.487Use `thread/archive` to move the persisted thread log (stored as a JSONL file on disk) into the archived sessions directory.


470{ "id": 25, "result": {} }515{ "id": 25, "result": {} }

471```516```

472 517 

518### Run a thread shell command

519 

520Use `thread/shellCommand` for user-initiated shell commands that belong to a thread. The request returns immediately with `{}` while progress streams through standard `turn/*` and `item/*` notifications.

521 

522This API runs outside the sandbox with full access and doesn't inherit the thread sandbox policy. Clients should expose it only for explicit user-initiated commands.

523 

524If the thread already has an active turn, the command runs as an auxiliary action on that turn and its formatted output is injected into the turn's message stream. If the thread is idle, app-server starts a standalone turn for the shell command.

525 

526```json

527{ "method": "thread/shellCommand", "id": 26, "params": { "threadId": "thr_b", "command": "git status --short" } }

528{ "id": 26, "result": {} }

529```

530 

531### Clean background terminals

532 

533Use `thread/backgroundTerminals/clean` to stop all running background terminals associated with a thread. This method is experimental and requires `capabilities.experimentalApi = true`.

534 

535```json

536{ "method": "thread/backgroundTerminals/clean", "id": 27, "params": { "threadId": "thr_b" } }

537{ "id": 27, "result": {} }

538```

539 

540### Roll back recent turns

541 

542Use `thread/rollback` to remove the last `numTurns` entries from the in-memory context and persist a rollback marker in the rollout log. The returned `thread` includes `turns` populated after the rollback.

543 

544```json

545{ "method": "thread/rollback", "id": 28, "params": { "threadId": "thr_b", "numTurns": 1 } }

546{ "id": 28, "result": { "thread": { "id": "thr_b", "name": "Bug bash notes", "ephemeral": false } } }

547```

548 

473## Turns549## Turns

474 550 

475The `input` field accepts a list of items:551The `input` field accepts a list of items:


533 "writableRoots": ["/Users/me/project"],609 "writableRoots": ["/Users/me/project"],

534 "networkAccess": true610 "networkAccess": true

535 },611 },

536 "model": "gpt-5.1-codex",612 "model": "gpt-5.4",

537 "effort": "medium",613 "effort": "medium",

538 "summary": "concise",614 "summary": "concise",

539 "personality": "friendly",615 "personality": "friendly",


676- The server rejects empty `command` arrays.752- The server rejects empty `command` arrays.

677- `sandboxPolicy` accepts the same shape used by `turn/start` (for example, `dangerFullAccess`, `readOnly`, `workspaceWrite`, `externalSandbox`).753- `sandboxPolicy` accepts the same shape used by `turn/start` (for example, `dangerFullAccess`, `readOnly`, `workspaceWrite`, `externalSandbox`).

678- When omitted, `timeoutMs` falls back to the server default.754- When omitted, `timeoutMs` falls back to the server default.

755- Set `tty: true` for PTY-backed sessions, and use `processId` when you plan to follow up with `command/exec/write`, `command/exec/resize`, or `command/exec/terminate`.

756- Set `streamStdoutStderr: true` to receive `command/exec/outputDelta` notifications while the command is running.

679 757 

680### Read admin requirements (`configRequirements/read`)758### Read admin requirements (`configRequirements/read`)

681 759 


687 "requirements": {765 "requirements": {

688 "allowedApprovalPolicies": ["onRequest", "unlessTrusted"],766 "allowedApprovalPolicies": ["onRequest", "unlessTrusted"],

689 "allowedSandboxModes": ["readOnly", "workspaceWrite"],767 "allowedSandboxModes": ["readOnly", "workspaceWrite"],

768 "featureRequirements": {

769 "personality": true,

770 "unified_exec": false

771 },

690 "network": {772 "network": {

691 "enabled": true,773 "enabled": true,

692 "allowedDomains": ["api.openai.com"],774 "allowedDomains": ["api.openai.com"],


697} }779} }

698```780```

699 781 

700`result.requirements` is `null` when no requirements are configured. When present, the optional `network` object carries managed proxy constraints (domain rules, proxy settings, and unix-socket policy).782`result.requirements` is `null` when no requirements are configured. See the docs on [`requirements.toml`](https://developers.openai.com/codex/config-reference#requirementstoml) for details on supported keys and values.

701 783 

702### Windows sandbox setup (`windowsSandbox/setupStart`)784### Windows sandbox setup (`windowsSandbox/setupStart`)

703 785 


724 806 

725## Events807## Events

726 808 

727Event notifications are the server-initiated stream for thread lifecycles, turn lifecycles, and the items within them. After you start or resume a thread, keep reading the active transport stream for `thread/started`, `thread/archived`, `thread/unarchived`, `thread/status/changed`, `turn/*`, and `item/*` notifications.809Event notifications are the server-initiated stream for thread lifecycles, turn lifecycles, and the items within them. After you start or resume a thread, keep reading the active transport stream for `thread/started`, `thread/archived`, `thread/unarchived`, `thread/closed`, `thread/status/changed`, `turn/*`, `item/*`, and `serverRequest/resolved` notifications.

728 810 

729### Notification opt-out811### Notification opt-out

730 812 


732 814 

733- Exact-match only: `item/agentMessage/delta` suppresses only that method.815- Exact-match only: `item/agentMessage/delta` suppresses only that method.

734- Unknown method names are ignored.816- Unknown method names are ignored.

735- Applies to both legacy (`codex/event/*`) and v2 (`thread/*`, `turn/*`, `item/*`, etc.) notifications.817- Applies to the current `thread/*`, `turn/*`, `item/*`, and related v2 notifications.

736- Doesn't apply to requests, responses, or errors.818- Doesn't apply to requests, responses, or errors.

737 819 

738### Fuzzy file search events (experimental)820### Fuzzy file search events (experimental)


767- `commandExecution` - `{id, command, cwd, status, commandActions, aggregatedOutput?, exitCode?, durationMs?}`.849- `commandExecution` - `{id, command, cwd, status, commandActions, aggregatedOutput?, exitCode?, durationMs?}`.

768- `fileChange` - `{id, changes, status}` describing proposed edits; `changes` list `{path, kind, diff}`.850- `fileChange` - `{id, changes, status}` describing proposed edits; `changes` list `{path, kind, diff}`.

769- `mcpToolCall` - `{id, server, tool, status, arguments, result?, error?}`.851- `mcpToolCall` - `{id, server, tool, status, arguments, result?, error?}`.

852- `dynamicToolCall` - `{id, tool, arguments, status, contentItems?, success?, durationMs?}` for client-executed dynamic tool invocations.

770- `collabToolCall` - `{id, tool, status, senderThreadId, receiverThreadId?, newThreadId?, prompt?, agentStatus?}`.853- `collabToolCall` - `{id, tool, status, senderThreadId, receiverThreadId?, newThreadId?, prompt?, agentStatus?}`.

771- `webSearch` - `{id, query, action?}` for web search requests issued by the agent.854- `webSearch` - `{id, query, action?}` for web search requests issued by the agent.

772- `imageView` - `{id, path}` emitted when the agent invokes the image viewer tool.855- `imageView` - `{id, path}` emitted when the agent invokes the image viewer tool.


823Order of messages:906Order of messages:

824 907 

8251. `item/started` shows the pending `commandExecution` item with `command`, `cwd`, and other fields.9081. `item/started` shows the pending `commandExecution` item with `command`, `cwd`, and other fields.

8262. `item/commandExecution/requestApproval` includes `itemId`, `threadId`, `turnId`, optional `reason`, optional `command`, optional `cwd`, optional `commandActions`, optional `proposedExecpolicyAmendment`, and optional `networkApprovalContext`.9092. `item/commandExecution/requestApproval` includes `itemId`, `threadId`, `turnId`, optional `reason`, optional `command`, optional `cwd`, optional `commandActions`, optional `proposedExecpolicyAmendment`, optional `networkApprovalContext`, and optional `availableDecisions`. When `initialize.params.capabilities.experimentalApi = true`, the payload can also include experimental `additionalPermissions` describing requested per-command sandbox access. Any filesystem paths inside `additionalPermissions` are absolute on the wire.

8273. Client responds with one of the command execution approval decisions above.9103. Client responds with one of the command execution approval decisions above.

8284. `item/completed` returns the final `commandExecution` item with `status: completed | failed | declined`.9114. `serverRequest/resolved` confirms that the pending request has been answered or cleared.

9125. `item/completed` returns the final `commandExecution` item with `status: completed | failed | declined`.

829 913 

830When `networkApprovalContext` is present, the prompt is for managed network access (not a general shell-command approval). The current v2 schema exposes the target `host` and `protocol`; clients should render a network-specific prompt and not rely on `command` being a user-meaningful shell command preview.914When `networkApprovalContext` is present, the prompt is for managed network access (not a general shell-command approval). The current v2 schema exposes the target `host` and `protocol`; clients should render a network-specific prompt and not rely on `command` being a user-meaningful shell command preview.

831 915 

832Codex deduplicates concurrent network approval prompts by destination (`host`, protocol, and port). The app-server may therefore send one prompt that unblocks multiple queued requests to the same destination, while different ports on the same host are treated separately.916Codex groups concurrent network approval prompts by destination (`host`, protocol, and port). The app-server may therefore send one prompt that unblocks multiple queued requests to the same destination, while different ports on the same host are treated separately.

833 917 

834### File change approvals918### File change approvals

835 919 


8381. `item/started` emits a `fileChange` item with proposed `changes` and `status: "inProgress"`.9221. `item/started` emits a `fileChange` item with proposed `changes` and `status: "inProgress"`.

8392. `item/fileChange/requestApproval` includes `itemId`, `threadId`, `turnId`, optional `reason`, and optional `grantRoot`.9232. `item/fileChange/requestApproval` includes `itemId`, `threadId`, `turnId`, optional `reason`, and optional `grantRoot`.

8403. Client responds with one of the file change approval decisions above.9243. Client responds with one of the file change approval decisions above.

8414. `item/completed` returns the final `fileChange` item with `status: completed | failed | declined`.9254. `serverRequest/resolved` confirms that the pending request has been answered or cleared.

9265. `item/completed` returns the final `fileChange` item with `status: completed | failed | declined`.

927 

928### `tool/requestUserInput`

929 

930When the client responds to `item/tool/requestUserInput`, app-server emits `serverRequest/resolved` with `{ threadId, requestId }`. If the pending request is cleared by turn start, turn completion, or turn interruption before the client answers, the server emits the same notification for that cleanup.

931 

932### Dynamic tool calls (experimental)

933 

934`dynamicTools` on `thread/start` and the corresponding `item/tool/call` request or response flow are experimental APIs.

935 

936When a dynamic tool is invoked during a turn, app-server emits:

937 

9381. `item/started` with `item.type = "dynamicToolCall"`, `status = "inProgress"`, plus `tool` and `arguments`.

9392. `item/tool/call` as a server request to the client.

9403. The client response payload with returned content items.

9414. `item/completed` with `item.type = "dynamicToolCall"`, the final `status`, and any returned `contentItems` or `success` value.

842 942 

843### MCP tool-call approvals (apps)943### MCP tool-call approvals (apps)

844 944 


1088}1188}

1089```1189```

1090 1190 

1191### Detect and import external agent config

1192 

1193Use `externalAgentConfig/detect` to discover external-agent artifacts that can be migrated, then pass the selected entries to `externalAgentConfig/import`.

1194 

1195Detection example:

1196 

1197```json

1198{ "method": "externalAgentConfig/detect", "id": 63, "params": {

1199 "includeHome": true,

1200 "cwds": ["/Users/me/project"]

1201} }

1202{ "id": 63, "result": {

1203 "items": [

1204 {

1205 "itemType": "AGENTS_MD",

1206 "description": "Import /Users/me/project/CLAUDE.md to /Users/me/project/AGENTS.md.",

1207 "cwd": "/Users/me/project"

1208 },

1209 {

1210 "itemType": "SKILLS",

1211 "description": "Copy skill folders from /Users/me/.claude/skills to /Users/me/.agents/skills.",

1212 "cwd": null

1213 }

1214 ]

1215} }

1216```

1217 

1218Import example:

1219 

1220```json

1221{ "method": "externalAgentConfig/import", "id": 64, "params": {

1222 "migrationItems": [

1223 {

1224 "itemType": "AGENTS_MD",

1225 "description": "Import /Users/me/project/CLAUDE.md to /Users/me/project/AGENTS.md.",

1226 "cwd": "/Users/me/project"

1227 }

1228 ]

1229} }

1230{ "id": 64, "result": {} }

1231```

1232 

1233Supported `itemType` values are `AGENTS_MD`, `CONFIG`, `SKILLS`, `PLUGINS`,

1234and `MCP_SERVER_CONFIG`. For `PLUGINS` items, `details.plugins` lists each

1235`marketplaceName` and the `pluginNames` Codex can try to migrate. Detection

1236returns only items that still have work to do. For example, Codex skips AGENTS

1237migration when `AGENTS.md` already exists and is non-empty, and skill imports

1238don't overwrite existing skill directories.

1239 

1240When detecting plugins from `.claude/settings.json`, Codex reads configured

1241marketplace sources from `extraKnownMarketplaces`. If `enabledPlugins` contains

1242plugins from `claude-plugins-official` but the marketplace source is missing,

1243Codex infers `anthropics/claude-plugins-official` as the source.

1244 

1091## Auth endpoints1245## Auth endpoints

1092 1246 

1093The JSON-RPC auth/account surface exposes request/response methods plus server-initiated notifications (no `id`). Use these to determine auth state, start or cancel logins, logout, and inspect ChatGPT rate limits.1247The JSON-RPC auth/account surface exposes request/response methods plus server-initiated notifications (no `id`). Use these to determine auth state, start or cancel logins, logout, and inspect ChatGPT rate limits.