Skip to content

Home / Integrations / VS Code

Editor

VS Code

Use Claude Code inside VS Code's integrated terminal for AI-powered coding that reads, edits, and runs your project without leaving the editor.

Setup

  1. 1.
    Install Claude Code globally
    Claude Code runs in any terminal, including the one built into VS Code. Install it via npm so it is available everywhere.
    npm install -g @anthropic-ai/claude-code
  2. 2.
    Open your project in VS Code
    Open the folder you want to work on. Claude Code uses the current working directory to understand your project structure, so make sure the VS Code terminal is in the project root.
    code /path/to/your/project
  3. 3.
    Launch Claude Code from the integrated terminal
    Open VS Code's terminal (Ctrl+`) and type claude. The agent starts in interactive mode and can immediately read and edit the files visible in your editor.
    claude
  4. 4.
    Install the Claude Code VS Code extension (optional)
    Anthropic offers a VS Code extension that adds a sidebar panel for Claude Code, making it easier to chat with the agent while viewing your files side by side.

Features

  • +Runs in VS Code's integrated terminal with full access to your project files
  • +Edits files that instantly update in the editor — no manual refresh needed
  • +Executes terminal commands (tests, builds, linters) from within VS Code
  • +Works alongside any VS Code extension without conflicts
  • +Optional VS Code extension adds a dedicated Claude Code sidebar panel
  • +Supports VS Code's multi-root workspaces for monorepo projects

Use Cases

Side-by-side development

Keep your editor open on one side and Claude Code in the terminal on the other. Ask it to implement features, and watch the files update in real time as it writes code.

Debugging with terminal access

When you hit a bug, ask Claude Code to investigate. It reads your source, runs the failing test, analyzes the output, and applies a fix — all visible in your VS Code terminal.

Rapid prototyping

Describe what you want to build and let Claude Code scaffold components, routes, and tests. Review the generated files in VS Code as they appear, and refine with follow-up prompts.

Why Claude Code works perfectly with VS Code

Claude Code is a terminal-native agent. It does not replace your editor — it complements it. Since VS Code has a powerful integrated terminal, you get the best of both worlds: an AI agent that can read, write, and execute, paired with a full-featured editor for reviewing changes, navigating code, and using your favorite extensions.

When Claude Code edits a file, VS Code detects the change immediately and updates the editor tab. You see diffs in real time, can undo changes with standard editor shortcuts, and your VS Code extensions (ESLint, Prettier, GitLens) continue to work on the modified files.

Recommended VS Code setup

Increasing the terminal scrollback lets you review longer Claude Code sessions. Auto-save on focus change ensures files are saved before Claude Code reads them. Format-on-save keeps your code style consistent after AI edits.

Using the VS Code extension

The official Claude Code VS Code extension adds a dedicated sidebar where you can chat with the agent without switching to the terminal. It shows file diffs inline, lets you accept or reject individual changes, and maintains conversation history across sessions. The extension communicates with the same Claude Code process, so your CLAUDE.md settings and MCP servers still apply.

Does Claude Code conflict with other AI extensions like GitHub Copilot?+
No. Claude Code runs in the terminal and does not provide inline completions. You can use Copilot for autocomplete and Claude Code for larger tasks like refactors, bug fixes, and feature implementation at the same time.
Can Claude Code access files outside the VS Code workspace?+
Claude Code can access any file your terminal user has permission to read. However, it defaults to working within the current directory. If you need cross-project access, open a multi-root workspace or navigate to the relevant directory.
Does the VS Code extension require a separate subscription?+
No. The extension is free and connects to the same Claude Code installation. You still need an Anthropic API key or a Max subscription to use Claude Code itself.

Related tools

Claude CodeCursorCline

Related terms

البرمجة الثنائية بالذكاء الاصطناعينافذة السياقوكيل البرمجة

Master Claude Code in days, not months

37 hands-on lessons from beginner to CI/CD automation. Module 1 is free.

START FREE →
← ALL INTEGRATIONS