Skip to main content
Glama
saidelike

codex-thread-bridge

by saidelike

create_worktree_thread

Destructive

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

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
titleNo
promptNo
sandboxYes
request_idYes
destinationYes
worktree_modeYes
reasoning_effortNo
source_repositoryYes
starting_revisionYes
app_server_project_idNo
expected_sandbox_policyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes far beyond the annotations, disclosing that hooks/filters are disabled, no dirty files are copied, no setup or Goal is set, no automatic cleanup/archive/Desktop binding occurs, and that request_id replays receipts without continuing partial work. This is rich behavioral context and fully consistent with the destructiveHint and openWorldHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and information-rich rather than wasted. The main purpose is front-loaded, and each sentence adds meaningful detail about preconditions, side effects, idempotency, or parameter behavior. It could be slightly better organized into preconditions versus behaviors, but it is not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity—12 parameters, required approval gates, destructive annotations, and no schema descriptions—the description covers the critical ground: approval policy, expected sandbox policy matching, readiness-only usage, idempotent request_id behavior, artifact retention on failure, and what is intentionally not done. An output schema also exists, so return values do not need to be described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does add meaning for several parameters: starting_revision must be an approved full commit ID, destination must be absent with an existing parent, expected_sandbox_policy must match the full expected response, prompt can be omitted for readiness-only creation, and model/reasoning defaults are preserved when omitted. A few parameters like source_repository, sandbox, worktree_mode, and app_server_project_id are not individually explained, but most critical semantics are covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Create a retained, locked Git worktree and a task at an approved full commit ID.' This clearly distinguishes the tool from siblings like create_thread, which would not create a worktree. The scope is concrete and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides strong usage context: it lists required approvals, prerequisites, the need for an exact prompt, and readiness-only creation by omitting the prompt. However, it does not explicitly name alternatives or state when not to use this tool versus create_thread or other siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.