Apply a Codex diff
codex_applyApply a Codex task's latest diff to the local working tree with git apply, updating files on disk.
Instructions
Apply the latest diff produced by a Codex task to the local working tree, as a git apply. Modifies files on disk.
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": {
"task_id": "<task_id>"
},
"name": "codex_apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Repository to apply into. Must sit inside the server allowlist. | |
| task_id | Yes | Codex task id whose latest diff should be applied with git apply. | |
| timeout_seconds | No | Inline wait before backgrounding. 0 returns immediately. |