opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[Bug] TUI scroll position resets to session start after approving commands that exceed terminal height

Open TuringTutee opened this issue 1 week ago • 4 comments

Description

After upgrading to v1.0.223, when approving a bash command whose output exceeds the terminal's vertical space, the TUI resets scroll position to the first message in the session instead of staying at the current position.

Steps to Reproduce

  1. Start a session with several messages (enough to require scrolling)
  2. Have Claude execute a command that produces output taller than the terminal window
  3. Approve the command (press y or Enter)
  4. After command completes, observe scroll position

Expected Behavior

TUI should remain scrolled to the current message/command output area.

Actual Behavior

TUI jumps to the first message in the session, forcing user to scroll through entire conversation history to return to current context.

Environment

  • opencode version: v1.0.223
  • OS: Linux
  • Terminal: WezTerm

Notes

This is a regression - did not occur in previous versions. Particularly disruptive in long sessions.

TuringTutee avatar Jan 05 '26 01:01 TuringTutee