Skip to content

fix(agents): keep Grok and Antigravity conversations in the terminal scrollback - #698

Merged
artempartos merged 1 commit into
developfrom
fix/agent-scrollable-history
Nov 11, 2026
Merged

artempartos merged 1 commit into
developfrom
fix/agent-scrollable-history

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

Why

A session's history is only scrollable if the CLI prints into the normal screen.
On the alternate screen tmux keeps no scrollback, so the live terminal, the
live log tail (capture-pane -S), the quota sweep and the stored-log replay
(SessionTerminalReplay, xterm.js) all see a single frame. Claude Code (#465)
and Codex (#444) were fixed earlier; this checks every runtime at its pinned
version.

Measured (TUI in a 100×15 tmux pane, #{alternate_on} / #{history_size} / ESC[?1049h in the pane stream)

Runtime Before After
claude_code 2.1.316 inline (CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1); control run without it: alt screen unchanged
codex 0.166.0 inline (tui.fullscreen_transcript=false); control run without it: alt screen unchanged
gemini_cli 0.60.0 inline ui.useAlternateBuffer: false pinned (default false in 0.60 and 0.66)
kiro_cli 3.0.0 inline chat.startFullscreen: false pinned (the CLI reads it: kiro-cli settings chat.startFullscreen → false (global))
cursor_cli 2026.10.22 inline; the bundle enters the alt screen only in worker mode, the resume picker and the diff-review viewer unchanged
grok 1.0.70 alt screen --minimal: three turns, banner and earlier turns in tmux history, no ESC[?1049h. --no-alt-screen alone left history empty (it repaints one frame). A prompt given as an argument still starts the turn in the TUI.
antigravity_cli 1.5.0 alt screen altScreenMode: "never": three turns against the mock; turns 1–2 in tmux history, no ESC[?1049h
copilot_cli 1.0.108 alt screen not fixable in the CLI: it enters the alt screen whenever stdout is a TTY. No setting, env var or feature flag turns it off, and with tmux alternate-screen off it still repaints the viewport, so nothing reaches the scrollback. Follow-up, not in this PR.

Grok and Antigravity were driven through real chat turns with an API key pointed
at test/otlp_capture/mock.py. Neither has a turn-end or interactive-prompt
signature, so the layout change cannot affect detection.

Not in this PR

  • Copilot CLI: options are collecting its own transcript
    (~/.copilot/session-state/<id>/events.jsonl) and asking GitHub for an inline mode.
  • The read-only live view (another user's session) cannot scroll on any runtime:
    the tmux client is -r and xterm.js has disableStdin, so the wheel never
    reaches tmux.

Checks

bin/rails test on the five touched test files (282 runs, 0 failures) and rubocop
on the changed files, in the container. The full suite runs in CI.

🤖 Generated with Claude Code

…scrollback

Both CLIs drew their TUI on the alternate screen, so the tmux scrollback, the
live log tail, the quota sweep and the stored log replay saw one frame and
nothing to scroll back to. Grok now runs with --minimal (--no-alt-screen alone
still repaints a single frame) and Antigravity with altScreenMode "never";
both were driven through three chat turns against a mock model and every
earlier turn reached the tmux history.

Kiro and Gemini are inline already; their switches (chat.startFullscreen,
ui.useAlternateBuffer) are pinned off so a flipped default cannot repeat what
Codex 0.157 did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit be8c990 into develop Nov 11, 2026
17 checks passed
NOX73 added a commit that referenced this pull request Nov 11, 2026
…s-0-1-0

* origin/develop:
  feat(coder): clone GitLab, Bitbucket and Azure DevOps repos in coder_prepare_repo (#703)
  fix(agents): show each runtime's own logo everywhere (#704)
  feat(teams): assign cards to a team and run triggers as a team (#701)
  feat(agents): collect the Copilot CLI transcript as a session log (#700)
  fix(agents): keep Grok and Antigravity conversations in the terminal scrollback (#698)
  feat(billing): redesign the Billing tab around active and previous subscriptions (#646)
  feat(web): switch the UI, admin, public pages and emails to Inter (#699)
  chore(deps): weekly dependency batch — aws-sdk-core 3.267 retry fix, prism 2, Mantine 9.7.5, runner Go 1.27.4 (#697)
  fix(board): leave archived tasks out of agent board listings (#690)
  feat(agents): add GitHub Copilot CLI as an agent runtime (#684)
  feat(runners): the callback proxy — the proxy sidecar, the host runner relay and the gateway proxy route (task #216, 8b) (#677)

Signed-off-by: Rozhnov Alexandr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant