You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tui: session scrollback stops after the latest 20 messages #44597
The OpenCode 2 TUI only exposes the latest 20 messages in an existing session. Scrolling to the top does not load older messages, preventing access to the full stored transcript.
Environment
opencode version: v0.0.0-beta-18045
OS: Darwin 25.5.0, arm64
Terminal: TERM_PROGRAM=tmux, TERM=tmux-256color, COLORTERM=truecolor during the affected OpenCode session; the current diagnostic subshell reports Ghostty with TERM=xterm-256color
Shell: /bin/zsh
Install/channel: beta, installed as opencode2
Active plugins: None configured.
Reproduction
Launch opencode2.
Open or continue a session containing more than 20 messages.
Scroll upward to the oldest visible message.
Continue attempting to scroll upward.
Expected Behavior
Reaching the oldest currently loaded message should fetch earlier messages, allowing the complete stored session transcript to be viewed.
Actual Behavior
Scrolling stops at the oldest message in the initial batch, approximately 20 messages from the end of the session. Older messages remain stored but cannot be reached in the TUI.
packages/client/src/solid/data.ts sets messagePageLimit = 20 and provides a loadMore() API. However, packages/tui/src/routes/session/index.tsx virtualizes the loaded transcript without invoking loadMore() when the user reaches the top.
The referenced commit changed initial loading from up to 200 messages to paginated batches of 20. No history-limit setting or known workaround was found.
Addressed by #44656. The V2 TUI now requests the next server-side message page when scrollback reaches the oldest mounted row, preserves the visible anchor while prepending history, and continues first/previous-message navigation across page boundaries. Regression coverage also pins single-flight loading, session-switch safety, and failed-request handling. Closing as resolved on the v2 branch.
Activity
opencode-agent commentedon Aug 24, 2026
Addressed by #44656. The V2 TUI now requests the next server-side message page when scrollback reaches the oldest mounted row, preserves the visible anchor while prepending history, and continues first/previous-message navigation across page boundaries. Regression coverage also pins single-flight loading, session-switch safety, and failed-request handling. Closing as resolved on the v2 branch.