Terminal Command Execution Hangs on Complex Commands

Bug Report: Terminal Command Execution Hangs on Complex Commands

Title: Terminal Command Execution Hangs on Complex Commands While Simple Commands Work Fine

Description:
When executing terminal commands through run_terminal_cmd, the assistant gets stuck in a waiting state specifically for complex commands (like package installations, long-running processes), while simple commands (like ls, pwd) execute successfully.

Steps to Reproduce:

  1. Execute a complex command (e.g., pip install -r requirements.txt)
  2. Observe the command starting to execute in the chat
  3. Notice the assistant hanging in a waiting state
  4. The command output is partially visible but never completes

Expected Behavior:

  • Command should execute completely
  • Results should be returned to the assistant
  • Assistant should continue normal operation

Actual Behavior:

  • Command starts executing
  • Assistant hangs in waiting state
  • No completion or error message is received
  • Session remains in suspended state

Workaround:
The issue can be temporarily resolved by user interaction:

  1. Clicking the “popout” button in the chat
  2. Clicking the “cancel” button
  3. Clicking the “focus” button

Additional Notes:

  • Simple commands (e.g., ls, pwd, echo) execute normally
  • Complex commands that typically hang:
    • Package installations (pip install)
    • Long-running processes
    • Commands with significant output
    • Commands requiring user interaction

Environment:

  • Shell: /bin/bash
  • Workspace: vscode-remote://ssh-remote… | Ubuntu 24.04.1 LTS (Noble Numbat)
    Version: 0.48.6 (user setup)
    VSCode Version: 1.96.2
    Commit: 1649e229afdef8fd1d18ea173f063563f1e722e0
    Date: 2025-03-31T05:21:50.407Z
    Electron: 34.3.4
    Chromium: 132.0.6834.210
    Node.js: 20.18.3
    V8: 13.2.152.41-electron.0
    OS: Windows_NT x64 10.0.26100

Thanks!

1 Like

I can confirm the same issue. Running inside WSL on Windows 11 and has been happening the last four or so major builds.

I can confirm the command actually executes, however until you click “Popout Terminal” the agent doesn’t seem to see the results, and the results aren’t visible in the Agent window.

It doesn’t happen all the time and the agent remains suspended until you popout or cancel.

same

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.