Skip to content

[Feature Request / UX] Option to automatically close terminal tab/view when SSH session exits #164

Open

Description

@lanrat

Summary

When an SSH session terminates cleanly (e.g. typing exit or sending Ctrl+D / EOF), the terminal session view remains open in a disconnected state and must be manually dismissed/closed.

I'd like to request an option or workflow improvement to either automatically close the terminal tab upon a clean disconnect or provide a configurable preference for tab closure behavior.

Current Behavior

  • Connect to an SSH host.
  • Run exit or press Ctrl+D.
  • The remote process exits and the SSH connection drops, but the terminal tab/view remains open showing the static disconnected buffer.

Expected / Proposed Behavior

Ideally, one of the following approaches could be implemented:

  1. Configurable setting: A preference under Settings/Host settings: "Close tab/session automatically on clean exit" (enabled/disabled).
  2. No Interaction: When the shell session exists, automatically close the tab/session.

Context

Desktop and mobile terminal emulators (e.g., Windows Terminal, macOS Terminal, Termius) often offer settings to handle whether tabs stay open after the sub-process or remote SSH session closes. Adding this would streamline closing multiple one-off SSH sessions without manual UI taps.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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