Skip to content

tui: session scrollback stops after the latest 20 messages #44597

Closed

Description

@damnsamn

Summary

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

  1. Launch opencode2.
  2. Open or continue a session containing more than 20 messages.
  3. Scroll upward to the oldest visible message.
  4. 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.

The issue reproduces consistently.

Additional Context

Source inspection suggests this is a pagination regression introduced by commit 6cd3da1d4cdc9f39afc932adc9ab35d292b6c77a on August 23, 2026.

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.

Activity

  1. opencode-agent commented on Aug 24, 2026

    @opencode-agent
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions