perf(terminal): stream output and history - #9027
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a cross-platform terminal streaming and replay system that changes server PTY handling, persistence, transport contracts, web rendering, and native mobile behavior. It also changes product defaults and adds lint-suppression directives, so the scope and operational impact require human review. Not approved because:
Review your spending limits in Billing settings, or comment |
f27b60f to
0b654ec
Compare
590087b to
4468db2
Compare
|
Heads-up on overlap: #9221 adds a small |
06d2bfb to
9391da2
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9391da2. Configure here.
Large terminal sessions rebuilt retained output in server and client memory, rewrote growing log files, and left slow remote subscribers with unbounded queued deltas. This makes terminal output a bounded stream end to end: coalesced PTY batches with backpressure, byte-bounded durable history, explicit replay markers around attach history, chunked client retention, native mobile append/reset commands, and DEC 2026 synchronized rendering. Squashed rebase of pingdotgg#9027 onto main. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9391da2 to
1f7be76
Compare
Large terminal sessions rebuilt retained output in server and client memory, rewrote growing log files, and left slow remote subscribers with unbounded queued deltas. This makes terminal output a bounded stream end to end: coalesced PTY batches with backpressure, byte-bounded durable history, explicit replay markers around attach history, chunked client retention, native mobile append/reset commands, and DEC 2026 synchronized rendering. Squashed rebase of pingdotgg#9027 onto main. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Hold the attach SIGWINCH wiggle for 100 ms: ncurses only reports KEY_RESIZE when the size it reads differs, so two immediate resizes were a no-op and full-screen apps stayed partially painted after re-attach. - Track the DEC mode state at the start of the retained tail instead of skipping modes the tail mentions. A tail spanning an app's exit and relaunch painted the older frames on the primary screen. - Stop treating DECSTR as a mode reset; the vendored libghostty-vt leaves every tracked mode untouched on a soft reset (measured against the wasm). - Keep hidden thread drawers mounted (main behavior) and skip painting while a mount has no size, so switching threads keeps the surface. - Hold an app-owned drag captured and silent after tracking ends instead of letting its pointerup fall through to selection handling. - Keep one-eighth block edges at least one pixel wide in narrow cells. - Mobile: treat the attach seed as a pending replay so reconnects keep the last frame, and rebuild the native surface once after a failed command. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e process A write waiting for the per-session permit captured the PTY process before the wait. A restart during a held mouse release replaced that process, so the queued input went to the stopped PTY and was lost. Re-read the session's process after acquiring the permit and write to that one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1f7be76 to
54c6751
Compare
|
Macroscope skipped reviewing this pull request. Per-PR cost limit exceeded (workspace setting). Reviews on this PR have cost $44.21 so far. This review would add an estimated $9.31, bringing the total to $53.53 — above your per-PR limit of $50.00. Tip To get this pull request reviewed, you can:
|
Keep bounded, byte-counted terminal chunks and append only unread output. Use UTF-16 cursors so compaction preserves live terminal replies. Reset on lifecycle changes or a real retained-data gap. Keep the existing wire protocol, native buffer interface, and client retention limit. Native streaming and strict server replay byte bounds remain separate. Continue the client helpers from #9027 at source head 9391da2. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat(server): measure provider turn token usage (#9132) (cherry picked from commit 1587f24) * chore(upstream): record the provider turn token measurement * chore(upstream): record the marketing motion skip * perf(server): avoid full patches for checkpoint summaries (#9694) (cherry picked from commit c163d50) * chore(upstream): record the checkpoint summary change * perf(web): defer diff workers until a code view opens (#9692) (cherry picked from commit b3e1d88) * chore(upstream): record the deferred diff workers * chore(upstream): record the marketing font skip * perf(server): stop rebuilding terminal history per chunk (#9703) Append terminal history incrementally and materialize text for snapshots and coalesced disk writes. Clear evicted line references without changing retained output. Continues [#9357](pingdotgg/t3code#9357). The original contribution and author credit are preserved. The current line limit and wire format stay unchanged. A strict byte limit remains separate work. Created with GPT-6 Astra (preview) in Codex. Co-authored-by: will <will@moondiner.com> (cherry picked from commit 3bbbc1d) * chore(upstream): record aligned changes through 3bbbc1d * perf(server): use one query for buffered provider events (#9706) (cherry picked from commit dffb4cd) * chore(upstream): record the buffered event query * perf(relay): avoid repeated activity decoding (#9708) (cherry picked from commit c75299e) * chore(upstream): record aligned changes through c75299e * perf(web): stop continuous chat status animations (#9709) (cherry picked from commit c7c1dfe) * chore(upstream): record the chat status animation change * fix(mobile): preserve saved work after storage read failures (#9710) (cherry picked from commit 7839140) * perf(web): stop replaying terminal buffers on rollover (#9707) Keep bounded, byte-counted terminal chunks and append only unread output. Use UTF-16 cursors so compaction preserves live terminal replies. Reset on lifecycle changes or a real retained-data gap. Keep the existing wire protocol, native buffer interface, and client retention limit. Native streaming and strict server replay byte bounds remain separate. Continue the client helpers from pingdotgg/t3code#9027 at source head 9391da2b48439d1d7a2b01d169e785682bf8abb8. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit da7e46d) * feat(web): preview pull request links (#9631) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit 9510390) * perf(client): reduce thread-list update work (#9716) (cherry picked from commit c66f15f) * fix(server): settle inactive threads with open PRs (#9610) (cherry picked from commit d536b05) * fix(server): bound slow-client event buffers (#9715) (cherry picked from commit 108f295) * test(server): allow either valid file-search match (#9720) (cherry picked from commit 8ccb933) * chore(upstream): record aligned changes through 8ccb933 * fix(web): match provider settings layout for disconnected devices (#9619) (cherry picked from commit 8357eef) * chore(upstream): record the provider placeholder layout * fix(web): keep the slash menu above the composer when vertical space is short (#9625) (cherry picked from commit 120fab1) * chore(upstream): record aligned changes through 120fab1 * fix(mobile): remove provider setup (#9721) (cherry picked from commit 9eb4d71) * chore(upstream): record the mobile provider setup removal * perf(web): stop rendering hidden terminals (#9718) Stop post-construction terminal snapshots, canvas paint, and cursor timers while a drawer or right panel is hidden. Keep parsing output and answering VT queries, then render current state once on reveal. Cover delayed WASM initialization, selection behavior, zero-size mounts, and reveal with real-core headless tests. Keep the existing startup background fill. Continue the zero-size guard from source commit eb5b68103506b1bb5bd81c3b9e27f11e349743c9 in the terminal streaming contribution. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit 5eab021) * chore(upstream): record aligned changes through 5eab021 * fix(mobile): read file-backed image drafts before enabling them (#9713) Accept file-backed image drafts and v4 outbox records while keeping current inline image creation and v3 outbox writes. Retain image files during previews, uploads, and legacy inline reads. Preserve image MIME types and stop canceled sends after asynchronous reads. The later file-backed writers remain held until new native runtime fingerprints contain these readers and the storage guards. Continue Wout Stiens' mobile draft work with separate reader-only corrections. The original contribution remains unchanged. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit c4353bc) * chore(upstream): record the image draft rebase * perf(server): replay only the selected thread (#9726) Read only the selected thread's events when resuming its detail stream. Measure bounded row counts and serialized payload bytes before replay, using the existing aggregate index and a captured authoritative head. Keep snapshot resets for oversized or invalid cursors. Reset recreated threads when a snapshot exists, and keep bounded replay for deleted threads whose snapshot is absent. Shell replay and the detail-event filter are unchanged. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit 50bfca4) * fix(web): mute composer helper text (#9654) (cherry picked from commit 7d5dc66) * feat(web): unpin threads from the sidebar multi-select menu (#9651) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit c7bf311) * chore(upstream): record aligned changes through c7bf311 * perf(web): reuse timeline rows while text streams (#9725) Reuse ordered timeline entries and raw rows for safe streaming text updates. Keep full derivation for structural, metadata, activity, and control changes. Preserve immutable attachment-preview objects when their current URLs are unchanged. Cover URL renewal/removal, completion, grouping, pagination, and earlier-row immutability. Continue extoci's ordered timeline projection work with separate integration and attachment corrections. The original contribution remains unchanged. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: extoci <hi@extoci.lol> (cherry picked from commit 19c1710) * chore(upstream): record the timeline row reuse * fix(relay): bound stalled push requests (#9734) Give HTTP sends and response-body reads ten seconds each. Keep the existing typed transport errors, delivery records, and queue policy. Abort stalled requests and let the next signed job run. JWT retrieval is outside these deadlines. Do not add retries for an uncertain response result. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit 088cc3f) * perf(server): stop caching unused OpenCode tool parts (#9738) Do not retain OpenCode tool parts after emitting their runtime events. The remaining cache readers need text, reasoning, or step-usage parts, not tool input and output. Keep tool lifecycle events, output bytes, late-role assistant text, and usage handling unchanged. Add focused lifecycle coverage and verify retained memory through the real adapter. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit c8f77e0) * chore(upstream): record aligned changes through c8f77e0 * fix(web): fold single trailing activity (#9739) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit cfc9bf3) * chore(upstream): record the trailing activity fold * fix(web): show project settings for new threads (#9743) (cherry picked from commit cbe93e8) * perf(mobile): bound the parsed review cache (#9749) Bound cached parsed review sections by eight entries and 4,194,304 full source characters. Evicted inactive parsed and native results can be collected. Raw patches, comments, and view state stay unchanged. Prewarm only nearby sections that fit beside the selected section. Use actual retained source weights for normalized cache hits, and skip oversized prewarms. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit d6e29dc) * perf(web): avoid repeated terminal metadata scans (#9747) Build one ordered terminal metadata index per immutable snapshot. Reuse unchanged session wrappers and thread groups across consumers, with separate environment targets. Keep numeric ordering, picker ties, attach state, and subscription lifetimes unchanged. Let retired snapshots and groups be collected. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit fec606f) * perf(server): bound terminal history by bytes (#9748) Keep at most 5,000 lines and 8 MiB of retained UTF-8 terminal history. Discard the oldest text at either limit while preserving complete live output. Track bytes and newlines in small chunks. Join split surrogates before eviction. Restore only the needed file tail, handle short reads, and close the file before rewriting current or legacy history. Created with GPT-6 Astra (preview) in Codex. Co-authored-by: will <will@moondiner.com> (cherry picked from commit cf9729d) * feat(web): link pull request authors to profiles (#9627) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit a76b898) * fix(web): refine server update notice (#9744) (cherry picked from commit 0de956e) * perf(client): stop thread streams when unused (#9740) Close a thread's live detail stream when its last consumer leaves. Retain a registry-local completed state and replay cursor for five idle minutes. Keep warm lookup independent of collectible raw atom definitions. Preserve paging and deletion state, reject stale owners, and cache only completed data/cursor updates. Skip repeated saves of unchanged data while retaining dirty-data flushes and failed-write retries. Verify real GC/remount behavior and focused lifecycle cases. Created with GPT-6 Astra (preview) in Codex. (cherry picked from commit d7cf8aa) * perf(mobile): defer file preview highlighter startup (#9752) (cherry picked from commit 77b655c) * perf(server): skip history reads for metadata commands (#9758) (cherry picked from commit 6365919) * chore(upstream): record aligned changes through 6365919 * perf(web): defer image URL requests for thread history (#9760) (cherry picked from commit 15eda89) * fix(server): read thread history where the fork transcript needs it The metadata-command split moved turn dispatch onto the message-free shell read, which the fork and provider-handoff transcripts depend on, and left two fork-only call sites pointing at the removed resolveThread. * chore(upstream): record the deferred image URLs and the history-read split * docs(upstream): typecheck after each adopt-aligned run verify is the only check between its picks, so a removed export that only a fork file used survives to whichever later commit happens to typecheck. * fix(models): make GPT-6-Astra current (#9762) (cherry picked from commit bc03c36) * fix(web): stop empty diffs replacing pull requests (#9753) (cherry picked from commit d115a96) * fix(sidebar): mute background working threads (#9759) (cherry picked from commit 45bd3b6) * fix(web): reset automatic pull to default (#9763) Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> (cherry picked from commit f6db420) * fix(web): restore file comment focus in editable preview (#9061) (cherry picked from commit 13427ec) * chore(upstream): record aligned changes through 13427ec * chore(upstream): defer the internal docs restructure * chore(upstream): defer the user docs restructure * fix(web): stop panel motion during navigation (#9766) (cherry picked from commit cd71367) * chore(upstream): record the panel motion suppression * fix(web): open composer selectors below controls (#9767) (cherry picked from commit 8e056a0) * perf(server): skip unused Linux process detail reads (#9768) (cherry picked from commit 163d86a) * fix(server): remove retired Codex models after refresh (#9773) (cherry picked from commit bfef973) * chore(upstream): record aligned changes through bfef973 * test: stop path and platform tests depending on the host OS (#9564) Co-authored-by: Claude Code <noreply@anthropic.com> (cherry picked from commit cc60753) * chore(upstream): record the host-independent path tests * test(server): skip posix executable fixtures on a Windows host (#9565) Co-authored-by: Claude Code <noreply@anthropic.com> (cherry picked from commit 4701041) * chore(upstream): record the Windows fixture skip * test(mobile): assert cold-start highlighting per entry point Comparing the two entry points' token arrays assumes both resolve the same regex engine. Linux CI produced a different split for the same grammar and theme, so each path is checked for the behaviour the test names instead. --------- Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: maria <maria@kuuro.net> Co-authored-by: Guillermo Casanova <75276669+Gigioxx@users.noreply.github.com> Co-authored-by: oliver <97427849+flamboh@users.noreply.github.com> Co-authored-by: Igor Makowski <56691628+Mnigos@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Jake Leventhal <jakeleventhal@me.com> Co-authored-by: Gianmarco <gianmarcosimone89@gmail.com> Co-authored-by: extoci <hi@extoci.lol> Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com> Co-authored-by: Shpetim <32248437+ShpetimA@users.noreply.github.com>
* perf(web): speed up terminal snapshots (#9663) (cherry picked from commit cccd7e3c885065e925f559c5708378cdb3b51eb3) * perf(server): stop rebuilding terminal history per chunk (#9703) Append terminal history incrementally and materialize text for snapshots and coalesced disk writes. Clear evicted line references without changing retained output. Continues [#9357](pingdotgg/t3code#9357). The original contribution and author credit are preserved. The current line limit and wire format stay unchanged. A strict byte limit remains separate work. Created with GPT-6 Astra (preview) in Codex. Co-authored-by: will <will@moondiner.com> (cherry picked from commit 3bbbc1d9fd8b3d649c60ba0137c7dae93a6aab3f) * perf(web): stop replaying terminal buffers on rollover (#9707) Keep bounded, byte-counted terminal chunks and append only unread output. Use UTF-16 cursors so compaction preserves live terminal replies. Reset on lifecycle changes or a real retained-data gap. Keep the existing wire protocol, native buffer interface, and client retention limit. Native streaming and strict server replay byte bounds remain separate. Continue the client helpers from pingdotgg/t3code#9027 at source head 9391da2b48439d1d7a2b01d169e785682bf8abb8. Created with GPT-6 Astra (preview) in Codex. Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit da7e46d08e85bcb07ecd78721a40f7b612fac2f2) * perf(server): bound terminal history by bytes (#9748) Keep at most 5,000 lines and 8 MiB of retained UTF-8 terminal history. Discard the oldest text at either limit while preserving complete live output. Track bytes and newlines in small chunks. Join split surrogates before eviction. Restore only the needed file tail, handle short reads, and close the file before rewriting current or legacy history. Created with GPT-6 Astra (preview) in Codex. Co-authored-by: will <will@moondiner.com> (cherry picked from commit cf9729d5ee9660c08556e823080d3bb19648ed28) * fix(server): advertise truecolor in the integrated terminal (#7680) Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com> (cherry picked from commit 89ee69e4430b21ee14565abf5c34dae43f38c1d8) * docs(terminal): describe history limits with Pylon identity --------- Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: will <will@moondiner.com> Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Shubh <shubh@shubhxho.com> Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>

Large terminal sessions repeatedly rebuilt retained output in server and client memory, rewrote growing log files, and could leave slow remote subscribers with unbounded queued deltas. The small attach snapshot limited scrollback, reopening a shell could redraw its prompt through an unchanged PTY resize, and full-screen apps such as
btopvisibly tore because synchronized updates were painted between PTY chunks.This makes terminal output a bounded stream end to end:
node-ptyaround a 2 MB low-water markreplay-start/replay-completemarkers, retains byte-counted chunks with replay/live provenance in shared client state, and sends ordered append/reset/replay-append commands to native mobile renderersbtop, vim, htop, and similar TUIsThis supersedes #8564, keeping its feature work and hardening the replay protocol against the delivery failures a full review pass found:
replayBytes, so released web and mobile clients whose bundled contracts predate the markers keep decoding the attach stream instead of failing on the first eventreplay-completemarker now latches the client out of every open replay instead of incrementing a counter, and the slow-consumer resync re-emits one after clearing the transport queue; a marker lost to backpressure or a transport hand-off can no longer leave the renderer permanently in replay mode with Ghostty's PTY writer detached (which silently ate DSR/DA query replies and hung full-screen apps)packages/sharedand is used by both the server batcher and the client chunk store, with a fast path that skips the decode round-trip for single-chunk writesVerification for the hardening pass, on top of the original PR's browser and benchmark evidence:
replayBytes, completion latching after a lost marker, appending across chunk compaction, and resetting a cursor that falls inside a compacted chunkVisual verification (carried from #8564; the rendering paths are unchanged by the hardening pass):
Before
After
Review pass 2 (rebase onto main, bot findings, TUI validation)
Squash-rebased onto current
main(carrieslifecycleVersionfrom #9663 through the chunked reducer, and supersedes the line-cappedBoundedTerminalHistoryfrom #9703: durable history here is byte-bounded and append-only, so the per-chunk rebuild that PR removed no longer exists). A write queued behind a held mouse release now re-reads the session's process after acquiring the permit, so a restart during the hold can no longer send input to the stopped PTY. Browser validation on the rebased branch covered btop and htop in the light host theme, a 30k-line scrollback with the 4 MB extended replay after a reload, thread switching, a real mouse click on htop's Quit label, and re-attach while a TUI runs. That surfaced two real defects on top of the bot findings:cols-1and back immediately; ncurses only reportsKEY_RESIZEwhen the size it reads differs from the one it has, so the pair collapsed into a no-op. The intermediate size is now held for 100 ms.CSI !p) is no longer treated as a mode reset. Measured against the vendored libghostty-vt wasm: it leaves every tracked mode untouched, while RIS clears them all (matches @pnupu's note from fix(server): reset terminal modes a dead shell leaves in inherited history #9221).main(bounded by the existing retention), and the surface skips painting while its mount has no size. Switching threads keeps the same Ghostty instance, scroll position, and extended history.After: htop fully repainted 3 s after a page reload, and a clean primary screen after quitting an htop that was relaunched inside the retained tail.
Not covered here: native mobile rendering was typechecked and unit-tested only, not run on a device.
Feature work authored by GPT-5.6 Sol with the Codex harness; review passes and hardening by Claude Fable 5 and Claude Fable 5.1 with Claude Code, all through T3 Code.
Note
High Risk
Changes span server attach/replay protocol, session state shape (
buffer→ chunkedoutput), and native mobile command paths; older clients or stale native binaries can mis-decode streams or lack streaming APIs.Overview
Mobile native terminals now accept incremental output instead of rebuilding from a single
initialBufferprop. Android and iOS exposestreamingRevision2 with asyncwrite,writeReplay, andreset, queue up to 8 MiB of pending data before the surface exists, suppress PTY query replies during replay, and coalesce redraws. Ghostty scrollback is configured as 64 MiB (byte budget) so large 4 MiB replays fit.NativeTerminalSurfaceswitches from a flatbufferstring toTerminalOutputState, gates on native streaming support, and queuesreset/write/writeReplaycommands with retry, deferred empty replay resets while history streams, and one-shot surface recovery on command failure. The thread route passesreplayPending,replayPaused, and requestsEXTENDED_TERMINAL_REPLAY_BYTESon attach when the binary supports it; buffer replay helpers only signal pause during font-layout transitions instead of hiding the whole buffer.Server
TerminalManagertests in this diff reflect the broader streaming work: byte-capped durable history and replay tails,replay-start/replay-completeonly whenreplayBytesis set, PTY output batching and pause/resume under backlog, DEC mode prefixing for aged replay tails, attach resize wiggle for alternate-screen apps, and stricter mouse report handling when tracking ends.Reviewed by Cursor Bugbot for commit 54c6751. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Stream terminal output and history as bounded replay and live chunks
TerminalOutputStatein terminalSession.ts, containing UTF-8-bounded chunks, ids, andreplay/livedelivery labels.pauseOutput/resumeOutput), and emitsreplay-start/replay-completemarkers around snapshots.replayBytes(64 KiB to 8 MiB) toTerminalAttachInputand includes the new replay boundary markers inTerminalAttachStreamEvent.replay-start/replay-completeevent types andTerminalOutputStateinstead of the removed string buffer; native terminal modules must support streaming revision 2 for replay streaming.Macroscope summarized 54c6751.