Skip to content

Bug: split-pane launch fails with file not found due to invalid --direction flag for wt.exe #19

@wbreza

Description

@wbreza

Description

When dispatch is configured to open sessions in a terminal pane (launch_mode: pane), the launch fails with:

[error 2147942402 (0x80070002) when launching `down --startingDirectory ...`]
The system cannot find the file specified.

Root Cause

The code passes --direction <value> to wt.exe split-pane, but Windows Terminal's split-pane subcommand does not support a --direction flag. It uses -H (horizontal) and -V (vertical) instead.

Because --direction is unrecognized, Windows Terminal treats the direction value (e.g. down) as the command to execute in the new pane, resulting in a 'file not found' error.

Affected Code

  • launchWindowsSession() in internal/platform/shell.go
  • buildWSLWTArgs() in internal/platform/shell.go

Expected Behavior

Pane direction config values should be translated to the correct wt.exe flags:

  • down / up -> -H (horizontal split)
  • right / left -> -V (vertical split)
  • auto -> no flag (let WT choose)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions