codex_worktrees
Manage isolated Git worktrees for Codex coding tasks: plan, create, inspect, hand off, and clean up without merging or pushing. Requires worktrees=true except for inspection.
Instructions
plan/create: repo or project_id, name, optional base; create also plan_id/key. inspect: project_id or path, offset/limit. handoff: finished task_id. cleanup: project_id, optional keep_branch, key. Except inspect, needs worktrees=true. Never merges/pushes.
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": {
"action": "<action>"
},
"name": "codex_worktrees"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | HEAD | |
| name | No | ||
| path | No | ||
| repo | No | Absolute repository | |
| limit | No | ||
| action | Yes | ||
| offset | No | ||
| plan_id | No | ||
| task_id | No | Task id | |
| project_id | No | ||
| request_id | No | Key for identical retries | |
| keep_branch | No | ||
| operation_id | No | Alias of request_id |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| result_version | Yes |