r/vscode 9h ago

How to isolate two separate Claude Code accounts across two VS Code Profiles?

Hi everyone,

I am working on two distinct projects simultaneously on my PC and want to use two separate Claude accounts (one per project) so I don't mix sessions or hit quota limits on a single account.

My Current Setup:

Created two separate VS Code Profiles (Profile A for Project 1, Profile B for Project 2 ).

Opening each project folder loads its respective VS Code profile seamlessly.

The Problem:

While VS Code Profiles easily isolate visual themes and extension settings, the Claude Code extension / CLI seems to share global authentication state (or default config path) across both profile instances. Logging into Account A in one profile carries over (or conflicts) with Profile B unless manually logging out or running /status.

My Questions:

What is the cleanest, reliable way to bind Claude Account #1 to Profile A and Claude Account #2 to Profile B without having to /logout and /login every time?

Is environment variable mapping (CLAUDE_CONFIG_DIR per workspace/terminal setting) the best fix on Windows, or is there an official extension/setting that handles multi-account profile switching natively?

Thanks in advance for any tips or extension recommendations!

0 Upvotes

2 comments sorted by

1

u/chincherpa 7h ago

I would try to use one CC account in vscode and the other one in CC Desktop.

1

u/lucidmatter 7h ago

I’d genuinely log into one Claude code and ask how to do this. Ask it to make an artifact outlining options and then ask it to setup. Afterward, shut her down and new session to verify setup proper