Skip to content

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

@TuringTutee

Description

@TuringTutee

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.

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentuiperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions