Skip to content

Bug: Model unable to successfully execute terminal commands. #307

@TimChinye

Description

@TimChinye

Bug Report: cmd initialization race condition

Bug Description

Whenever the model tries to execute terminal commands, the command is consistently injected before the shell has finished initializing. This causes commands to be effectively lost - they appear in the UI output before the Windows version header, indicating they were sent while the terminal was still starting up. The model we'll realise that nothing happened, it'll try a couple more times, and eventually attempt to gaslight the user saying it worked when it evidently didn't.

Steps to Reproduce

  1. Open a project in Windsurf on Windows.
  2. Get Cascade to run any command (e.g., "Run node -v").
  3. Observe the terminal's output order.

Expected Behavior

Commands should wait for the terminal prompt to be ready before being sent:

Microsoft Windows [Version 10.0.xxxxx.xxxx]
(c) Microsoft Corporation. All rights reserved.

c:\path> node -v
v20.x.x

c:\path>

Actual Behavior

The command appears in the output before the Windows version header:

node -v

Microsoft Windows [Version 10.0.26200.8037]
(c) Microsoft Corporation. All rights reserved.

c:\path>

No actual output is captured because it was sent too early.

Environment

  • OS: Windows 11
  • Shell: cmd
  • Windsurf version: Latest (installed two days ago)
  • Models: Kimi K2.5 and SWE-2.5 (bug appears to be model-agnostic)

Screenshot

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions