fix(cli): make idle refresh_interval configurable, default 0 (no auto-scroll) - #49056
Merged
Conversation
Commit 6724daa added refresh_interval=1.0 to keep the idle clock ticking, but unconditional 1 Hz redraws in non-fullscreen prompt_toolkit mode cause terminal emulators (Xshell, iTerm2, Windows Terminal) to auto-scroll to the bottom on every tick — breaking scroll-up to read history. Drive it from display.cli_refresh_interval (0 = disabled, the default) so users who want the ticking clock can opt in without affecting everyone. Fixes: #48309 Related: 6724daa, 8972a15
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-argument-type |
3 |
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
tests/hermes_cli/test_config.py:965: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> str, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[str]]` cannot be called with key of type `Literal["cli_refresh_interval"]` on object of type `list[str]`
tests/hermes_cli/test_config.py:965: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[Unknown]]` cannot be called with key of type `Literal["cli_refresh_interval"]` on object of type `list[Unknown]`
tests/hermes_cli/test_config.py:965: [invalid-argument-type] invalid-argument-type: Method `__getitem__` of type `bound method str.__getitem__(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str` cannot be called with key of type `Literal["cli_refresh_interval"]` on object of type `str`
✅ Fixed issues (2):
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
run_agent.py:2971: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
Unchanged: 5789 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
teknium1
added a commit
that referenced
this pull request
Jun 19, 2026
#49087) PR #49056 set the default to 0, which reverts the #45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (#48309) can set display.cli_refresh_interval: 0 to opt out.
This was referenced Jun 19, 2026
Closed
xyshanren
pushed a commit
to xyshanren/hermes-agent-cn
that referenced
this pull request
Jun 25, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
NousResearch#49087) PR NousResearch#49056 set the default to 0, which reverts the NousResearch#45592 idle-clock fix: without a periodic invalidate, prompt_toolkit stops repainting the bottom chrome during idle and the status bar goes stale/disappears after a turn. Restore 1.0 as the default for everyone. The config knob stays — users on emulators where the per-second redraw fights auto-scroll (NousResearch#48309) can set display.cli_refresh_interval: 0 to opt out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The classic CLI no longer fights terminal auto-scroll-on-output during idle.
display.cli_refresh_intervalnow drives prompt_toolkit'srefresh_interval, defaulting to0(disabled).Root cause: commit
6724daa2chardcodedrefresh_interval=1.0to keep the idle clock ticking. In non-fullscreen mode that repaints the UI every second, and emulators with "auto-scroll on output" (Xshell, iTerm2, Windows Terminal) snap the viewport to the bottom — so scrolling up to read history gets yanked back down.Salvages #48312 by @OYLFLMH (the issue reporter), with the config-default test ported from @Elshayib's #48319. Fixes #48309.
Changes
cli.py:refresh_intervalreadsdisplay.cli_refresh_interval(default0).hermes_cli/config.py: newdisplay.cli_refresh_intervaldefault0.tests/hermes_cli/test_config.py: assert the default is0.scripts/release.py: AUTHOR_MAP entry for the salvaged commit.Validation
cli_refresh_interval: 1.0)tests/hermes_cli/test_config.py0, opt-in1.0honoredDefault
0restores the pre-6724daa2cbehavior for everyone; users who want the live idle clock setdisplay.cli_refresh_interval: 1.0inconfig.yaml.Infographic