Install & set up

How to Use Claude Code in VS Code

3 min read

The VS Code extension is now a native graphical panel and the recommended way to use Claude Code in VS Code. The old advice — run claude in the integrated terminal and it installs a companion extension for you — is out of date: install it from the Marketplace like any other extension.

1. Check the prerequisites

VS Code 1.94.0 or higher, plus a paid Claude subscription or a Console account. No API key needed.

2. Install it

Search “Claude Code” in the Extensions view, or install from the Open VSX registry in editors that don’t use the Microsoft marketplace. The ID is anthropic.claude-code, and it installs in Cursor and other forks too. If it doesn’t appear, run Developer: Reload Window from the Command Palette.

3. Sign in

Open the panel and follow the sign-in screen once. If you later see Not logged in · Please run /login, the extension reopens it automatically.

4. Work with diffs and selections

Edits arrive as inline diffs in the editor to accept or reject, you can review and edit Claude’s plans before accepting them, and you can @-mention files with specific line ranges from your selection. Conversations open in separate tabs.

Cmd+Esc (Mac) / Ctrl+Esc (Windows, Linux)

What it does: toggles focus between the editor and Claude’s prompt box — the one shortcut worth learning on day one.

It also supports checkpoints: hover any message to reveal the rewind button and restore the conversation, the code, or both.

5. Keep the CLI around

The extension bundles its own CLI for the panel, but does not put claude on your PATH. Some features are CLI-only, so keep the standalone install too:

npm install -g @anthropic-ai/claude-code

What it does: installs the CLI so claude runs in the integrated terminal. Platform guides: macOS & Linux · Windows.

Verify it worked

Ask for a one-line edit. A working install shows the change as a diff in the editor with accept and reject buttons, not as a code block in the chat. A code block means the panel isn’t connected to the workspace — reload the window.

One gotcha: conversations the extension starts ignore project settings for the starting permission mode. Set claudeCode.initialPermissionMode in your VS Code user settings instead. It’s the same agent either way.

Source: Use Claude Code in VS Code.

Open the full interactive version (with copy buttons) ↗

← All guides