codex_submit_task
Queue a durable Codex write operation and immediately get an operationId. Poll with codex_get_operation_status for thread updates and completion.
Instructions
Durably queue a Codex write operation and return immediately with operationId. Use codex_get_operation_status to poll threadId, turnId, messages, pending interactions, and completion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation_type | Yes | ||
| client_request_id | No | Stable retry idempotency key. If omitted, MCP creates a new operation and relies on prompt deduplication to prevent active duplicate turns. | |
| project_id | No | ||
| chat_id | No | ||
| thread_id | No | Required for operation_type='steer_turn'. Target thread that owns the active turn. | |
| source_thread_id | No | Required for operation_type='fork_thread'. Source thread to fork from. | |
| expected_turn_id | No | Required for operation_type='steer_turn'. Active turn id precondition passed to Codex app-server. | |
| workflow_id | No | ||
| message | No | Required for all operation types except fork_thread. For fork_thread, omit it for fork-only or provide it to start the first turn in the forked thread. | |
| input_items | No | Optional image inputs appended to the text message for operation types that start a new turn. Supports image URL and localImage file path items only. | |
| title | No | ||
| cwd | No | ||
| model | No | ||
| fork_config | No | ||
| ephemeral | No | ||
| output_schema | No | Optional JSON Schema passed to app-server outputSchema for this turn final assistant message. | |
| collaboration_mode | No | ||
| approval_policy | No | on-request | |
| sandbox | No | read-only | |
| force | No | ||
| timeout_seconds | No | ||
| first_message_max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| agentGuidance | No | ||
| agentGuidanceText | No | ||
| recoveryAttemptState | No |