Skip to content

TUI re-emits entire transcript (~700KB) + ED3 on every SIGWINCH — unusable over mobile SSH/tmux #13

Description

@Sogl

Summary

On every terminal resize (SIGWINCH), the Devin TUI re-emits the entire transcript into the pane — not just the live area — plus \x1b[3J (scrollback erase). On mobile SSH clients (Lobishell/Android + tmux), opening/closing the soft keyboard fires resize events, and each one costs ~80–285 KB re-rendered through the SSH pipe. An animated IME resize burst costs ~0.7–1 MB and ~17 s of visible churn — the session looks like it "reloads from scratch" and remote work is unusable.

Environment

  • devin 3000.11.3, macOS x86_64
  • Client: Lobishell on Android → SSH → tmux 3.6a → devin
  • Session under test: ~1500 message nodes

Measured

Direct PTY, devin -r <long-session>:

  • resume render: ~1.7 KB
  • one TIOCSWINSZ + SIGWINCH (160x50 → 80x25): ~720 KB emitted, ~10 s, 2 screen clears
  • one resize back: ~700 KB, ~6 s

Through real tmux + attached client (67 cols), keyboard-toggle bursts:

gesture bytes to client duration
shrink (kb open) 140–231 KB ~17 s
grow (kb close) 533–543 KB ~17 s

Same burst through a 300 ms-resize-debouncing pty shim: 79–168 KB — coalescing works, but even ONE resize still costs a whole-transcript repaint.

Related (same session/store layer)

  • ACP session/load replays the whole transcript as ~1200 individual session/update notifications (~2 MB, ~1180/s) instead of batched/incremental (tail_replay.rs has a from cursor that load doesn't use).
  • session_db.rs save_session_state rewrites all message_nodes from index 0 on every prompt — O(n²); sessions.db hit 752 MB + 127 MB WAL for 27 sessions.

Ask

  • On resize, repaint only the visible/live region (or diff), not the full transcript
  • Drop \x1b[3J on resize (it wipes tmux scrollback on every event)
  • Debounce/coalesce SIGWINCH handling — the v3000.11.1 changelog entry ("resizing terminals with long transcripts no longer causes a redraw storm") bounded repetition, but the repaint still scales with transcript length
  • Batch session/load replay / honor incremental cursor
  • Make save_session_state append-only for unchanged nodes

Happy to share the PTY repro scripts.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions