Blog
4 min read

Claude Code in VS Code: Extension vs Terminal, Explained

Claude Code has a VS Code extension with a chat panel, inline diffs and @-mentions, and a terminal CLI with every command. How to install the extension, what each one can do, the PATH gotcha, and when to use which.

If you use VS Code, you have two ways to run Claude Code: the extension, which adds a graphical chat panel to the editor, or the CLI, which runs claude in a terminal. They share the same engine, the same settings and the same conversation history. The difference is the interface — and a handful of features that only one has.

Details below match Anthropic's VS Code documentation as of October 2026.

Installing the extension

You need VS Code 1.94 or later and a paid Claude plan (Pro, Max, Team or Enterprise) or a Claude Console account.

  1. Open the Extensions view: Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac).
  2. Search for Claude Code (publisher: Anthropic) and click Install.
  3. Open the panel from the Spark icon in the editor toolbar or the Command Palette (Ctrl/Cmd+Shift+P → "Claude Code").
  4. Sign in with your Claude account when prompted.

The same extension installs in Cursor and other VS Code forks. If a fork can't install it, use the CLI in that editor's terminal instead.

What the extension gives you

  • A chat panel where you type tasks and watch Claude work, with tool calls you can expand.
  • Inline diffs. Proposed edits appear as a diff in the editor; you can accept or reject changes one at a time.
  • @-mentions. Type @ and a file name to point Claude at it. Select some lines and press Alt+K (Windows/Linux) or Option+K (Mac) to insert a reference like @app.ts#5-10.
  • Your selection, automatically. Highlighted code is sent as context.
  • Plan review. In plan mode, you can read and edit Claude's plan before accepting it.
  • Multiple conversations in separate tabs (Ctrl/Cmd+Shift+Esc opens a new one).
  • Checkpoints. Hover over a message to rewind code, fork the conversation, or both — see Claude Code checkpoints.
  • Graphical plugin and MCP management via /plugins and /mcp in the prompt box.

Ctrl+Esc (Cmd+Esc on Mac) toggles focus between your code and the Claude prompt — the shortcut worth memorising.

What only the CLI has

The extension supports a subset of commands. According to Anthropic's comparison, the CLI has:

  • Every command and skill (the extension shows a subset when you type /).
  • The ! shortcut for running a shell command directly.
  • Tab completion.

It also runs in places the extension can't: over SSH on a remote server, inside tmux, in CI with headless mode.

The PATH gotcha

The extension bundles its own private copy of Claude Code for the chat panel. It does not add claude to your terminal's PATH. If you type claude in VS Code's terminal and get "command not found", that's why.

To use both, install the CLI separately. Once installed, running claude in VS Code's integrated terminal automatically connects to the editor for diff viewing and sharing diagnostics. From an external terminal, run /ide inside Claude Code to connect it to VS Code.

Which should you use?

Use the extension if you're new to Claude Code, you like seeing diffs in the editor, or you want to point at code by selecting it. It's the gentlest starting point.

Use the CLI if you want every feature, you work on remote machines, you run long tasks in tmux, or you script Claude Code.

Use both — they share history, so you can start a conversation in one and continue in the other. If you prefer the CLI's look inside the editor, the extension has a Use Terminal setting that opens Claude in terminal mode instead of the graphical panel.

Common problems

  • The panel doesn't appear after installing: run "Developer: Reload Window" from the Command Palette.
  • It asks you to sign in even though you set ANTHROPIC_API_KEY: VS Code may not have inherited your shell environment. Launch it from a terminal with code ., or sign in with your Claude account instead.
  • Claude can't see a file you selected: the extension withholds selected text from files matched by your files.exclude/search.exclude settings and from git-ignored files.

The summary

  • The extension adds a chat panel, inline diffs, @-mentions and checkpoints to VS Code and its forks.
  • The CLI has every command, ! shortcuts, and runs anywhere — including remote servers.
  • Installing the extension doesn't install the claude command; install the CLI too if you want both.

EasySpawn servers are reachable over SSH, so you can open your project in VS Code's Remote SSH and run Claude Code on the server — where the app, database and long-running tasks live. See how it works or join the waitlist.

Related: VS Code for Beginners · How to Install Claude Code · VS Code Remote SSH · Claude Code Slash Commands

Keep reading