continuedev / continuedev/continue
VsCodeIde.runCommand() doesn't execute commands in remote terminals
@RomneyDa is already working on this.
Since Feb 15, 2026.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description
VsCodeIde.runCommand() in extensions/vscode/src/VsCodeIde.ts has two bugs that prevent it from executing commands in remote environments (SSH, Dev Container, Codespaces, etc.):
Bug 1: sendText(command, false) — command typed but never executed
terminal.sendText(command, false);
The second parameter of Terminal.sendText() controls whether a newline is appended. false means the command text is typed into the terminal but Enter is never pressed, so the command never executes. Should be true.
Bug 2: createTerminal() creates local terminals from UI-side extensions
When no existing terminal is available to reuse, the code calls:
terminal = vscode.window.createTerminal(options?.terminalName);
With extensionKind: ["ui", "workspace"], the extension host runs on the local machine. createTerminal() from the local extension host creates a local terminal, not a remote one. For SSH/DevContainer connections, this means the terminal opens on the wrong machine.
Impact
These bugs were latent because the terminal tool's primary code path used childProcess.spawn() for most remote types (via ENABLED_FOR_REMOTES). Draft PR #10538 proposes restricting childProcess.spawn to local-only environments (since it also runs on the wrong machine for remotes), which routes all remote terminal commands through runCommand() — exposing both bugs.
Other callers of runCommand (Ollama/Lemonade helpers, legacy /cmd slash command) are also affected.
Observed behavior
Tested with SSH loopback on Linux. Terminal panel shows empty — command is not executed in the remote terminal.
Proposed fix
- Change
sendText(command, false)tosendText(command, true) - Replace
createTerminal()withworkbench.action.terminal.new(a VS Code built-in command that is remote-aware) +onDidOpenTerminalevent to get the terminal reference
Related
- Draft PR #10538 — restricts
childProcess.spawnto local-only (exposes this bug) - Issue #10462 — terminal tool fails on SSH remotes (upstream symptom)
- Issue #10007 — terminal tool fails on remote environments
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.