
Two sessions working in the same folder can change the same file at once and undo each other's work. A worktree gives a session its own copy of the project to edit. In the desktop app, turn on Worktree under the prompt box before you start the session. It's there when your project uses git. In a terminal, run claude --worktree with a name, and a different name in a second terminal. When a session is done, ask it to save the work and bring it into your main project.
I'm done with this change. Save it and bring it into my main project.claude --worktree new-footerWhy it works
In our test, two sessions changed the same page, one the tagline and one the footer, each in its own copy. The main project stayed as it was until we told each session to bring its work back. Claude then saved each change and merged it in, and both changes landed with no conflict.
Watch out
A new copy starts from a save point (a git commit), so changes you haven't saved yet aren't in it. Save first. If the project has no save points yet, ask Claude to set up git and save your work. Bring a session's work back before you archive it in the desktop app, because archiving can throw away unsaved changes. If both sessions change the same lines, Claude has to work out which version to keep, so give each session a separate job.