💬 hippo: This post is part of the Claude Code Official Docs Breakdown series.


1. What Is the VS Code Extension?

The Claude Code VS Code extension is the officially recommended graphical interface for Claude Code. It brings Claude Code’s full feature set directly into your IDE so you can work with AI-assisted coding without switching to a terminal.

Compared to the CLI, the extension stands out in five areas:

  • Inline Diffs: Code edits render as inline diffs directly inside the editor, making every change immediately clear.
  • Plan Mode: Claude drafts a plan first and waits for your approval before modifying any code—you stay in control of the scope.
  • @-Mentions for Precise Context: Use @ to reference files, directories, and terminal output to feed Claude exact context.
  • Parallel Multi-Session Support: Open multiple conversation tabs side by side to handle separate tasks concurrently.
  • Checkpoints for Rollbacks: Rewind to any earlier turn in a conversation if a change goes sideways.

The extension and the CLI share the same conversation history and ~/.claude/settings.json configuration, so you can move seamlessly between them. A few power-user features (such as the ! bash shortcut and Tab completion) remain CLI-only, while the extension covers everyday coding cleanly.


2. Official Docs Breakdown

2.1 Installation and Prompt Box Controls

Prerequisites:

  • VS Code 1.98.0 or later
  • An Anthropic account (you will be prompted to sign in when opening the extension for the first time)
  • Compatible with both VS Code and Cursor

Installation:

1
2
3
4
5
6
7
# Option 1: Search and install from the Extensions Marketplace
# Mac: Cmd+Shift+X → Search for "Claude Code"
# Windows/Linux: Ctrl+Shift+X → Search for "Claude Code"

# Option 2: Open the marketplace link directly
# VS Code: https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code
# Cursor: https://marketplace.cursorapi.com/items?itemName=anthropic.claude-code

Once installed, the Claude panel appears on the right side of VS Code. The bottom bar of the prompt box exposes quick controls:

Permission Mode Switcher (click the mode indicator at the bottom):

Mode Behavior Best For
Normal (default) Asks for confirmation before every file operation Sensitive repositories, getting started
Plan Claude outlines a plan first and edits only after you approve Complex tasks where you want tight scope control
Auto-accept Claude edits files directly without prompting Experienced users, rapid iteration
Bypass Skips all permission checks inside a sandboxed environment CI/CD pipelines, isolated containers

Note: Auto-accept and Bypass modes require a Team plan. Enable allowDangerouslySkipPermissions in settings for both options to appear in the mode selector.

Other Prompt Box Controls:

  • Command Menu: Type / to open commands including /compact (compress context), /usage (check usage stats), /model (switch models), /mcp (manage MCP servers), and /plugins (manage plugins).
  • Context Indicator: Shows which files and context items are attached to the current conversation.
  • Extended Thinking: When enabled, Claude displays a deeper reasoning trace before acting.
  • Multi-line Input: Press Shift+Enter to insert a newline without sending—handy for longer prompts.

2.2 @-Mentions and Terminal Output

The @ symbol is the primary way to give Claude targeted context, supporting several reference forms:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!-- Fuzzy-match filenames -->
> Explain the logic in @auth
<!-- Matches auth.js, AuthService.ts, authentication.py, etc. -->

<!-- Reference an entire directory (trailing slash) -->
> What components are in @src/components/

<!-- Specify a line range -->
> What do these lines in @app.ts#5-10 do

<!-- Reference a large PDF with a page range -->
> Summarize the first 5 pages of @report.pdf#1-5

<!-- Reference terminal output -->
> @terminal:build Check what caused the build error

Shortcuts:

  • Option+K (Mac) / Alt+K (Windows): Insert a reference to the active file path and selected line range automatically.
  • Shift+Drag file: Drag a file from the Explorer into the prompt box to attach it.
  • Click the selection indicator next to a reference to toggle whether it is visible to or hidden from Claude.

When you highlight code in the editor, Claude sees the active selection automatically—no manual mention needed.

2.3 Customizing Your Workflow and Multi-Session Support

Flexible Panel Placement:

The Claude panel is not locked to the right sidebar—you can drag it anywhere in VS Code:

  • Secondary Side Bar (second column on the right): Keeps Claude visible while you code (recommended layout).
  • Primary Side Bar: Shares the left column with Explorer and other panels.
  • Editor Area: Opens alongside your code tabs.

Drag the panel title bar to your target area just like any native VS Code view.

Parallel Conversations:

  • Cmd+Shift+Esc (Mac) / Ctrl+Shift+Esc (Windows): Open a new conversation in a new editor tab.
  • Cmd+N (Mac) / Ctrl+N (Windows): Start a new conversation (requires focus in the Claude panel and enableNewConversationShortcut enabled).

Spark Icon Status Indicator:

The Spark icon in the top-right corner of the editor displays a colored status dot:

  • Blue dot: A permission request is waiting for your approval.
  • Orange dot: A background task has finished and is ready for review.

Resuming Remote Sessions from Claude.ai:

If you have an active session on the Claude.ai web app (requires signing in with a Claude.ai Subscription), you can resume it inside the extension. Open the dropdown at the top of the Claude panel and select the remote session.

Terminal Mode:

Enabling useTerminal in settings runs Claude in CLI mode inside the integrated terminal, keeping the extension wrapper while using terminal-based interaction.

2.4 Configuration and Plugin Management

The VS Code extension uses two configuration layers:

  1. Extension settings: Defined in VS Code’s settings.json with the claudeCode. prefix.
  2. Claude Code settings (~/.claude/settings.json): Shared between the extension and CLI for allowed commands, environment variables, hooks, and MCP servers.

Complete Extension Settings Reference:

Setting Default Description
selectedModel default Model used for new conversations; override per session with /model
useTerminal false Run in terminal mode instead of the graphical panel
initialPermissionMode default Starting permission mode: default/plan/acceptEdits/auto/bypassPermissions
preferredLocation panel Where Claude opens: sidebar (right sidebar) or panel (new editor tab)
autosave true Automatically save dirty buffers before Claude reads or writes files
useCtrlEnterToSend false Send messages with Ctrl/Cmd+Enter instead of Enter
enableNewConversationShortcut false Enable Cmd/Ctrl+N to start a new conversation
hideOnboarding false Hide the onboarding walkthrough
respectGitIgnore true Exclude .gitignore entries when searching files
environmentVariables {} Custom environment variables passed to the Claude process
disableLoginPrompt false Skip the login prompt (useful for third-party provider setups)
allowDangerouslySkipPermissions false Expose Auto and Bypass options in the mode switcher (requires Team plan)
claudeProcessWrapper - Path to a wrapper executable used to launch the Claude process (enterprise deployments)

Recommended Configuration Example (settings.json):

1
2
3
4
5
6
7
{
"claudeCode.selectedModel": "claude-sonnet-4-6",
"claudeCode.initialPermissionMode": "plan",
"claudeCode.preferredLocation": "sidebar",
"claudeCode.autosave": true,
"claudeCode.enableNewConversationShortcut": true
}

Plugin Management:

Type /plugins in the prompt box to open the graphical plugin manager. When installing a plugin, choose its scope:

Scope Description
User scope (Install for you) Available across all projects
Project scope (Install for this project) Shared with repository collaborators
Local scope (Install locally) Visible only to you, scoped to the current repository

Switch to the Marketplaces tab to add custom plugin sources via a GitHub repository, URL, or local path.

2.5 Git Integration and Advanced Features

Git Integration:

Ask Claude directly in the conversation to commit changes, open PRs, or work across branches. Claude detects the current git status and active branch automatically.

Parallel Work with Git Worktrees:

Use --worktree (-w) to launch Claude in an isolated worktree so multiple instances never step on each other:

1
2
3
4
5
6
7
8
9
10
# Develop an auth feature in an isolated worktree
claude --worktree feature-auth
# Or shorthand
claude -w feature-auth

# Terminal 1: fix a bug on the main branch
claude

# Terminal 2: build a payment feature in a new worktree
claude -w feature-payment

Chrome Browser Integration:

With the Claude in Chrome extension (1.0.36+) installed, mention @browser in a prompt to drive the browser:

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

Claude opens a browser tab sharing your existing login state, allowing it to test authenticated pages directly.

URI Handler:

The extension registers the vscode://anthropic.claude-code/open URI scheme so external tools can launch a Claude Code tab:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# macOS
open "vscode://anthropic.claude-code/open"

# Linux
xdg-open "vscode://anthropic.claude-code/open"

# Windows
start "vscode://anthropic.claude-code/open"

# With a prompt parameter (URL-encoded)
vscode://anthropic.claude-code/open?prompt=review%20my%20changes

# Resume a specific session
vscode://anthropic.claude-code/open?session=abc123

Built-in IDE MCP Server:

While active, the extension starts a local MCP server exposing two tools:

Tool Capability Modifies Files
getDiagnostics Reads errors and warnings from the VS Code Problems panel No
executeCode Executes code inside a Jupyter notebook kernel (prompts every time) Yes

Security design details: the server binds to a random ephemeral port on 127.0.0.1 (unreachable from outside the host), generates a fresh random authentication token on every activation, and stores the token file with 0600 permissions readable only by the current user.

CLI vs. Extension Feature Comparison:

Feature CLI VS Code Extension
Commands & Skills All Subset (type / to inspect)
MCP Server Configuration Full Partial (add via CLI, manage via /mcp)
Checkpoints Supported Supported
! Bash Shortcut Supported Not supported
Tab Completion Supported Not supported
Graphical Diff View Not supported Supported
Visual @-Mentions Not supported Supported

Clean Uninstall:

To wipe all local extension data after uninstalling:

1
rm -rf ~/.vscode/globalStorage/anthropic.claude-code

3. Field Notes from hippo

💬 hippo: Here are the pitfalls I ran into during day-to-day use:

3.1 Pitfalls I Ran Into

Pitfall 1: The Spark Icon Was Missing

Right after installing the extension, I could not find the Claude Spark icon in the top-right corner of the editor and assumed the installation had failed.

Root cause: The Spark icon only appears in the editor toolbar once a file is open. Opening a folder is not enough—you have to open an actual code file.

Pitfall 2: Unclear Approval Flow in Plan Mode

The first time I used Plan mode, Claude wrote out a plan, and I had no idea where the approve button was.

Root cause: VS Code opens the plan automatically as a full Markdown document. You can leave inline comments directly inside that document to give feedback, then click approve to execute.

3.2 How I Fixed Them

5-Step Spark Icon Checklist:

  1. Open an actual code file (not just a workspace folder).
  2. Confirm your VS Code version is >= 1.98.0.
  3. Run Developer: Reload Window from the Command Palette.
  4. Check for extension conflicts (temporarily disable other AI extensions to isolate).
  5. Make sure the workspace is not in Restricted Mode (untrusted workspaces restrict extension capabilities).

Recommended Panel Layout:

I dock Claude in the Secondary Side Bar (the second column on the right) so it stays visible while I code. When I need a second thread, I hit Cmd+Shift+Esc to open another conversation in an editor tab—one for writing code, one for review, with zero interference.

Permission Mode Strategy:

  • Starting out: Use Plan mode to inspect everything Claude intends to change before approving.
  • Once comfortable: Switch to Auto-accept to cut down on confirmation clicks.
  • Sensitive repositories: Stick to Normal mode and gate every step manually.

Pairing the CLI with the Extension:

Some advanced operations still require the CLI. My workflow is to run claude mcp add in the integrated terminal to register an MCP server, then use /mcp inside the extension to inspect and manage it:

1
2
3
4
# Add an MCP server from the terminal
claude mcp add --transport http github https://api.githubcopilot.com/mcp/

# Then inspect it in the extension with /mcp

3.3 Practical Tips

  1. Security and Privacy: In Auto mode, Claude can edit configuration files such as settings.json. Keep Normal or Plan mode enabled in untrusted or Restricted Mode workspaces to prevent unintended edits to sensitive settings.

  2. Scope Context with @-Mentions: Pointing Claude directly to specific files or line ranges is faster and more accurate than making it search the whole repo. Use Option+K / Alt+K to insert file and line references quickly.

  3. Search Conversation History: The dropdown at the top of the Claude panel supports keyword search across past conversations—much faster than re-explaining requirements from scratch.


4. FAQ

Q: What if the Spark icon does not show up?

A: Check in order: 1) open a code file; 2) verify VS Code is >= 1.98.0; 3) run Developer: Reload Window; 4) disable potentially conflicting AI extensions; 5) check whether the workspace is in Restricted Mode. Alternatively, click “✱ Claude Code” in the bottom-right status bar.

Q: What if Claude Code stops responding?

A: Run through three checks: 1) verify your network connection can reach the API; 2) try starting a fresh conversation; 3) run claude in the terminal to verify the CLI still works. If the CLI works but the extension does not, update or reinstall the extension.

Q: Do the extension and CLI share conversation history?

A: Yes—they read from the same history store. Running claude --resume in the terminal picks up a session started in the extension, and the dropdown at the top of the extension panel also lists conversations created from the CLI.

Q: Can the extension edit code automatically?

A: Yes. Set initialPermissionMode to acceptEdits or auto so Claude applies edits without asking. Keep in mind that auto mode also permits edits to files like settings.json, so test it on non-sensitive repositories first.

Q: How do I configure MCP servers in the extension?

A: Add the server from the CLI—for example, claude mcp add --transport http github https://api.githubcopilot.com/mcp/—then run /mcp inside the extension to inspect and manage configured servers.

Q: Does uninstalling the extension remove local data?

A: No. Local data lives under ~/.vscode/globalStorage/anthropic.claude-code and is not deleted automatically on uninstall. Remove that directory manually if you want a clean slate.


5. Summary

The VS Code extension is the recommended way to use Claude Code: inline diffs make changes easy to audit, Plan mode keeps AI-assisted edits predictable, and @-mentions deliver surgical context. Commit three shortcuts to memory: Cmd+Esc to toggle focus, Option+K to insert file references, and Cmd+Shift+Esc to open a new conversation tab. Treat the CLI and extension as complements—use the CLI for advanced configuration and the extension for daily coding.


Series Navigation


Based on the official Use Claude Code in VS Code documentation.

Last updated: 2026-03-31