You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Agent TUI redraws can block remote runtime RPCs #14331
Agent TUI redraws can make the remote runtime stop answering RPCs while TCP remains healthy.
What happened?
A Linux remote runtime repeatedly appeared offline and reconnected. During an affected session:
ping and TCP connections to the runtime succeeded continuously
orca status timed out repeatedly
Electron's main process used one full core
a CPU profile attributed 86.8% of samples to retained terminal-row finalization
The observed redraw row contained about 4,001 internal spaces followed by status text. The finalizer used /[ \t]+$/g to remove trailing whitespace. When internal whitespace is followed by text, this end-anchored regex repeatedly rescans the run before rejecting it.
How can we reproduce it?
Run an agent TUI that redraws a status line about 36 times per second.
Emit a retained partial row containing about 4,000 spaces followed by text.
Process each redraw through retained terminal-tail finalization.
Observe Electron main-process CPU and runtime RPC latency.
Additional evidence:
observed row arrays contained only four or nine rows, ruling out tail-array size as the cause
replacing the regex with the existing backward scanner changed a follow-up profile to 99.1% idle
status calls recovered from repeated approximately 73-second timeouts to 0.23–0.34 seconds in the affected session
Fixed by #19214, which removed the quadratic whitespace trimming that let heavy TUI redraws stall the main process. #26483 also keeps the terminal tail linear under redraw floods. If you still see this on a current build, please reopen with details and we'll take another look.
Activity
fix(runtime): send only the latest session.tabs state while a link is…
fix(runtime): pace session.tabs on end-to-end delivery receipts (stab…
OrcaWin commentedon Oct 9, 2026
Fixed by #19214, which removed the quadratic whitespace trimming that let heavy TUI redraws stall the main process. #26483 also keeps the terminal tail linear under redraw floods. If you still see this on a current build, please reopen with details and we'll take another look.