batch-codex
Runs multiple coding tasks in sequence or parallel for mass refactoring, bulk code changes, and automated transformations, with configurable sandbox and stop-on-error controls.
Instructions
Run multiple tasks through OpenAI Codex in batch. Use when the user wants Codex to handle several tasks sequentially — mass refactoring, bulk code changes, or automated transformations.
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": {
"tasks": "<tasks>"
},
"name": "batch-codex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oss | No | Use local Ollama server | |
| model | No | Optional model ID, passed straight to Codex CLI (-m). Omit to use the default from ~/.codex/config.toml (recommended). Do not guess IDs: call the list-models tool to see the models this Codex install offers. | |
| tasks | Yes | Array of atomic tasks to delegate to Codex | |
| search | No | Enable live web search (Codex --search). Does not change the sandbox. | |
| sandbox | No | Sandbox mode: read-only, workspace-write, danger-full-access | workspace-write |
| timeout | No | Maximum execution time in milliseconds. Default: CODEX_MCP_TIMEOUT_MS env var, else 600000 (10 min). | |
| parallel | No | Execute tasks in parallel (experimental) | |
| workingDir | No | Working directory for execution | |
| stopOnError | No | Stop execution if any task fails | |
| enableFeatures | No | Enable feature flags | |
| disableFeatures | No | Disable feature flags | |
| reasoningEffort | No | Optional reasoning effort (model_reasoning_effort). Common values: low, medium, high, xhigh, max; some models also take none, minimal or ultra. Support varies per model: list-models shows the levels each model accepts. Omit to use the model/config default. |