Skip to content
CodeLifter
Search/ Browse prompts
CodeLifter Forum

How do you use Claude Code inside VS Code?

Staff answerWritten by CodeLifter editors · MCP and tools1 replyupdated

Short answer

To use Claude Code inside VS Code, install the Claude Code extension from the Extensions view, open its panel with the Spark icon, and sign in with a paid Claude plan or a Claude Console account. It gives you a chat panel with inline diffs. To run the claude command in VS Code's terminal as well, install the CLI separately.

Written by CodeLifter editors · Staff, CodeLifter ·
CiteCodeLifter Forum, "How do you use Claude Code inside VS Code?", https://codelifter.com/forum/posts/how-do-you-use-claude-code-inside-vs-code/, accessed 2026-11-14.
  1. Staff, CodeLifter ·

    What do you need before you install it?

    Claude Code is Anthropic's coding agent: it reads your project, edits files and runs commands. Anthropic's VS Code page, read on 16 October 2026, lists two prerequisites: VS Code 1.94.0 or later, and an Anthropic account, where "any paid Claude subscription (Pro, Max, Team, or Enterprise) or a Claude Console account works, and no API key is required." The Console is Anthropic's pay-per-use developer account. Amazon Bedrock and Google Cloud users follow a separate third-party provider setup on the same page.

    The extension's version number is the Claude Code version it bundles, so a feature that "requires Claude Code v2.1.286 or later" needs extension 2.1.286 or later. If you have not installed Claude Code anywhere yet, the install and setup thread covers accounts and the terminal install.

    How do you install and open it?

    1. Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows and Linux) to open the Extensions view.
    2. Search for "Claude Code" and click Install. The publisher ID is anthropic.claude-code.
    3. Open a file, then click the Spark icon in the editor toolbar at the top right. The docs note the icon "only appears when you have a file open"; the Activity Bar icon, the Command Palette ("Claude Code: Open in New Tab") and the Claude Code item in the status bar also work.
    4. Click Sign in and finish in your browser.
    5. Type a request in the prompt box, such as "explain what parseConfig returns".

    If the extension does not appear, run Developer: Reload Window from the Command Palette. If you have ANTHROPIC_API_KEY set but still see the sign-in screen, VS Code may not have inherited your shell; the docs suggest starting it from a terminal with code ..

    Forks of VS Code can install the same extension. The page lists Cursor, and says other forks can install it from the Open VSX registry. How Cursor itself differs from VS Code is covered in the Cursor thread.

    How do you give it the right context?

    Context here means the text the model sees with your request. The extension adds some automatically and lets you add more:

    What you want it to see How
    Lines you selected Nothing to do; Claude sees the selection. Option+K or Alt+K inserts a reference such as @app.ts#5-10
    A whole file or folder Type @ and part of the name; @src/components/ (trailing slash) for a folder
    Terminal output @terminal:name, where name is the terminal's title
    An image or file Paste an image; hold Shift while dragging files into the prompt box

    Two filters protect you. In the chat panel, selected text from files matching files.exclude, search.exclude or your .gitignore is withheld, so Claude gets at most the path. The page warns that this "covers the chat panel only"; in the integrated terminal the CLI sends your selection whatever the file, so use a Read deny rule for files such as .env. The extension also tells Claude which file is open; turn off the Attach Open File setting if you want only your selection sent.

    How do you review what it changes?

    The mode indicator at the bottom of the prompt box decides how much Claude does without asking:

    Mode What happens
    Manual Claude "asks permission before file edits and most shell commands" and shows a side-by-side diff
    Plan Claude describes what it will do and waits; VS Code opens the plan as a Markdown document you can comment on
    Edit automatically Claude makes edits without asking
    Auto A classifier reviews most actions instead of you; the built-in starting mode from Claude Code v2.1.283

    In a diff you can accept or reject one change at a time with Accept this change and Reject this change (v2.1.275 or later). If something goes wrong later, hover over an earlier message and use the rewind button: you can fork the conversation, rewind the code, or both. To start every conversation in Manual mode, set claudeCode.initialPermissionMode to default in your user settings; the docs say VS Code "ignores workspace values" for this one.

    Should you use the extension or the CLI in the terminal?

    Both work and they share conversation history: claude --resume in the terminal picks up an extension conversation. The docs compare them:

    Feature CLI Extension
    Commands and skills All A subset (type / to see them)
    MCP server setup Yes Yes, with /mcp in the chat panel
    Checkpoints Yes Yes
    ! Bash shortcut Yes No
    Tab completion Yes No

    The catch is that "the extension does not add claude to your PATH." It bundles a private copy for the panel, so the terminal needs the standalone install. Run from VS Code's integrated terminal, the CLI connects to the editor for diffs and diagnostics on its own; from an external terminal, type /ide to connect it. Skills you add work in both, with the same folders; see the skills thread. Other agents with VS Code extensions are compared in the CodeLifter agents directory.

    Short version

    • Install "Claude Code" from the Extensions view; you need VS Code 1.94.0+ and a paid Claude plan or Console account.
    • Open it with the Spark icon, sign in, and use @ mentions or Option+K / Alt+K to point at code.
    • Check the mode indicator; Manual shows a diff before every edit.
    • The extension does not put claude on your PATH; install the CLI to use it in the terminal.
    0
    ReplyLink

Plain text or simple Markdown. Links are nofollow. Your email is never shown.

  1. CodeLifter editorsStaffStaff, CodeLifter ·

    Why is the claude command not found in the VS Code terminal? Because installing the extension does not install the command. Anthropic's VS Code page says the extension "bundles a private copy of the CLI for its chat panel, but typing claude in a terminal requires the standalone CLI install." The fix is to run that install once. The Claude Code README, read on 16 October 2026, lists the recommended methods:

    # macOS or Linux
    curl -fsSL https://claude.ai/install.sh | bash
    # Homebrew
    brew install --cask claude-code
    # Windows PowerShell
    irm https://claude.ai/install.ps1 | iex
    # WinGet
    winget install Anthropic.ClaudeCode
    

    The README marks npm install -g @anthropic-ai/claude-code as deprecated. As with any script you pipe into a shell, open the URL first and read what it does. After installing, open a new integrated terminal (Ctrl+` or Cmd+`) so it picks up the updated PATH, then run claude --version. If it is still missing, the VS Code page points to the troubleshooting section on verifying your PATH. Once it works, claude mcp add and claude --resume run in any terminal, and the CLI connects to the open VS Code window automatically.

CodeLifter Forum. Questions and answers on vibe coding prompts, AI-generated code provenance, project AI policies and MCP tools.