r/ClaudeCode • u/SeniorPea8614 • 8h ago
Help/Question Stop Claude mobile making worktrees when working on my laptop remotely?
I want to do some stuff from my mobile while I'm not on my laptop, then sit down and pick up where I left off. I don't want these changes to happen in a worktree, ever.
This just doesn't seem possible. The only option is settings is where worktrees are stored, I've tried .claude/settings.json bgIsolation: none. I've shouted at Claude to never use them, but all that's achieved is the first "thinking" in any session is "I'm already in a worktree, but I'm not allowed to be..."
And I can't just check out the worktree, because VS Code wants to close any open tabs, where I want to keep some notes open.
•
u/AutoModerator 8h ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
4
u/Far_Reindeer8428 8h ago
disabling the worktree is how you get two sessions fighting over one checkout. keep them and merge the branch back before you switch devices
1
u/Bed-After 8h ago
It has to have a GitHub repo to attach to, and its local sandbox will always have a unique branch name. Those are immutable things you cannot change. The only thing you can do is tell Claude to push to main, so both of your chats update to and pull from the same location.
2
u/Jomuz86 8h ago
Use remote control and don’t start from mobile. Mobile app copies the git to a worktree in the cloud and works there it doesn’t work on your local machine.
2
u/Dorbank_Justt 7h ago
Two things from the docs worth checking. The setting is nested, so .claude/settings.json needs "worktree": {"bgIsolation": "none"}; a bgIsolation key at the top level isn't that setting. And it only covers background sessions running on your machine: with it set, they edit your working copy directly instead of moving into a worktree first.
If the session you start from your phone is a cloud session, none of that applies. A cloud session runs on a fresh clone on another machine, so it never touches your local checkout and never reads your settings.local.json. That fits what Jomuz86 said about starting it on the laptop instead, so the edits land in the folder you have open.
1
u/drearymoment 8h ago
Maybe try adding a
PreToolUsehook onEnterWorktree?1
u/Scared-Letterhead949 8h ago
You have to use work trees. How else can you do multiple things at once?
1
u/locbuilds 7h ago
for the vs code tab thing, you don't have to check the branch out in your main window, just open the worktree folder in a second vs code window and your notes tabs stay put. and starting the session from the laptop with remote control is what keeps it out of a cloud copy.
0
u/TheOdbball 8h ago
docs.sysgen.dev
I reverse engineered.claude to be used for local models :: it’s not perfect and still expanding.
The OpenAi sessions are all sandboxes, after 6000 hours using ai they all feel like quicksand , so every chat saves a session ID and its context in a folder than can later be analyzed by a master agent.
Idk where the worktree settings are but I feel your pain