opencode
opencode copied to clipboard
[Bug] TUI scroll position resets to session start after approving commands that exceed terminal height
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
- Start a session with several messages (enough to require scrolling)
- Have Claude execute a command that produces output taller than the terminal window
- Approve the command (press y or Enter)
- 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.