Invisible symbols added to commands after loss of SSH connection

Open
#4,645 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
bash, macos, rust

Research direction

Reproduce the failure by disabling the SSH Wrapper, connecting with ssh user@host, and breaking the network connection; inspect the terminal behavior after client_loop: send disconnect: Broken pipe. Verify that subsequent commands in the same tab no longer contain the invisible 00~ and 01~ characters and execute normally.

Written by the indexing model from the issue text.

Description

area:ssh bug ready-to-implement triaged
Discord username (optional)

No response

Describe the bug

NOTE: I have SSH Wrapper disabled, since it's not working for me correctly.

When my SSH connection is lost due to a network issue or me leaving my laptop for a long time, my cursor is back in the Terminal fully responsive, with the following message above it:

[user@host]/afs/.../folder% client_loop: send disconnect: Broken pipe

The problem is that all the commands I type afterwards in this tab get enclosed into invisible characters 00~ and 01~, such that if I type a command ls the Terminal's response is bash: 00~ls01~: command not found.

Typing in the command
Screenshot 2024-03-27 at 09 25 41

Result of the command
Screenshot 2024-03-27 at 09 25 47

To reproduce
  1. Disable SSH Wrapper
  2. Connect to another host via SSH: ssh user@host
  3. Turn off your Internet connection and wait for the SSH connection to break
  4. Now all the commands are screwed leaving only 2 options:
    1. Close the Tab and open a new one, losing all the history
    2. Close Warp and reopen it, saving the history, but killing other Tabs that have running processes
Expected behavior

The terminal should work normally, without adding invisible characters to by commands

Screenshots

No response

Operating system

MacOS

Operating system and version

14.2.1

Shell Version

GNU bash, version 3.2.57(1)-release (arm64-apple-darwin23) Copyright (C) 2007 Free Software Foundation, Inc.

Current Warp version

v0.2024.03.19.08.01.stable_01

Regression

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

Recent working Warp date

Never

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

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

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

None

Dominant language
Rust
Stars
65.1k
Forks
5.6k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from warpdotdev/warp

All issues in warpdotdev/warp

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.