AnswerQA

Should I use the Claude Code VS Code extension or run the CLI in the integrated terminal?

Answer

The VS Code extension adds graphical diffs, a plugin manager, and a Remote tab for cloud sessions. The CLI keeps full tab completion, bash shortcuts, and every command. Run both at once: the extension connects to whatever the CLI starts.

By Kalle Lamminpää Verified May 12, 2026

The VS Code extension is not a different product. It is a graphical layer on top of the same CLI session. If you open a terminal inside VS Code and run claude, the extension panel connects to that session automatically.

Install from the VS Code Marketplace:

code --install-extension anthropic.claude-code

Or search “Claude Code” in the Extensions panel.

What the extension adds

The graphical diff viewer shows proposed edits in VS Code’s built-in diff view. You approve or reject them the same way you would a git merge.

The plugin manager lets you browse and install plugins from the sidebar without typing claude plugin install.

Session history shows previous conversations in a scrollable panel. You can pick up an old thread without --resume.

The Remote tab resumes a claude.ai cloud session from inside VS Code. Requires a Pro, Team, or Enterprise subscription.

The IDE MCP server runs locally and exposes two tools Claude can call:

  • mcp__ide__getDiagnostics: reads the current TypeScript/ESLint errors from VS Code’s language server without Claude having to run tsc in a shell
  • mcp__ide__executeCode: runs a code cell in a Jupyter notebook and returns the output

If you write PreToolUse hooks that match MCP tools, you need mcp__ide__* in your matcher patterns to catch these.

Cursor selection reference: place your cursor on a line range, press Option+K, and VS Code inserts @filename.ts#5-10 into the chat input. No typing paths by hand.

The URI handler opens Claude Code from a browser, runbook, or script:

vscode://anthropic.claude-code/open?prompt=Explain+this+function&cwd=/path/to/repo

The prompt pre-fills but does not auto-send. You review before Claude acts.

What the CLI keeps that the extension does not

FeatureExtensionCLI
! bash shortcutNoYes
Tab completion for pathsNoYes
All slash commandsSubsetFull
MCP config via /mcpNoYes
Plugin install via /pluginNoYes
/resumeNoYes

The ! shortcut and tab completion are terminal features. They do not translate to a panel UI.

Focus toggle

Cmd+Esc (Mac) or Ctrl+Esc (Windows/Linux) toggles focus between the editor and the Claude Code panel without reaching for the mouse.

On macOS Tahoe, Cmd+Esc is reserved for the Game Overlay. Change either the system shortcut or the Claude Code shortcut in Keyboard Shortcuts settings.

Jupyter notebooks

When Claude proposes a code cell edit in a .ipynb file, the extension shows a Quick Pick dialog before executing. This is intentional — notebook execution is side-effecting and irreversible. Confirm or cancel from the Quick Pick.

Footguns

/mcp, /plugin, and /resume are CLI-only. These commands open interactive pickers in the terminal and do not render in the extension panel. If you need to add an MCP server or install a plugin, open a terminal.

The IDE MCP server starts on a random port that changes every session. Do not hardcode it in hook matchers or external scripts. Use the mcp__ide__* name pattern instead.

The Remote tab does not load your local ~/.claude config. That session is a cloud session. Your local ~/.claude/settings.json, hooks, and skills do not apply. Configure them at the workspace level in .claude/settings.json if you need them in cloud sessions.

The Remote tab needs a full-scope login token. If you authenticated via claude setup-token or CLAUDE_CODE_OAUTH_TOKEN, the Remote tab will show “requires full-scope login.” Run claude auth login via the OAuth flow to get the right token scope.

When NOT to use the extension

  • You need /mcp or /plugin workflows. Run the CLI directly.
  • You are on Linux. The extension supports macOS and Windows. Linux users run the CLI.
  • You prefer the terminal diff UI. The extension’s graphical diff is not universally preferred. The CLI text diff is faster to keyboard-navigate for experienced users.
  • You work in a remote container via SSH. Install the extension in the remote host, not the local VS Code instance. Extensions that run in the local window cannot reach the remote filesystem.

Sources

Was this helpful?