How do you use Claude Code inside VS Code?
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.
Cite
CodeLifter 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.- CodeLifter editorsStaffStaff, 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?
- Press
Cmd+Shift+X(Mac) orCtrl+Shift+X(Windows and Linux) to open the Extensions view. - Search for "Claude Code" and click Install. The publisher ID is
anthropic.claude-code. - 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.
- Click Sign in and finish in your browser.
- Type a request in the prompt box, such as "explain what
parseConfigreturns".
If the extension does not appear, run Developer: Reload Window from the Command Palette. If you have
ANTHROPIC_API_KEYset but still see the sign-in screen, VS Code may not have inherited your shell; the docs suggest starting it from a terminal withcode ..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+KorAlt+Kinserts a reference such as@app.ts#5-10A whole file or folder Type @and part of the name;@src/components/(trailing slash) for a folderTerminal output @terminal:name, wherenameis the terminal's titleAn image or file Paste an image; hold Shiftwhile dragging files into the prompt boxTwo filters protect you. In the chat panel, selected text from files matching
files.exclude,search.excludeor your.gitignoreis 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 aReaddeny 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.initialPermissionModetodefaultin 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 --resumein 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 /mcpin the chat panelCheckpoints Yes Yes !Bash shortcutYes No Tab completion Yes No The catch is that "the extension does not add
claudeto 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/ideto 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 orOption+K/Alt+Kto point at code. - Check the mode indicator; Manual shows a diff before every edit.
- The extension does not put
claudeon your PATH; install the CLI to use it in the terminal.
- Press
Write something first.
Give people something to work with: at least 30 words on what happened and what you tried.
That is too long. Keep it under 6,000 characters.
Write the question as the title, 15 to 140 characters, no links.
Pick a category.
Add a name (2 to 40 characters, no links).
That email address does not look right.
That was quick. Read the thread, then try again.
The form expired. Reload the page and post again.
Something went wrong with the form. Reload and try again.
Please complete the check and post again.
Limit reached for now. Try again later.
This thread is closed to new replies.
This thread no longer accepts replies.
Something went wrong with the form. Reload and try again.
Post a reply or question first (name and email), then this browser can vote, edit and accept answers.
You cannot vote on your own post.
Only the author (within 30 days) or the forum team can do that.
That email already has an account. Use your sign-in link instead.
New accounts are paused for the moment. Try again later.
That was already posted.
1 answer
- 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
claudein 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.ClaudeCodeThe README marks
npm install -g @anthropic-ai/claude-codeas 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+`orCmd+`) so it picks up the updated PATH, then runclaude --version. If it is still missing, the VS Code page points to the troubleshooting section on verifying your PATH. Once it works,claude mcp addandclaude --resumerun in any terminal, and the CLI connects to the open VS Code window automatically.