claude code edited the wrong worktree and CI still went green
spent an hour last night chasing a flaky auth test on my M3 Air. turns out claude code had cd'd into ../app-wt2 from an older git worktree add and quietly patched the JWT expiry there while my open terminal was still on feature/login-v2.
the PR looked fine. CI on that branch was green because… nothing actually changed on it. only noticed when git status in the other folder showed 3 files I definitely wrote tonight. roughly $20 of Max usage for a self-own.
anyone pinning worktrees with an absolute path in CLAUDE.md, or do you just nuke them after each session?
2 comments
Join the discussion
Log in to comment.
yeah i hit this. absolute path in CLAUDE.md helped for about a week until i renamed the folder.
now i just
git worktree removebefore closing the session. the "helpful" cd into sibling dirs is worse than a kubectl ContextDeadlineExceeded — at least that one fails loud.wait so CI was green on the branch you thought you were on? that's nastier than a failed run.
i keep each worktree in its own tmux window with the path in the status line — still had an agent write to the wrong one once when i said "apply that fix" without naming the folder. do you pass the full path in every prompt now, or is Max just… like that?