Skip to content

Command wrapper emits truncated ltin echo fragments and stray new-window token after SSH session drops, causing repeated command not found errors in zsh #9900

@Xytronix

Description

@Xytronix

Pre-submit Checks

Describe the bug

After an SSH session times out, Warp's command-instrumentation wrapper continues to inject commands into the now-local zsh prompt. The injected commands are malformed in two ways:

The leading bui of builtin echo … is sliced off, producing the literal token ltin echo -n "^^^<id>|||"; ….
The wrapper string contains an unbalanced closing ) and ends with a stray new-window token (apparently the tail of a tmux new-window '' call whose outer framing was stripped).

zsh tries to execute new-window as a standalone binary and prints zsh: command not found: new-window for every emission. The wrapper keeps firing with monotonically increasing internal IDs (observed eight times within ~50 ms).

To reproduce

From Warp on macOS, open an SSH session to a warpified remote host.

Trigger Warp's directory-listing instrumentation by using cd dir.

Allow the connection to idle until the network drops it, or simulate it by turning off WiFi until SSH reports:

Read from remote host IP: Operation timed out
Connection to IP closed.
client_loop: send disconnect: Broken pipe

Expected behavior

When SSH reports Broken pipe / Operation timed out, Warp should detect the dead transport and stop routing remote-targeted instrumentation into the local shell.

A single, clear notice should be shown to the user instead.

Any command Warp does emit must be syntactically complete and correctly quoted; truncating builtin to ltin and leaving an unmatched ) and a bare new-window token is never valid output.

Screenshots, videos, and logs

Read from remote host IP: Operation timed out
Connection to IP closed.
client_loop: send disconnect: Broken pipe
ltin echo -n "^^^1777710953501548|||";  cd /Users/user/bench &&  find . -maxdepth 1 -type d -print0 && printf '"'"'%b'"'"' '"'"'\0'"'"' && find . -maxdepth 1 -not -type d -print0             ; builtin echo "|||$?\$\$\$")|command cat; command sleep 1'
zsh: command not found: new-window
ltin echo -n "^^^1777710953501568|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953501571|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953534481|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953544068|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953544191|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953544823|||"; …
zsh: command not found: new-window
ltin echo -n "^^^1777710953545060|||"; …
zsh: command not found: new-window

Operating system (OS)

macOS

Operating system and version

26.2

Shell Version

zsh 5.9 (arm64-apple-darwin25.0)

Current Warp version

v0.2026.04.27.15.33.preview_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:completionsStandard shell completions, argument completions, and path completion.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.area:sshSSH and remote-session behavior, including tmux-related terminal flows.bugSomething isn't working.os:macmacOS-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions