Skip to content

orb <command> exits alternate screen buffer, hiding command output #2519

@ifmein

Description

@ifmein

When running orb <command> (e.g., orb php -v), the command output flashes briefly on screen and then disappears. The terminal returns to its previous state, and the output cannot be scrolled back.

Reproduced on:

  • Terminal.app
  • iTerm2
  • Ghostty

Root cause:
orb allocates a PTY and enters the alternate screen buffer when executing commands. Upon command exit, it sends a ^[[?1049l (rmcup / exit alternate screen) sequence, which restores the terminal to its pre-command state. The command output, written to the alternate screen, is effectively discarded.

Escape sequence captured (at exit):

^[[?1049l

(along with a full set of terminal attribute resets: mouse tracking off, bracketed paste off, cursor show, etc.)

Expected behavior:

  • For non-interactive, one-shot commands like orb php -v, the output should remain on screen and accessible in scrollback, just like running the command directly on the host.
  • An option like --no-tty or --keep-output would be appreciated for cases where the user doesn't need a full PTY.

Workaround:
Piping the output (e.g., orb php -v | cat) bypasses TTY allocation and avoids the issue, but this is unintuitive.

Environment:

  • OrbStack: 2.2.1 (2020100)
  • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions