Feature request: `claude-vscode.sendMessage` command for programmatic input to panel sessions

Resolved 💬 3 comments Opened Feb 23, 2026 by WTHfloyd Closed Feb 23, 2026

Summary

Requesting a new VS Code command claude-vscode.sendMessage that accepts a text string and submits it as user input to the active Claude Code panel session.

Motivation

We run a multi-agent setup where multiple Claude Code sessions communicate via a shared bridge file. A VS Code extension watches the bridge file and delivers messages to the appropriate Claude session.

For tmux-backed terminal sessions, this works well: we inject keystrokes via tmux send-keys -t <session> -l "message" followed by Enter. Messages arrive reliably with zero focus steal.

For panel sessions (opened via the sparkle icon), there is no equivalent. The extension exposes:

  • claude-vscode.focus -- focuses the input field
  • claude-vscode.blur -- blurs the input field

But there is no command to actually submit text to the panel. Focusing the input and then injecting keystrokes via VS Code's workbench.action.terminal.sendSequence or similar does not work because the panel is not a terminal -- it is a webview with a contenteditable input that does not respond to standard keystroke injection APIs.

Proposed API

vscode.commands.executeCommand('claude-vscode.sendMessage', 'your message text here');

This would:

  1. Set the text content of the panel's input field
  2. Submit it as if the user had typed it and pressed Enter

An optional second parameter for the session/panel ID would be useful if multiple panels are supported in the future.

Use Cases

  • Multi-agent orchestration: VS Code extensions routing messages between Claude sessions, Codex, and other agents
  • Automated workflows: Triggering Claude with programmatic input from other extensions or scripts
  • Testing and CI: Sending predefined prompts to Claude panel sessions

Current Workaround

We use tmux-backed terminal sessions (claude --resume inside tmux) instead of the panel UI. This works for message delivery but loses the panel's nicer UI (markdown rendering, file diffs, etc.).

Environment

  • VS Code (Remote WSL2)
  • Claude Code extension (latest)
  • Linux (WSL2)

View original on GitHub ↗

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