run
Start a Codex session for code generation and debugging, with streaming progress, stall detection, and auto-recovery.
Instructions
Run a Codex session with streaming progress, stall detection, and auto-recovery
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the session | |
| level | No | Execution level: L1=Executor, L2=Builder, L3=Autonomous, L4=Specialist | |
| model | No | Optional model override (e.g. 'gpt-5.2') | |
| prompt | Yes | The prompt to send to Codex | |
| sandboxMode | No | Sandbox mode for command execution | |
| approvalPolicy | No | Approval policy for commands | |
| maxRecoveryAttempts | No | Max auto-recovery attempts when stalled (default: 2) | |
| stallTimeoutMinutes | No | Minutes of inactivity before detecting stall (default: 5) |