-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Copy link
Copy link
Open
Labels
area:completionsStandard shell completions, argument completions, and path completion.Standard shell completions, argument completions, and path completion.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.Terminal input/output, shell integration, prompt behavior, and block rendering.area:sshSSH and remote-session behavior, including tmux-related terminal flows.SSH and remote-session behavior, including tmux-related terminal flows.bugSomething isn't working.Something isn't working.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:completionsStandard shell completions, argument completions, and path completion.Standard shell completions, argument completions, and path completion.area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.Terminal input/output, shell integration, prompt behavior, and block rendering.area:sshSSH and remote-session behavior, including tmux-related terminal flows.SSH and remote-session behavior, including tmux-related terminal flows.bugSomething isn't working.Something isn't working.os:macmacOS-specific behavior, regressions, or requests.macOS-specific behavior, regressions, or requests.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
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:
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
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