feat(mcp): expose thread workspace inventory - #8685
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Thread transfer impact
This comment will update automatically after the next completed run. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit 0130019. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a production MCP worktree-inventory capability with new contracts, Git enumeration, filesystem/status reads, thread-binding aggregation, and changes to the existing worktree-status path. Its cross-layer scope and shared VCS behavior exceed a small bounded additive change. Notes:
You can add or adjust custom eligibility rules. Learn more. |

Problem
An agent can see only the branch and worktree path recorded on its own thread. That does not reveal whether Git still agrees, which physical worktrees are available, whether they are dirty, or which live threads are bound to them.
Change
t3_worktree_statuswith separate recorded and actual workspace state plus an agreement resultt3_worktree_listresults with bounded thread bindings and per-entry availabilityvcs.listRefswire payload or cache shapeBehavior
These tools are read-only and current-project scoped. Inventory pages are sliced before per-worktree status reads, one missing or unreadable checkout produces an explicit entry outcome instead of failing the entire page, and plain non-repository project roots return a truthful status. Nested independent repositories are not attributed to a containing checkout. The tools do not create, switch, remove, prune, revive, or repair worktrees.
Validation
vp test run apps/server/src/mcp/WorktreeMcpService.test.ts(60 tests)vp test run apps/server/src/vcs/GitVcsDriverCore.test.ts(58 tests)vcs.listRefsdecode/cache compatibility coverageDependency
Bottom of native stack #8711, rooted on
agents/mcp-controls/base-490318aat490318afa505d3d033295eca12d7e62b4b922725. The dependent checkout mutation is PR #8680. This is independent of lifecycle PR #5589.Implemented by GPT-5.6-Sol via Codex in T3 Code.