Skip to content

Built-in terminal is slow to reopen and unreliable under sustained output #1075

Closed

Description

@Diffuzmetall

Workflow

Use the built-in terminal for long-running commands on an enrolled remote machine, then close and reopen the terminal panel or reconnect the browser websocket.

What happens

Terminal output is forwarded as many tiny websocket messages, browser/daemon websocket buffers have no bounded transport policy, and every browser attach replays up to the full 4 MiB daemon scrollback from sequence zero. Under sustained output this makes input latency spiky, and reopening a populated remote terminal visibly scrolls through old output before reaching the prompt.

Measured on a terminal attached to a VPS:

  • reopening an 8 MiB-populated terminal replayed 4,192,407 bytes in 1,025 websocket output messages;
  • reaching the final replayed line took about 2.21 seconds;
  • large pastes and multibyte input can be split at unsafe boundaries;
  • attach/replay, close/exit, reconnect, and concurrent restart paths have race windows.

Expected

  • Batch PTY output while preserving byte order.
  • Bound browser and daemon websocket queues and isolate slow/broken sockets.
  • Keep input responsive during output floods.
  • Preserve arbitrary input/output bytes.
  • Reconnect from the last received sequence and bound initial browser replay to a useful tail.
  • Preserve final output before exit and make restart atomic.
  • Render modern Unicode widths correctly and avoid conflicting multi-client resize updates.

Validation target

A populated remote terminal should open near its current prompt rather than replaying/scanning the entire retained scrollback, without silently losing output or input.

Activity

  1. self-assigned this
    on Aug 6, 2026
  2. ymichael commented on Aug 6, 2026

    @ymichael
    Collaborator

    thanks for doing this! will take look!

  3. added theissue type on Aug 7, 2026
  4. added a commit that references this issue on Aug 7, 2026
    16c233c
  5. added a commit that references this issue on Aug 14, 2026
    0fc6a85
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions