create_worktree_thread
Creates a retained, locked Git worktree and task at an approved commit, isolating Codex sessions under a verified sandbox policy without running setup or cleanup.
Instructions
Create a retained, locked Git worktree and a task at an approved full commit ID.
Requires approval of bridge-managed-retained ownership, source checkout root, immutable commit, absent absolute destination (existing parent), permissions and exact prompt. Creates a detached checkout and Git metadata; disables hooks/filters, copies no dirty files, runs no setup, sets no Goal. No automatic cleanup, archive or Desktop binding. Approval policy is never. expected_sandbox_policy is the complete expected response: e.g. {"type":"readOnly","networkAccess":false}. Actual settings and workspace roots must match before prompt dispatch. Omit prompt for readiness-only creation; caller owns further readiness and Goal policy. Model/reasoning defaults are preserved when omitted. Reuse request_id after uncertainty: receipts replay without continuing partial work. Known artifacts and recovery requirements are retained even on failure/cancellation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| title | No | ||
| prompt | No | ||
| sandbox | Yes | ||
| request_id | Yes | ||
| destination | Yes | ||
| worktree_mode | Yes | ||
| reasoning_effort | No | ||
| source_repository | Yes | ||
| starting_revision | Yes | ||
| app_server_project_id | No | ||
| expected_sandbox_policy | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||