Skip to content

VS Code Extension

The VS Code extension provides a native graphical interface for Claude Code directly in your editor — inline diffs, @-mentions, plan review, conversation history, and multiple sessions.


Ctrl+Shift+X → search "Claude Code" → Install

Or install directly: vscode:extension/anthropic.claude-code

Also works with: Cursor, Devin Desktop, Kiro, and other VS Code forks.

Requirements: VS Code 1.98.0+, any paid Claude subscription or Console account.


  • Editor Toolbar: Spark icon (⚡) at top-right of editor (when a file is open)
  • Activity Bar: Spark icon in left sidebar → sessions list
  • Status Bar: click ✱ Claude Code at bottom-right
  • Command Palette: Ctrl+Shift+P → “Claude Code” → “Open in New Tab”

Reference files and folders in your prompt:

@auth # fuzzy-matches auth.js, AuthService.ts, etc.
@src/components/
@app.ts#5-10 # specific line range

Shortcut: Select text in editor → Alt+K to insert an @-mention with file path + line numbers.

When Claude wants to edit a file, it shows a side-by-side diff and asks permission. You can:

  • Accept the change
  • Reject it
  • Edit the proposed content in the diff view before accepting

Before implementing, Claude describes what it will do and waits for your approval. VS Code opens the plan as a full markdown document where you can add inline comments.

Toggle: click the mode indicator at the bottom of the prompt box.

  • Ctrl+Shift+Esc → Open in new tab
  • Command Palette → “Open in New Window”
  • Blue dot on spark icon = permission request pending
  • Orange dot = Claude finished while tab was hidden

Click Session history at top of Claude panel. Search by keyword or browse by date. Also supports resuming cloud sessions from claude.ai (requires claude.ai subscription login, not Console).

Hover over any message → rewind button → choose:

  • Fork conversation from here — new branch, keep all code changes
  • Rewind code to here — revert files, keep full conversation
  • Fork + rewind — new branch AND revert files

ModeBehavior
defaultClaude asks permission before each action
planClaude plans first, waits for approval
acceptEditsClaude makes edits without asking
bypassPermissionsNo prompts (sandbox only)

Set default in VS Code settings: claudeCode.initialPermissionMode


ActionShortcut
Toggle focus editor ↔ ClaudeCmd/Ctrl+Esc
Open in new tabCmd/Ctrl+Shift+Esc
Insert @-mention referenceAlt/Option+K
New conversationCmd/Ctrl+N (enable with setting)
Reopen closed session tabCmd/Ctrl+Shift+T

macOS Tahoe: If Cmd+Esc does nothing, disable System Settings → Keyboard → Game Controllers → Game Overlay.


Connect to Chrome browser for testing web apps:

@browser go to localhost:3000 and check the console for errors

Requires Claude in Chrome extension v1.0.36+.


Add servers via the integrated terminal:

Terminal window
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_PAT"

Manage in the chat panel with /mcp.


SettingDefaultDescription
useTerminalfalseUse CLI-style terminal instead of graphical panel
initialPermissionModedefaultStarting permission mode
preferredLocationpanelsidebar (right) or panel (new tab)
autosavetrueAuto-save before Claude reads/writes
useCtrlEnterToSendfalseCtrl+Enter instead of Enter to submit
enableNewConversationShortcutfalseEnable Ctrl+N for new conversation

FeatureCLIVS Code Extension
All commands and skillsYesSubset (type / to see)
MCP server configFullAdd via CLI; manage with /mcp
CheckpointsYesYes
! bash shortcutYesNo
Tab completionYesNo
Visual diff reviewNoYes
Multiple tabsNoYes

To use Bedrock, Vertex AI, or Azure:

  1. Open VS Code settings → Extensions → Claude Code → check Disable Login Prompt
  2. Configure in ~/.claude/settings.json (follows setup guides for each provider)

vscode://anthropic.claude-code/open
vscode://anthropic.claude-code/open?prompt=review%20my%20changes
vscode://anthropic.claude-code/open?session=SESSION_ID

Open from shell:

Terminal window
# Windows PowerShell
Start-Process "vscode://anthropic.claude-code/open"
# macOS
open "vscode://anthropic.claude-code/open"

Type /plugins in the prompt box → graphical plugin manager with Install/enable/disable controls.


Spark icon not visible: Open a file first (icon requires a file open). Check VS Code version ≥ 1.98.0. Disable conflicting AI extensions.

cmd not found in terminal: The extension doesn’t add claude to PATH — install the standalone CLI separately.

Claude not responding: Check internet connection, try a new conversation, or run claude in the terminal for better error messages.

  • Trick: “Same engine + three IDE superpowers: inline diffs, @-mentions, selection context.”
  • Show: fix a bug without leaving VS Code once.
  • They’ll trip on: running the CLI in the integrated terminal unconnected — /ide links them.

Learning path:36-code-review.md · Index · ➡ 38-desktop-web-remote.md

Written by Fenil Patel