Skip to content

feat(mcp): expose branch-backed workspace discovery - #10566

Merged
juliusmarminge merged 1 commit into
agents/mcp-thin/project-launchesfrom
agents/mcp-thin/workspace-refs
Sep 7, 2026
Merged

feat(mcp): expose branch-backed workspace discovery#10566
juliusmarminge merged 1 commit into
agents/mcp-thin/project-launchesfrom
agents/mcp-thin/workspace-refs

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 7, 2026

Copy link
Copy Markdown
Member

Part 16/16 of the shared-core and MCP stack. Based on #10565.

Expose GitWorkflowService.listRefs for the calling thread workspace. Existing worktree handoff and status tools stay unchanged.

This discovers branch-backed refs/worktrees only. Detached unbound inventory and switching an existing checkout require a shared service operation and are intentionally not rebuilt inside MCP. The old workspace work is retained for that extraction.

MCP-only rebuild of #8685, #8680, preserving attribution to Julius Marminge's original work. Original branches remain available for separate service follow-ups.

Validation: The composed stack passes 94 tests across 12 focused files, including shared core MCP and real MCP/V2 integration, attachment intake, project RPC/service contracts, and client model command selection. Server/contracts/shared/client-runtime typechecks and targeted format/lint/diff checks pass. New behavior coverage lives with the shared operation; no per-tool mock suite was added. Current-head CI is shown below.

Layer size: 5 files, +65/-1. No domain-service production implementation or documentation files change in this MCP layer.

Prepared with Codex in the OpenAI agent runtime.

Note

Add t3_worktree_list MCP tool for branch-backed workspace discovery

  • Adds a readonly t3_worktree_list tool to the worktree toolkit that lists git refs using the caller's worktree path or the project workspace root.
  • The handler checks the worktree capability and project existence, returning structured failures when either is missing; git errors map to an unavailable failure.
  • Registers the tool in CLAUDE_READ_ONLY_T3_MCP_ALLOWED_TOOLS and the T3_MCP_TOOLS presentation registry (label "List workspace branches"), and updates the Claude readonly allowlist test to cover the new tool.

Macroscope summarized 1dce00c.

@juliusmarminge juliusmarminge changed the title feat(mcp): expose workspace branch inventory feat(mcp): expose branch-backed workspace discovery Sep 7, 2026
@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 7, 2026
@github-actions github-actions Bot added the size:M 30-99 changed lines (additions + deletions). label Sep 7, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new MCP tool for discovering workspace branches and checkout paths, including wiring it into the default Claude read-only tool policy. The behavior is read-only and scoped, but the new capability and policy default change warrant human review.

No code changes detected at 1dce00c. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 1dce00c.

This comment will update automatically after the next completed run.

@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch from 2283b18 to 18c4af6 Compare September 7, 2026 19:35
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

Comment thread apps/server/src/mcp/toolkits/worktree/handlers.ts
Comment thread apps/server/src/mcp/toolkits/worktree/handlers.ts
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch from 18c4af6 to 1cb479c Compare September 7, 2026 19:44
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch 2 times, most recently from ce6934d to b2ee14d Compare September 7, 2026 19:52
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch from b2ee14d to 32e8ac5 Compare September 7, 2026 19:54
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch from 32e8ac5 to 1634a97 Compare September 7, 2026 20:39
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch 2 times, most recently from 9dac043 to cf905d8 Compare September 7, 2026 20:48
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-thin/workspace-refs branch from cf905d8 to 1dce00c Compare September 7, 2026 20:55
@juliusmarminge
juliusmarminge merged commit afc8fb8 into t3code/codex-turn-mapping Sep 7, 2026
35 of 45 checks passed
@juliusmarminge
juliusmarminge deleted the agents/mcp-thin/workspace-refs branch September 7, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant