Repository navigation
Description
Summary
On a multi-agent orca serve host, Grok full-screen TUI panes frequently become unusable because of wrong/stale PTY geometry and/or bad repaint, not because of mouse-wheel / brand detection.
Symptoms we hit in production (any/all):
- Viewport is tiny — TUI draws into a postage-stamp grid (we have live sessions at
8×20). - Nothing useful displays — pane looks blank / dead while the Grok process is still running.
- Characters are garbled — overlapping, scrambled, or unreadable layout when something does paint.
This is not #10613 (Grok mouse wheel / TERM_PROGRAM=Orca → Unknown brand). We already mitigated that path with a host TERM_PROGRAM=vscode shim; size/garble still happens.
Environment (measured on the runtime host)
| Item | Value |
|---|---|
| Orca | 1.4.155 (ORCA_APP_VERSION=1.4.155, AppImage orca-linux-1.4.155) |
| Mode | orca serve headless Linux, typical port 6768 |
| Serve binary | packaged orca-ide … serve --port 6768 --json (pairing address redacted) |
| Host | Ubuntu 24.04.4, Linux 6.8.0-124-generic x86_64 |
| Grok | 0.2.112 (9bbd559437) [stable] |
| Concurrent Grok agents | ~24 live PTYs at capture time |
| Client path | Paired desktop/web clients against this serve host (not local-only AppImage) |
Live process env (healthy-looking Grok pane)
TERM=xterm-256color
TERM_PROGRAM=vscode # host stopgap for brand/scroll (#10613 / #10469 class)
TERM_PROGRAM_VERSION=1.4.155
ORCA_REAL_TERM_PROGRAM=Orca
ORCA_REAL_TERM_PROGRAM_VERSION=1.4.155
ORCA_APP_VERSION=1.4.155
COLORTERM=truecolor
ORCA_TERMINAL_HANDLE=term_…
ORCA_PANE_KEY=…
ORCA_TAB_ID=…
So brand advertising is already forced to the VS Code / xterm.js profile. The failures below are geometry / render, not “Unknown brand.”
Hard evidence: mixed PTY sizes on the same host (same serve, same Grok build)
TIOCGWINSZ / stty -F /dev/pts/N size across live Grok processes at capture:
| PTY size (rows×cols) | Live Grok count | Notes |
|---|---|---|
| 69×162 | 13 | Looks like a full desktop pane |
| 40×120 | 7 | Mid size (mobile? smaller client? stale?) |
| 8×20 | 3 | Unusable for any full-screen TUI |
Example tiny sessions:
pid=2505083 /dev/pts/44 8×20 grok --permission-mode bypassPermissions
pid=2892713 /dev/pts/24 8×20 grok …
pid=2898860 /dev/pts/49 8×20 grok --permission-mode bypassPermissions
While siblings on the same host are healthy at 69×162. That is not “Grok wants a small UI” — it is PTY size not tracking the visible pane / getting stuck after reveal or client handoff.
An 8×20 grid matches the failure mode described in open PR #7961 (stale post-reveal resize leaving sessions at tiny/80×24-class sizes until a manual resize).
Expected
- Every Grok agent PTY’s rows/cols match the active client’s visible pane.
- After tab switch, focus change, reconnect, or multi-client attach, size reconverges (no permanent 8×20 / 40×120 stuck sessions).
- When the buffer is healthy, the canvas repaints cleanly (no garbled glyphs requiring manual resize).
Actual
- Multiple concurrent Grok sessions on one serve host end up at wildly different PTY sizes, including 8×20.
- Operators see tiny UI, blank panes, or garbled / overlapping characters.
- Session process often still alive; problem is display/geometry, not process death.
- Manual window/pane resize (when possible from the client) is the usual recovery — same recovery class as #7951 / #7240.
Reproduction (fleet / serve)
- Run
orca serve1.4.155 on Linux (headless), pair a desktop client. - Spawn many Grok agent terminals (worktrees / orchestration / long-lived sessions). We routinely run 20+.
- Switch tabs, reconnect clients, leave sessions backgrounded, open from multiple client viewports over time.
- On the serve host, measure:
# for each live grok:
stty -F /dev/pts/N size
# or TIOCGWINSZ via the process controlling tty- Observe a mix of full-size and tiny (e.g. 8×20) PTYs while Grok is still running.
Intermittent from the UI, but objective on the host via winsize.
Recovery checklist (operator experience)
- Slight window/pane resize often restores usable layout
- Ctrl+L / app redraw — sometimes helps garble; does not fix a stuck 8×20 PTY
- Tab away/back — can trigger both garble and stale size
- Select/drag text — sometimes clears garble only
- Restart Grok in-pane — only helps if spawn gets a correct size
- Host-side: tiny PTYs remain tiny until something re-issues a real resize
Why not #10613
| #10613 (brand/scroll) | This report | |
|---|---|---|
/doctor terminal brand |
Unknown under TERM_PROGRAM=Orca |
We force TERM_PROGRAM=vscode; ORCA_REAL_TERM_PROGRAM=Orca |
| Wheel / scrollback | Dead | Not the complaint |
| PTY size | N/A | 8×20 / 40×120 / 69×162 mixed on one host |
| Visual | Scroll doesn’t move | Tiny / blank / garbled TUI |
Related (closest existing work)
Size / stuck small grid
- #7951 — Terminal UI breakage on switching (resize fixes)
- #7961 — avoid stale PTY resize after tab reveal (explicit tiny/
80×24stale reassert) ← strongest match for 8×20 - #7209 — SSH/remote size ≠ local pane
- #7006 — visible terminal size convergence (blank / wrong wrap when geometry disagrees)
- #8396 (closed) — headless/
orca servefull-screen TUI width constrained despite wide PTY
Garbled / repaint / WebGL
- #7240 — garbled after tab-switch reveal
- #9115 — garbled after window focus
- #10133 — garbled agent TUI (Windows)
- #6071 — WebGL glyph atlas recovery
- #5031 (closed) — WebGL atlas corruption on agent spinners
Not this issue
Ask
- Treat this as PTY size convergence + reveal/repaint (likely [Bug] Terminal UI breakage on switching #7951 / fix(terminal): avoid stale PTY resize after tab reveal #7961), not Grok product logic.
- Please land fix(terminal): avoid stale PTY resize after tab reveal #7961 (or equivalent) in a 1.4.x serve build we can run — we can re-run the host winsize audit immediately after upgrade.
- Longer term: serve should reject / re-fit absurd sizes (e.g. < ~20×40) for full-screen agent TUIs and reassert against the active client viewport.
- If you want a minimal CI gate: multi-pane reveal with a forced mid-flight size change must never leave a live agent at 8×20.
Labels suggestion
bug, terminal, os:linux, orca-remote-server, has_repro (winsize audit on host is conclusive for the tiny-PTY half)
Activity
LesleyMurfin commentedon Jul 26, 2026
Host evidence dump (2026-07-26T07:15–07:16 UTC)
Collected live on the runtime host while the fleet was in the broken state. This is not client-side speculation — it's kernel PTY winsize + process env.
Snapshot summary
6.8.0-124-genericx86_64)serve-root-1.4.155, AppImage releaseDate 2026-07-24)orca-ide … serve --port 6768 --jsonunder a dedicated service user9bbd559437)[stable]Kernel winsize proof (tiny sessions exist)
stty -F/TIOCGWINSZsamples:All three size classes share the same brand env (so this is not #10613):
xpixel/ypixelare 0 on all sampled PTYs (no pixel geometry).Full size table (live)
ORCA_TERMINAL_HANDLEterm_f25aff4f-d006-4fe3-be13-8754ff5e2a17…/project-a/worktree-xterm_747e3451-9398-4030-88e0-b2465be53e60…/project-a/worktree-xterm_02bb248b-f04e-4ad9-9e3e-b9c0432b1da5…/project-a/worktree-xterm_164b3773-5a01-4486-9976-a45019821fb7…/project-b/automation-run-…term_57c224c1-fb58-4303-b356-5cfff16d68b6…/project-c/worktree-yterm_9ec72424-b3ab-46a7-a98c-823f78b23539…/project-c/worktree-yterm_874caddc-7f05-4a98-859e-63388ae93242…/project-c/worktree-yterm_0bf33233-7cb7-4029-b8d2-2ed2a96840ac…/project-d/worktree-zterm_c4f1c372-99ea-4dcd-81f4-72622e104ca9…/project-b(main)Clustering note: all three 8×20 Grok sessions were under the same worktree, with distinct terminal handles — so this is not one shared PTY; three separate agent panes stuck tiny.
Parent chain for tinies (example):
Serve main process started 2026-07-25 12:07 UTC (1.4.155). Tiny sessions started ~04:14–04:55 UTC 2026-07-26 (hours after serve start), so this is not only cold-boot 0×0.
Daemon log
daemon.log(~352 KB) only showssession-created/session-killed/session-exitedJSON — no resize/winsize events logged (so we cannot correlate from daemon alone; winsize is the ground truth).Session create for one tiny-related worktree (paths shortened):
{"src":"daemon","ts":"2026-07-26T04:14:25.013Z","event":"session-created", "sessionId":"…/worktree-x@@5ff198df"} {"src":"daemon","ts":"2026-07-26T04:54:58.343Z","event":"session-created", "sessionId":"…/worktree-x@@01c25ab5"} {"src":"daemon","ts":"2026-07-26T04:55:30.356Z","event":"session-created", "sessionId":"…/worktree-x@@d2d4ea91"}main.trace.ndjsonScanned current + recent rotated traces (~42k spans in window). Content is almost entirely
git.execeffect-spans — no terminal resize / cols / rows / handle strings for these sessions. Tracing does not currently surface PTY geometry (gap for debugging this class).Why this points at #7961 / size convergence
Reproduction audit command (for maintainers / after fix)
On the serve host:
Pass criteria after a fix build: zero sessions with
rows < 20orcols < 40while a desktop client is attached; ideally all interactive agent panes converge to the active client viewport within a few hundred ms of reveal.Artifacts
Evidence gist (redacted): https://gist.github.com/LesleyMurfin/30ba2938574e6f291d69b5c1da19ff31
Related: #7951 #7961 #7209 #7006 #7240 #9115 #6071 — still not #10613.
LesleyMurfin commentedon Jul 26, 2026
Evidence gist (redacted bundle)
Full host dump for the snapshot above:
https://gist.github.com/LesleyMurfin/30ba2938574e6f291d69b5c1da19ff31
Files:
all-grok-pty-sizes.txt/all-grok-pty-sizes.json— complete audit of 23 live Grok PTYs (pid, tty, rows×cols, handles, env)size-table.md— sorted markdown table including all three 8×20 handlesstty-a-samples.txt— rawstty -afor 8×20 / 40×120 / 69×16200-versions.txt, package/AppImage meta for 1.4.155daemon-log-hits.txt— session lifecycle only (no resize telemetry)trees-and-tiny.txt— parent chains for stuck-tiny Grok processeshost-load.txtNote:
ORCA_AGENT_HOOK_TOKENand similar secrets were redacted from env dumps. Terminal handles left intact for correlation.LesleyMurfin commentedon Jul 26, 2026
Client console: exact match for open headless-serve regression
Paired web client against this host’s headless
orca serve1.4.155 logs:That string is thrown server-side when a focused terminal/agent create is routed through
getAuthoritativeWindow()and the serve process has no BrowserWindow (true headless / xvfb-only serve).Open tracking (this error text)
terminal.createAgentSessionwithpresentation: 'focused'on windowless serve.+/terminal create --focus→ same error on headless remotecreateAgentSession/ ~1.4.153How this relates to #10706 (tiny / blank / garbled)
Two failure modes can stack on the same headless serve:
No renderer window available. Matches Headless serve: agent create from desktop client fails with 'No renderer window available' since ~v1.4.153 #10553 / unmerged fix(runtime): degrade focused terminal create on headless serve #10557.Our host still matches #10553’s environment: headless Linux serve,
DISPLAY=:99, no real desktop window, clients pairing in for agent creates.CLI repro (from #10553)
Ask
Please land #10557 (and/or #10370) into a 1.4.x serve build. We can verify immediately:
No renderer window available.LesleyMurfin commentedon Jul 26, 2026
Capture: browser console error only
Client:
CLI repro on this headless serve (1.4.155), same runtime:
orca terminal create --worktree path:/path/to/repo --command "echo bg-ok" --jsonsurface: backgroundorca terminal create … --focus --jsonruntime_error: No renderer window availablegrok --version+--focusruntimeId:c1d24190-a8f2-4c8a-8536-b46284ea5443asar shows throw in
getAuthoritativeWindow()whenauthoritativeWindowId === null(headless serve).Matches #10553 / fix #10557. Error does not land in serve-fg/daemon logs (RPC only).
Gist (redacted): https://gist.github.com/LesleyMurfin/c64dec4338fbe308a459eceebd41dcdf
LesleyMurfin commentedon Jul 26, 2026
Screenshot: Grok pane blank / fragments (desktop client → headless serve)
Captured 2026-07-26 01:55 local (Windows taskbar).
Re-hosted PNG: https://litter.catbox.moe/aa16jp.png
What the image shows
28K / 508K,175 / 29.4k)How this maps
LesleyMurfin commentedon Jul 26, 2026
Screenshot attached (re-host)
Previous comment may have a broken image URL (gist rejects binary). Re-hosted:
PNG (1902×1072): https://litter.catbox.moe/aa16jp.png
Visual summary: Grok agent tab in Orca Windows desktop (paired to Orca Server). Chrome OK; main TUI viewport almost empty with sparse leftover lines ("Thinking…", partial tool list, corrupted "x hartcuts"), token counters still visible. Sidebar shows Working Grok sessions on redacted project worktrees.
LesleyMurfin commentedon Jul 26, 2026
Screenshot: Grok blank / fragmented TUI (Windows desktop → headless serve)
Captured 2026-07-26 01:55 local (Windows).
What you see
x hartcutstext.28K / 508K,175 / 29.4k).This is the "blank / garbled characters" class for #10706 (not #10613 scroll/brand).
nwparker commentedon Jul 27, 2026
Repro status: skipped (environment blocked)
Grok TUI on orca serve tiny PTY — needs live headless serve + Grok agent TUI session.
Not labeling
cannot_repro— needs the blocked environment to attempt a full repro.nwparker commentedon Oct 24, 2026
Thanks for the production detail. Please retest on 1.4.239+ and share: Orca version on the serve host and client, host OS, Grok CLI version, how the pane is attached (web UI/desktop/mobile) and its size, and
stty sizeoutput inside an affected Grok pane versus the visible pane dimensions. Does resizing the pane or Ctrl+L recover it? Please redact anything private.nwparker commentedon Nov 8, 2026
Hi @LesleyMurfin, we haven't heard back since our last question, so we're closing this for now. If it still happens on the latest version, please open a new issue with your Orca version, OS, steps to reproduce, and logs, and link back to this one. Thanks for reporting!