Skip to content

Instruct agent to cd into worktree after creation#62

Merged
selfcontained merged 1 commit into
mainfrom
worktree-cd-instruction
Mar 15, 2026
Merged

Instruct agent to cd into worktree after creation#62
selfcontained merged 1 commit into
mainfrom
worktree-cd-instruction

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Updates the create_worktree MCP tool response to tell the agent to cd into the new worktree directory
  • Fixes stale git status display for agents — previously the agent stayed in the main project directory so git context probes showed the wrong branch

Test plan

  • Create an agent, have it use create_worktree, verify it cds into the worktree
  • Confirm Dispatch's git context probe picks up the correct branch after the agent cds

🤖 Generated with Claude Code

The create_worktree MCP tool response now tells the agent to cd into
the new worktree path, so git context probes reflect the correct branch
instead of the main project directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@selfcontained
selfcontained merged commit b683371 into main Mar 15, 2026
1 check passed
@selfcontained
selfcontained deleted the worktree-cd-instruction branch March 15, 2026 21:46
@selfcontained
selfcontained restored the worktree-cd-instruction branch March 15, 2026 22:06
@selfcontained
selfcontained deleted the worktree-cd-instruction branch April 9, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant