Repository navigation
fix(workspace): discover worktrees nested in boundary dirs - #492
Merged
Merged
Conversation
Dynamic workspace discovery skips a flow.yaml under .claude, vendor, and similar directories inside a registered workspace, so vendored copies never become the workspace. Claude Code creates worktrees at <repo>/.claude/worktrees/<name>, so commands run in those worktrees resolved to the main checkout instead. A linked worktree (a .git file whose gitdir has a commondir) is now always a valid root. Submodules have no commondir and stay behind the boundary. No ticket
Member
Author
|
Verification
Worth a close look
Out of scope (follow-up)
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dynamic workspace discovery walks past a
flow.yamlfound under.claude,vendor,third_party, and similar directories inside a registered workspace, so a vendored copy never becomes the workspace. Agent tools put worktrees inside the repo (Claude Code uses<repo>/.claude/worktrees/<name>), so commands run in those worktrees resolved to the registered main checkout and ran its executables instead of the worktree's.The boundary now exempts linked git worktrees, detected by a
.gitfile whose gitdir contains acommondir. The check doesn't depend on where a tool places its worktrees. Submodules also have a.gitfile but nocommondir, so a vendored submodule stays excluded.Notable Changes
discoveryBoundaryaccepts any linked-worktree root.claude/worktreesand a submodule undervendorNo ticket