Claude Code VS Code extension: install, shortcuts, settings and /ide (works in Cursor too)
How do I install and use Claude Code in VS Code?
Open the Extensions view (Cmd+Shift+X or Ctrl+Shift+X), search for Claude Code, and click Install. It needs VS Code 1.94.0 or later and any paid Claude plan or a Claude Console account. If you prefer the terminal, run claude in VS Code's integrated terminal, or run /ide from an external terminal to connect it.
Install
- Requires VS Code 1.94.0 or later
- Sign in with a Pro, Max, Team or Enterprise subscription, or a Claude Console account. No API key is required
- The same extension installs in Cursor
- Or install from the VS Code Marketplace listing anthropic.claude-code
Installing the extension does not put claude on your shell PATH. For the terminal CLI, do the standalone install once.
Keyboard shortcuts
- Cmd+Esc / Ctrl+Esc: toggle focus between the editor and Claude
- Cmd+Shift+Esc / Ctrl+Shift+Esc: open a new conversation as an editor tab
- Option+K / Alt+K: insert an @-mention of the current file and selection, for example @app.ts#5-10
- Cmd+Shift+T / Ctrl+Shift+T: reopen the last closed Claude session tab
- Cmd+N / Ctrl+N: new conversation, only with enableNewConversationShortcut set to true
On macOS Tahoe and later, the system Game Overlay shortcut grabs Cmd+Esc. Rebind Claude Code: Focus input in the Keyboard Shortcuts editor (Cmd+K Cmd+S) if it does nothing.
Give Claude context
Type @ followed by a file or folder name to add it. Fuzzy matching works. Claude also sees your selected text and the file you have open. Turn off the Attach Open File setting to send only the selection.
Key extension settings
Open settings with Cmd+, or Ctrl+, and go to Extensions, then Claude Code.
- claudeCode.useTerminal (default false): launch Claude in terminal mode instead of the graphical panel
- claudeCode.initialPermissionMode: default, plan, acceptEdits or bypassPermissions for new conversations. Read from user settings only
- claudeCode.useCtrlEnterToSend (default false): send with Ctrl/Cmd+Enter instead of Enter
- claudeCode.enableNewConversationShortcut (default false)
VS Code settings.json
{
"claudeCode.useTerminal": false,
"claudeCode.initialPermissionMode": "plan"
}Use the CLI with VS Code
Open the integrated terminal (Ctrl+` or Cmd+`) and run claude. The CLI integrates with the IDE for diff viewing and diagnostics. From an external terminal, run /ide inside Claude Code to connect it to VS Code.
Inside Claude Code in an external terminal
/ide
Stop the extension from reinstalling
Running claude in a VS Code integrated terminal reinstalls the extension automatically. To prevent that, turn off Auto-install IDE extension in /config, set autoInstallIdeExtension to false, or set the environment variable below.
Shell
export CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1
Sources
More Claude Code guides
- How to allow Claude Code to run all commands: permission modes, allow rules and skip permissions
- Claude Code permissions: allow, ask and deny rules, rule syntax and allowed tools
- Claude Code telemetry and data retention: what is sent and how to turn it off
- CLAUDE.md: where it goes, how it loads, and how it works with AGENTS.md
- Claude Code hooks: all events, exit codes, PreToolUse and PermissionRequest JSON, examples
- Claude Code subagents: create one, limit its tools, and call it
- Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes)
- Claude Code custom slash commands and skills (SKILL.md)
- Claude Code settings.json: file locations, precedence, and key settings
- Claude Code plugins and marketplaces: install, create, and share
- Claude Code headless mode: claude -p, --output-format json, --bare and CI flags
- Claude Code statusline: custom status bar in settings.json with context %, cost and git branch
- Claude Code /model: switch models, aliases (opus, sonnet, haiku, opusplan), ANTHROPIC_MODEL and effort
- Claude Code /cost and /usage: check token spend, usage limits and reduce costs
- MCP 2026-07-28 Migration Guide: Stateless Protocol, No Sessions, server/discover, MRTR, and SDK v2 Upgrade
- Subagents and Custom Agents Compared: Claude Code vs Codex vs Cursor vs Gemini CLI vs GitHub Copilot (2026)
- Allow all commands in any AI coding agent: Cursor, Claude Code, Codex, Gemini CLI, Copilot CLI and 7 more (2026)
- How to deploy a remote MCP server (Streamable HTTP): Cloudflare Workers, Vercel, Railway and more (2026)
- Claude Code sandbox: /sandbox, sandbox.enabled, allowedDomains, excludedCommands and strict mode
Reviewed Oct 18, 2026. Settings change often; the linked vendor docs are the source of truth.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →