Skip to content

fix(cli): disable idle refresh_interval in non-fullscreen mode to prevent auto-scroll - #48321

Closed
vanthinh6886 wants to merge 1 commit into
NousResearch:mainfrom
vanthinh6886:fix/cli-idle-refresh-autoscroll
Closed

fix(cli): disable idle refresh_interval in non-fullscreen mode to prevent auto-scroll#48321
vanthinh6886 wants to merge 1 commit into
NousResearch:mainfrom
vanthinh6886:fix/cli-idle-refresh-autoscroll

Conversation

@vanthinh6886

Copy link
Copy Markdown
Contributor

Summary

After commit 6724daa, the classic CLI uses refresh_interval=1.0 to keep the status bar clock ticking during idle. In non-fullscreen mode, this periodic redraw sends ANSI output to the terminal once per second.

Terminal emulators with auto-scroll on output (Xshell, iTerm2, Windows Terminal) interpret this as new content and snap the viewport to the bottom.

Fix

Set refresh_interval=0 in non-fullscreen mode. The clock freezes after turn completes but any user input triggers a full repaint.

Changes

  • cli.py: 1 line + 8 comment lines

Fixes #48309

…vent auto-scroll

After commit 6724daa, the classic CLI uses refresh_interval=1.0 to
keep the status bar clock ticking during idle. In non-fullscreen mode
(full_screen=False), this periodic redraw sends ANSI output to the
terminal once per second.

Terminal emulators with "auto-scroll on output" enabled (Xshell,
iTerm2, Windows Terminal, etc.) interpret this output as new content
and snap the viewport to the bottom — even when the user has manually
scrolled up to read conversation history.

Fix: set refresh_interval=0 in non-fullscreen mode. The status bar
clock will freeze after the turn completes, but any user input (key
press, paste) triggers a full repaint that refreshes it.

Fixes NousResearch#48309
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels Jun 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Competing with #48319 for the same fix (#48309). This PR hardcodes refresh_interval=0 in non-fullscreen mode (1 line); #48319 instead makes it configurable via a new display.cli_refresh_interval key (default 0) with test coverage. Same goal, different mechanism — maintainer picks one.

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Acknowledged: noted competing PR(s) #48319, #48309, #48319. My approach differs and is complementary, not mutually exclusive. Open to consolidating if reviewers prefer one direction.

@teknium1

Copy link
Copy Markdown
Contributor

Resolved via #49056 + #49087 (commit d7bff94). We went with a configurable display.cli_refresh_interval (default 1.0) rather than hardcoding 0, so users who rely on the live idle clock keep it while emulator-auto-scroll users can set 0 to opt out. Thanks for the fix!

@teknium1 teknium1 closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cli: refresh_interval=1.0` causes terminal auto-scroll-to-bottom in non-fullscreen mode

6 participants