Feature: Programmatic tab spawning from CLI / extension API

Resolved 💬 3 comments Opened Mar 18, 2026 by mdileocytra Closed Apr 23, 2026

Summary

When using Claude Code in VS Code, there's no way to programmatically open new chat tabs with pre-filled prompts. The only way to create a new tab is Ctrl+Alt+N (manual keyboard shortcut).

Use Case

Power users build dispatch/delegation workflows where a "parent" Claude Code tab generates self-contained prompts for parallel work, and the user opens N new tabs and pastes each prompt. This works, but the copy-paste loop is friction:

  1. Copy prompt from parent tab
  2. Ctrl+Alt+N to open new tab
  3. Paste prompt
  4. Hit Enter
  5. Repeat for each task

With 5-6 parallel tasks this takes a minute of manual effort that could be zero.

Proposed Solution

Any of these would solve it:

Option A: CLI command

claude --new-tab "Your prompt here"
claude --new-tab --file prompt.md

When Claude Code VS Code extension is running, this tells it to open a new chat tab with the given prompt already submitted.

Option B: VS Code command

Expose a VS Code command (e.g., claude-code.newChatWithPrompt) that can be invoked via:

  • code --command claude-code.newChatWithPrompt --args "prompt"
  • VS Code's command palette
  • Other extensions or keybindings

Option C: Dispatch directory

Watch a directory (e.g., ~/.claude/dispatch/) for prompt files. When a .md file appears, open a new tab and submit it. Delete the file after submission.

Context

  • Running Claude Code as VS Code extension on Windows 11
  • Using a custom /dispatch-tasks skill that generates copy-paste prompts for parallel tabs
  • Typical dispatch: 3-6 independent tasks after a meeting or session handoff
  • The parent tab should stay free for coordination while child tabs execute

Environment

  • Claude Code VS Code extension
  • Windows 11
  • Claude Opus 4.6

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗