# feat\(mcp\): target thread launches by project · PR \#8678 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/8678)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: closed

Source repository: pingdotgg/t3code

Source branch: agents/mcp-projects/targeted-threads

Target branch: agents/mcp-projects/management

Head commit: 99e60afa114984f01756807ccd61d190cec9ac22

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/8678)

[Commits](https://git.cafe/pingdotgg/t3code/pull/8678/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/8678/diffs?format=markdown)

## Description

---

## Problem

Project creation is incomplete if agents cannot start and manage new threads in the selected project and workspace.

## Change

- Extend `create_threads` and `t3_thread_start` with explicit `projectId` and root, existing-worktree, or new-worktree launch strategies.
- Extend thread list, read, send, wait, and interrupt targeting to an authorized project in the same environment.
- Reuse `ThreadLaunchService` for canonical repository identity, actual-branch checks, provisioning, setup, and durable replay.
- Carry caller run, provider session, runtime, and interaction ceilings into serialized thread creation and initial-message acceptance.

## Behavior

Omitted project selection keeps the current checkout only for the current project. A different project uses its own root/default strategy and never inherits the caller's worktree path. Accepted retries reconstruct durable thread, workspace, model, message, and initial-run identity before mutable provider or filesystem planning. Root retries can recover an in-progress setup after the root temporarily disappears, while fresh branch mismatches reject before creating work. Cross-project parent records use a server-owned path that verifies the durable target project.

## Validation

- 72 focused Git workspace, ThreadLaunch, MCP targeting, lifecycle-ceiling, durable replay, contract, and real MCP/V2 integration tests.
- Scoped contracts, client-runtime, shared, and server typechecks.
- Formatting and type-aware lint for the complete stacked diff.

## Stack

Upper layer of native stack 8774, dependent on [#8677](https://github.com/pingdotgg/t3code/pull/8677). The stack targets `t3code/codex-turn-mapping` at `415ed0f73b97f1655b6282492f81d0b2bba3a9cc`.

Implemented by GPT-5.6-Sol via Codex in T3 Code.

