Skip to content

fix(cli): disable background redraw by default to prevent scroll hijack (#63895) - #63992

Open
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/63895-terminal-autoscroll
Open

fix(cli): disable background redraw by default to prevent scroll hijack (#63895)#63992
webtecnica wants to merge 1 commit into
NousResearch:mainfrom
webtecnica:fix/63895-terminal-autoscroll

Conversation

@webtecnica

Copy link
Copy Markdown
Contributor

Fixes #63895. Changes default from 1.0 to 0, preventing periodic prompt_toolkit redraws from fighting the terminal's native scrollback. Users can opt in via .

@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 Jul 13, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for isolating the classic-CLI scrollback problem. The underlying premise is still present on current main: hermes_cli/config.py:1892 defaults the setting to 1.0, and cli.py:15227 passes it to prompt_toolkit's refresh_interval.

Problems

  • The patch contains unrelated config reversions. Current main preserves string-valued settings in hermes_cli/config.py:8205-8290; the PR-head replacement at hermes_cli/config.py:8184-8194 restores blanket coercion, changing values such as approvals.mode="off" into a boolean.
  • tests/hermes_cli/test_config.py:1323-1328 currently asserts the 1.0 default. The PR changes only hermes_cli/config.py, so the intended default change needs a corresponding test update.

Suggested changes

  • Salvage only the cli_refresh_interval default/comment into current hermes_cli/config.py, retaining the current set_config_value() coercion guard.
  • Update the focused config-default test with the new expected value.

This is an automated hermes-sweeper review.

Comment thread hermes_cli/config.py
# Set to a positive value (e.g. 1.0) if the idle status-bar clock
# going stale bothers you — users on emulators without the
# auto-scroll issue can opt in.
"cli_refresh_interval": 0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the focused default-config test as part of this change: current tests/hermes_cli/test_config.py:1323-1328 explicitly asserts cli_refresh_interval == 1.0, while this PR changes only the config file.

Comment thread hermes_cli/config.py
coerced_value = float(value)

value = coerced_value
# Convert value to appropriate type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please retain current main's typed-setting guard (_default_value_for_key and the string preservation at current hermes_cli/config.py:8205-8290). This blanket coercion changes string enum values such as approvals.mode="off" into boolean False, which is unrelated to the refresh-default fix.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit labels Jul 16, 2026
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

One PR, #63992, directly addresses Issue #63895 by changing the classic CLI's idle refresh default from 1.0 to 0, which targets the periodic redraw identified as the scroll-hijack cause. Its full diff also includes unrelated configuration additions and reversions, while changing no tests.

Related pull requests

  • fix(cli): disable background redraw by default to prevent scroll hijack (#63895) #63992 partial — (+49/-41) — n/a: The diff changes display.cli_refresh_interval from 1.0 to 0 and documents opt-in refresh, directly addressing the reported idle auto-scroll, but it also adds unrelated settings and reverts string-preserving config coercion, including behavior needed for values such as approvals.mode="off"; it does not update the focused default test. The contributor's COMMENTED keep_open review recommends salvaging only the refresh-default/comment change, retaining the current coercion guard, and updating tests/hermes_cli/test_config.py:1323-1328.

Duplicates

The core cli_refresh_interval default change in #63992 substantially overlaps #53655, which the issue discussion identifies as implementing the same 1.0-to-0 change; #63992 additionally carries unrelated configuration changes.

Suggested consolidation

Keep #63992 open with a salvage path, consistent with the contributor's keep_open review: rebase onto current main, retain only the cli_refresh_interval default/comment change, preserve the current set_config_value() string-coercion guard, and update the focused config-default test. Resolve its duplication with #53655 after that cleanup; no listed PR can presently be recommended for closure as a clean duplicate because only #63992 was provided for direct PR-level verification.

Complex graph

flowchart LR
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I63895(["issue #63895 (open)"])
    P63992["PR #63992 (open)"]
    P63992 -.->|partial| I63895
    class I63895 open
    class P63992 open
    class P63992 target
    click I63895 "https://github.com/NousResearch/hermes-agent/issues/63895"
    click P63992 "https://github.com/NousResearch/hermes-agent/pull/63992"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 8 kB of PR diffs, 2 kB of issue/PR text, 2 kB of discussion (3 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

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 sweeper:blast-broad Sweeper blast radius: broad — a core path most sessions hit sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Terminal autoscrolls to bottom even when agent output is finished, blocking history review

4 participants