Skip to content

Cascade run_command Tool Uses Incorrect Working Directory on macOS #238

@capncrockett

Description

@capncrockett

Description

When Cascade uses the run_command tool on macOS, it attempts to execute the command in an incorrect and non-existent directory (/Users/<INCORRECT_USER>/) instead of the correct project workspace (/path/to/project/).

This causes all terminal commands initiated by Cascade to hang and fail, preventing any server from being started or any other shell command from being run.

Environment

  • OS: macOS (darwin)
  • Windsurf Version: 1.12.2
  • User: <USERNAME>

Steps to Reproduce

  1. In a project on macOS, ask Cascade to execute any terminal command (e.g., ls, echo 'test')
  2. Observe that the command appears to hang and never completes.
  3. Inspect the windsurf-diagnostics.txt file.
  4. Note the log entries confirming that the command was attempted in the wrong directory. For example:
    [INFO]: [Terminal] Command started: cd /Users/<INCORRECT_USER>/ pid 5404
    

Expected Behavior

The run_command tool should execute in the correct current working directory (Cwd) specified in the tool call, which is the project's root.

Actual Behavior

The command attempts to execute in a hardcoded or incorrectly resolved path, causing it to fail.

Additional Information

  • This issue was discovered while diagnosing why Cascade could not run server commands. The user can run the same commands successfully from the integrated terminal, but any command run by Cascade fails due to the incorrect path.
  • The issue persists after disabling the user's VPN.
  • The diagnostic logs clearly show the wrong directory being used.

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