Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Claude Code StartupNew to Visual Studio Code? Get it now.
Claude Code Startup

Claude Code Startup

John Necir Rebellion

|
1 install
| (0) | Free
Replaces the VS Code Welcome tab by opening a Claude Code session on startup.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Code Startup

Replaces the built-in VS Code Welcome tab with a Claude Code session on startup.

On each window start it:

  1. Sets workbench.startupEditor to none (so the Welcome tab stops opening) — gated by claudeStartup.replaceWelcome. The first time this happens you'll get a one-time notification (it's a global VS Code setting, so it's worth flagging visibly, not just logging).
  2. Invokes a command from the installed Claude Code extension (anthropic.claude-code) to open a session.

Settings

Setting Default Meaning
claudeStartup.mode primaryEditor primaryEditor → Open in Primary Editor, recent → Open (last session), new → New Conversation.
claudeStartup.replaceWelcome true Set workbench.startupEditor to none.
claudeStartup.autoLaunch true Launch automatically on window start. Disable to only use the palette command.
claudeStartup.skipIfSessionOpen true On startup, don't open a session if one is already open in the window. The manual command always opens regardless.

Manual command

Claude Startup: Launch Session (claudeStartup.launch) — fires the same launch on demand.

Build

npm install
npm run compile
npx @vscode/vsce package --allow-missing-repository
code-insiders --install-extension claude-code-startup-0.0.1.vsix

Requires the anthropic.claude-code extension (declared as an extensionDependency).

How it works (for anyone continuing this project)

Everything lives in one file: src/extension.ts. No build system beyond tsc, no framework, no external runtime dependencies — just the vscode API types. That's deliberate, so the whole extension can be read top to bottom in a few minutes:

  • activate() — VS Code calls this on startup. It registers the manual command, kicks off the one-time Welcome-tab suppression, and (if autoLaunch is on) starts a launch.
  • launch() / runLaunch() — launch() is just a lock (launchInFlight) wrapped around runLaunch(), so the auto-launch path and a manually-triggered "Retry" can never run at the same time and open two sessions.
  • waitForAnyCommand() — the Claude Code extension registers its commands asynchronously, so this polls vscode.commands.getCommands() a few times (with a short sleep between attempts) until one of our candidate command IDs shows up, or gives up.
  • FALLBACKS — per-mode list of command IDs to try, most-specific first. If your preferred mode's command isn't available, the next one in its list is tried instead.
  • isClaudeSessionOpen() — scans the window's tabs for a Claude Code webview so the startup path can skip reopening when a session is already there. Matches any webview whose viewType mentions "claude" (VS Code prefixes these), so it survives the Claude extension renaming its panels.
  • ensureWelcomeSuppressed() — reads/writes the global workbench.startupEditor setting exactly once (skips if already "none"), and tells the user about it with a dismissible notification.

Notes

  • Reloading a window re-fires the launch (a reload is a fresh activation). This is intentional — reload reopens your session.
  • If the Claude Code extension's commands never appear (not installed / logged out), a warning with a Retry button is shown instead of failing silently. Logs go to the Claude Startup output channel.
  • The commands this extension calls (claude-vscode.primaryEditor.open, claude-vscode.editor.openLast, claude-vscode.newConversation) belong to the separate Anthropic Claude Code extension, not this one. If a future version of that extension renames or removes them, update MODE_COMMAND / FALLBACKS in src/extension.ts — check the installed extension's package.json contributes.commands list for current IDs.

Contributing

Issues and PRs welcome. This is a small, single-purpose extension — keep changes focused and prefer editing src/extension.ts directly over adding new files unless a change genuinely needs one (see file-organization guidance: many small focused files over few large ones, but this extension is intentionally small enough to stay as one).

License

MIT — see LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft