[BUG] Claude Opus 4.8 makes changes outside the current worktree for the current session
Resolved 💬 1 comment Opened May 29, 2026 by pranav-raft Closed Jul 1, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using worktree mode with Claude Opus 4.8 in Claude Code MacOS desktop app (latest version - Claude 1.9659.2 (390d6c) 2026-05-28T21:50:01.000Z) it starts making changes outside the current worktree e.g. it tries to make changes in default worktree where default/primary branch is checked-out.
What Should Happen?
Claude should make changes in current worktree only
Error Messages/Logs
Reply from Claude: You're right — my edits were landing in the main repo (/myApp/app/...), not this worktree (.../.claude/worktrees/silly-austin-4ced74/app/...). The Explore agents reported main-repo paths and I followed them blindly. Let me undo the stray file in main and redo everything in the worktree.
Steps to Reproduce
- Start a session with worktree option checked/selected.
- Use plan mode to create a plan.
- Accept plan. <-- its very likely that the plan mode is confusing claude with paths that refer to main repo not current worktree
- Claude starts making changes in main repo outside current worktree.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.9659.2 (390d6c) 2026-05-28T21:50:01.000Z
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
N/A
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗