Claude Code · VS Code · August 29, 2026

How to Switch Claude Code Accounts in VS Code

In VS Code, use Claude Code's native /login flow for a one-off login change, or select a named aisw profile from the integrated terminal when you need a repeatable local boundary. Verify the profile and launch a new process when using aisw.

The VS Code workspace and the Claude Code process are separate boundaries. The editor keeps the project open, while the integrated terminal supplies the environment used when Claude Code starts. Claude Code also supports /login for its native authentication flow. aisw adds saved names, live verification, and repository expectations around that provider workflow.

Native Claude Code login or an aisw profile?

Use /login when you want Claude Code to guide you through changing the current login. Use aisw when you move between known work, personal, or client accounts repeatedly, need separate local state, or want a repository guard to catch the wrong account before the agent starts. The two workflows are complementary: aisw uses Claude Code's supported authentication and does not bypass it.

1. Select the Claude Code account in the integrated terminal

Open the VS Code terminal for the repository, select the profile that matches the task, and inspect the tool-specific state before starting Claude Code.

aisw use claude work
aisw status --tool claude
aisw verify

2. Start Claude Code after the switch

For an aisw profile switch, close an existing Claude Code process before launching it again. A process keeps the environment it received at startup, so changing the selected profile does not change that process in place. For a native provider login change, follow the Claude Code login instructions.

claude

3. Switch from work to personal

Save the current session, select the other named profile, verify it, and start a fresh process from the same integrated terminal.

aisw use claude personal
aisw status --tool claude
aisw verify
claude

When VS Code still shows the old account

Create a new integrated terminal if it was open before the shell hook was installed or changed. Then repeat the profile selection and verification. If the selected profile is correct but Claude Code still uses the old credential, quit the agent and launch it again; storage behavior can also vary by Claude Code installation.

aisw status --tool claude
aisw verify
claude

Bind a VS Code repository to its expected account

Manual switching depends on remembering the right profile. For a client or work repository, bind the folder to a context and enable a workspace guard so an account mismatch is visible before the agent starts.

aisw context create client-acme --claude client-acme-claude
aisw workspace bind . --context client-acme
aisw workspace guard --mode strict

For the platform-neutral setup, read How to Switch Claude Code Accounts. For Windows-specific PowerShell guidance, see multiple Claude Code accounts on Windows. If the old account remains active, follow the Claude Code troubleshooting checklist.

Keep the VS Code account boundary visible

Use aisw in the integrated terminal to select and verify the profile before each session.

Claude Code and VS Code questions

Direct answers about native login and repeatable integrated-terminal profiles.

How do I switch Claude Code accounts in VS Code?

Run aisw use claude <profile> in the integrated terminal, check aisw status --tool claude and aisw verify, then start a new Claude Code process.

Why does Claude Code still use the old account in VS Code?

A running process can retain its previous environment. Exit Claude Code, switch the named profile, verify it, and relaunch from the updated terminal.

Can VS Code switch Claude Code accounts inside an existing session?

Claude Code's native `/login` flow can change the login for its current workflow. For an aisw profile switch, start a new process after selecting and verifying the profile so the updated environment is used.