CC-201d · Module 2
VS Code Integration Patterns
4 min read
Claude Code in VS Code is not a replacement for the terminal. It is a complement. The terminal gives you raw power — full context control, MCP management, parallel instances, and hooks. VS Code gives you something the terminal cannot: visual context. You can see the file tree, the editor contents, the terminal output, and the Claude conversation side by side. For certain workflows, that visual context is worth more than the terminal's flexibility.
The integration works through the Claude Code extension, which embeds a Claude panel directly in the VS Code sidebar. It reads the same CLAUDE.md files, respects the same settings.json permissions, and connects to the same MCP servers as the terminal. The key difference is input ergonomics: you can select code in the editor and send it to Claude with a keyboard shortcut. No copy-paste, no file path references, no "read lines 45-80 of src/utils/parser.ts." You highlight, you send, Claude sees exactly what you see.
This selection-based workflow is particularly powerful for code review, refactoring, and debugging. Select a function, ask "what are the edge cases this function does not handle?" Select a test file, ask "what scenarios are missing?" Select an error message in the terminal, ask "what is causing this and how do I fix it?" Each interaction starts from a visual selection that gives Claude precise, unambiguous context.
Do This
- Use VS Code for quick, focused questions about visible code — refactoring, review, debugging
- Use the terminal for multi-file operations, parallel instances, and long sessions
- Set up the same CLAUDE.md and permissions in both environments for consistency
- Use VS Code's inline diff view to review Claude's proposed changes before accepting
Avoid This
- Try to do everything in VS Code — it lacks terminal features like hooks and parallel instances
- Try to do everything in the terminal — visual context matters for UI and code review work
- Maintain different CLAUDE.md files for each environment — keep one source of truth
- Auto-accept changes in VS Code without reviewing the diff — the visual diff is the whole point