Feature request: VS Code terminal integration tool to send commands to integrated terminal
Summary
Add a tool that allows Claude Code to send commands to the user's VS Code integrated terminal session.
Use Case
When Claude Code runs git checkout <branch>, the branch switch happens in Claude's shell context. However, the user's VS Code integrated terminal is a separate shell session and still shows the old branch in its prompt.
This creates confusion because:
- Claude reports "Switched to branch X"
- User's terminal prompt still shows branch Y
- User has to manually run
git checkout Xin their terminal to sync
Proposed Solution
Add a VS Code terminal tool that calls vscode.window.activeTerminal.sendText() to execute commands in the user's terminal session.
Example API:
Tool: VSCodeTerminal
Parameters:
- command: string (the command to execute)
- execute: boolean (whether to press Enter after sending, default true)
Benefits
- Seamless branch switching during PR reviews
- Terminal stays in sync with Claude's operations
- Better UX for any workflow involving directory/branch changes
Workaround (Current)
We've documented in our skills to inform users they need to manually run the git command in their terminal, but this is friction that could be eliminated.
Additional Context
This would be particularly valuable for:
- PR review workflows (switching to PR branch)
- Multi-repo operations
- Any skill that changes git state
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗