Claude Code in VS Code: the complete extension guide
The Claude Code VS Code extension is the recommended way to use Claude Code inside VS Code, Cursor, and compatible forks. Instead of a terminal-only chat, you get a native panel with side-by-side diffs, plan review, session history, and checkpoints — while the same conversation history is shared with the CLI.
What the extension gives you
Install it
Requires VS Code 1.94.0 or higher and any paid Claude subscription (Pro, Max, Team or Enterprise) — no API key required. Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux), search "Claude Code", and click Install. It also installs in Cursor, Devin Desktop, Kiro and other VS Code forks — search the editor's Extensions view or the Open VSX registry. If the icon doesn't appear after install, run "Developer: Reload Window" from the Command Palette.
Sign in and open the panel
The first time you open the panel a sign-in screen appears — click Sign in and finish authorization in your browser. The quickest way to open the panel is the Spark icon in the editor toolbar (appears once a file is open), the Activity Bar's sessions list, or the ✱ Claude Code entry in the Status Bar, which works even with no file open.
Permission modes in the prompt box
Click the mode indicator at the bottom of the prompt box to switch, or set a default with claudeCode.initialPermissionMode in VS Code settings.
Reference files with @-mentions
Type @ followed by a file or folder name — fuzzy matching finds it even from a partial name, for example @auth matches auth.js or AuthService.ts, and a trailing slash targets a folder. Claude automatically sees your selected text; press Option+K (Mac) or Alt+K (Windows/Linux) to also insert a precise reference like @app.ts#5-10. You can drag files into the prompt box while holding Shift to attach them.
Checkpoints: rewind Claude's edits
Hover any message to reveal the rewind button, then choose one of three options: fork the conversation from that point while keeping the current code, rewind the code to that point while keeping the full chat history, or do both at once. This is the safety net that makes it comfortable to let Claude move fast — a bad edit is always one click from undone.
Extension vs. CLI: what's different
Installing the extension doesn't put claude on your shell PATH — that needs the standalone CLI install. Once installed, run claude in the integrated terminal (Ctrl+` / Cmd+`) for CLI-only features, and switch back to the panel with claude --resume, since both share the same conversation history.
Keyboard shortcuts worth memorizing
Cmd+Esc / Ctrl+EscCmd+Shift+Esc / Ctrl+Shift+EscOption+K / Alt+KCmd+Shift+T / Ctrl+Shift+TCmd+N / Ctrl+NSettings worth knowing
Extension settings live under Cmd+, (Mac) / Ctrl+, (Windows/Linux) → Extensions → Claude Code. Shared Claude Code settings — allowed commands, hooks, MCP servers — live in ~/.claude/settings.json and apply to both the extension and the CLI.
useTerminal(false)initialPermissionMode(default)preferredLocation(panel)autosave(true)hideOnboarding(false)respectGitIgnore(true)Connect MCP servers without leaving the editor
Open the integrated terminal and run claude mcp add to register a server — for example GitHub's remote MCP server authenticated with a personal access token. Back in the chat panel, type /mcp to see connection status, enable or disable a server, reconnect, or manage OAuth. A server showing failed usually means bad or missing credentials — the add command doesn't validate them up front.
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"Work with git: commits, PRs and worktrees
Ask Claude in plain language to stage changes, write a commit message, or open a pull request, and it generates descriptions based on the actual diff — including context about testing or implementation decisions when relevant. Common prompts: "commit my changes with a descriptive message", "create a pr for this feature", "summarize the changes I've made to the auth module". For parallel work, start Claude in an isolated git worktree with claude --worktree feature-auth (or -w) — each worktree keeps independent files and its own branch while sharing git history, so two Claude sessions never step on each other's changes.
claude --worktree feature-authUsing Amazon Bedrock, Google Cloud or Microsoft Foundry
By default the extension talks directly to Anthropic's API. If your organization routes Claude through Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry instead, open the Disable Login Prompt setting (claudeCode.disableLoginPrompt) so the extension skips the normal sign-in screen, then configure the provider in ~/.claude/settings.json — the same file the CLI reads, so the two stay in sync automatically.
Fix common issues
Browse Claude Code configs — skills, subagents and MCP servers — that install straight into your .claude/ folder from ConfigDeck.
Browse the marketplace →