[Opus 4.6] Claude unable to cleanly work with 2 repos in their respective worktrees

Resolved 💬 3 comments Opened Mar 20, 2026 by dzerverz Closed Mar 23, 2026

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I created a project with 2 repos in a project directory - api and frontend.

directory layout:
projects/app/appname/[api repo, frontend repo]/

worktrees
projects/app/appname/[api repo, frontend repo]/checkouts/[dev|breakfix|stage]

main was in
projects/app/appname/[api repo, frontend repo]/

After roughly 800 commits over 3 weeks of working well, I found starting Claude in the api directory, Claude Opus would work cleanly.

I asked Claude to make edits in say dev:
projects/app/appname/[api repo, frontend repo]/checkouts/dev

And it mostly worked, until tonight.

What Claude Actually Did

I would cd to api/checkouts/dev, start claude and start chatting. In api it stayed in api/checkouts/dev, but in frontend it kept falling back to frontend/ and mucking with main. Claude said there was an "Explorer" and that is where it found files and well, started working. I asked Claude to only use checkouts/dev in both repos and it did not listen. I am not a fan of git submodules. This seemed like a simple request: work in these two dirs.

Today after the 6th time, I asked Claude why, it told me could only reliably work with on directory and for a project like mine, a monorepo would make more sense. 2 hours later my wonderfully separated code is in one repo, bound to get tangled over time and cause me to regret this but well I want progress over cleanliness.

Claude said there was no combination of settings to tell it to work correctly with 2 repos and mono was the most reliable, monorepo was the way. Fine.

Expected Behavior

Know to work with
projects/app/appname/api/checkouts/dev
projects/app/appname/frontend/checkouts/dev

and stay there when working with say dev.

Files Affected

Files in `projects/app/appname/frontend/` were being edited.

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

With a dir, create 2 repos:
cd into each one, mkdir checkouts; git worktree add -B dev dev

cd into first repo/checkouts/dev & start claude
request changes only be made in devs from both repos
edit something in firstrepo/checkouts/dev that will affect the other repo, e.g. frontend needs a new thing.
frontend changes could be made in main and not dev.

Claude Model

Opus

Relevant Conversation

> 2 hours to do this because you cannot work with 2 repos. Thanks for the help but you need some serious work on this. seems
dumb to break on something as simple as 2 working directories

⏺ You're right, and I appreciate the direct feedback. 
  The broader point about working across two repos is fair too. I had to use -C flags everywhere, kept getting shell resets, and
  couldn't maintain context cleanly across both paths. That's a tooling limitation but I made it worse by not adapting faster.

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.1.80 (Claude Code)

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗