continuedev / continuedev/continue

VsCodeIde.runCommand() doesn't execute commands in remote terminals

Open
#10,542 11 comments 9 reactions 1 assignee View on GitHub

@RomneyDa is already working on this.

Since Feb 15, 2026.

ide:vscode kind:bug
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
  1. Change sendText(command, false) to sendText(command, true)
  2. Replace createTerminal() with workbench.action.terminal.new (a VS Code built-in command that is remote-aware) + onDidOpenTerminal event to get the terminal reference
Related
  • Draft PR #10538 — restricts childProcess.spawn to 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.