Claude Code

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 on Claude Code

Other guides

Cursor: allow all terminal commandsClaude Code: allow commands without promptsCodex CLI: approval and sandbox modesGemini CLI: YOLO mode, auto_edit and allowing specific shell commandsCursor Privacy Mode: telemetry, training and data retentionClaude Code telemetry and data retention: what is sent and how to turn it offGemini CLI: turn off usage statistics and telemetryCLAUDE.md: where it goes, how it loads, and how it works with AGENTS.mdClaude Code hooks: format on save, block risky edits, get notifiedClaude Code subagents: create one, limit its tools, and call itAdd MCP servers to Cursor with mcp.json: Keep files out of Cursor with .cursorignore: Configure Codex with config.toml: Configure Gemini CLI with settings.json: Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes): Claude Code custom slash commands and skills (SKILL.md): GitHub Copilot custom instructions: Adding MCP servers to GitHub Copilot: Claude Code settings.json: file locations, precedence, and key settingsClaude Code plugins and marketplaces: install, create, and shareGemini CLI extensions and custom commands: Configuring OpenCode with opencode.json: Cline Rules: workspace, global, and conditional rulesKiro steering files: .kiro/steering, inclusion modes, and AGENTS.mdZed agent: instruction files, MCP servers, tool permissions, and ACP agentsCursor CLI: install, headless mode, permissions and CIAider: CONVENTIONS.md, .aider.conf.yml and API keysJunie guidelines, MCP and the Action Allowlist: Amp AGENTS.md, settings.json and MCP: Configure Goose extensions, hints, recipes and permissions: Customize OpenHands with skills, AGENTS.md, setup.sh and MCP: Configure Factory Droid CLI: AGENTS.md, settings.json, autonomy, custom droids and MCPConfigure Qwen Code: settings.json, providers, QWEN.md, MCP and approval modesCursor hooks: hooks.json, beforeShellExecution, afterFileEdit and exit codesCursor sandbox: sandbox.json, network allowlist and run modesCursor settings: settings.json, Cursor Settings and the ~/.cursor config filesCursor browser agent: @browser, browser automation and approval modesCursor subagents: .cursor/agents, frontmatter, built-in Explore, Bash and BrowserCursor telemetry and OpenTelemetry export (Privacy Mode, OTLP, Analytics API): Cursor rules setup: .cursor/rules, .mdc frontmatter, globs, alwaysApply and AGENTS.mdClaude Code headless mode: claude -p, --output-format json, --bare and CI flagsClaude Code statusline: custom status bar in settings.json with context %, cost and git branchClaude Code /model: switch models, aliasesClaude Code /cost and /usage: check token spend, usage limits and reduce costsCodex AGENTS.md: global, project and override instruction files explainedCodex MCP servers: codex mcp add and [mcp_servers] in config.tomlCodex sandbox modes: read-only, workspace-write, danger-full-access and network accesscodex exec: run Codex non-interactively in scripts and CI with JSON outputCodex skills: create SKILL.md, skill folder locations and $skill invocationGEMINI.md in Gemini CLI: context file locations, imports and /memoryGemini CLI MCP servers: gemini mcp add and mcpServers in settings.jsonGemini CLI custom slash commands: TOML files, {{args}}, !{shell} and @{file}Gemini CLI headless mode: gemini -p, JSON output and exit codes for scripts and CIGemini CLI sandbox: enable Docker, Podman, macOS Seatbelt or gVisorcopilot-setup-steps.yml: set up the GitHub Copilot cloudGitHub Copilot CLI permissions: --allow-tool, --deny-tool, --allow-all-tools and trusted directoriesGitHub Copilot custom agents: .github/agents/*.agent.md profiles, tools and frontmatterGitHub Copilot code review settings: automatic PR reviews, rulesets, effort level and approvals

Get the weekly agent stack update

New official MCP servers, spec changes and harness releases, checked against the source. One email a week, no fluff.

Reviewed Oct 13, 2026. Settings change often; the linked vendor docs are the source of truth.