Frontend in one repo, API in another. Claude starts in one of them and never looks at the other.
Add the second folder when you start Claude Code, and it can read and edit files there too.
claude --add-dir ../api-server
Already in a session? /add-dir ../api-server does the same, and Tab completes the path. To keep the extra folder for every session, put it under permissions.additionalDirectories in your settings file.
So "the endpoint returns the wrong shape" becomes something Claude can check on both sides, instead of me pasting a response from one repo into the other.
It earns its keep on any change that crosses a repo boundary, like a client and its server or an app and its shared library. Without the second folder Claude has to guess what the other side looks like. With it, Claude can open the file and stop guessing. I would add the folder only for the task at hand and drop it afterwards, since every extra folder is more for Claude to wander around in.
The caveat is in the docs: the folder gives file access, not configuration. Claude Code does not pick up most of the .claude/ setup from the added directory, so hooks and settings stay with the folder you started in.
Further reading: CLI reference – Claude Code docs, Commands – Claude Code docs, On this site: claude -w gives every session its own git worktree, On this site: Ctrl+O opens the transcript view where Claude's work is not hidden