Skip to content

[FEATURE]: TUI scroll buffer should not truncate old messages — breaks fork from history #30587

Closed as not planned

Description

@and0rl

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem

In long sessions, the TUI scroll buffer truncates older messages — scrolling up
reaches a hard limit before the beginning of the conversation. This makes it
impossible to:

  1. Review the full history of a session directly in the TUI
  2. Click on an early message to fork the session from that point

The fork-from-message feature exists and works, but it's only accessible by
clicking on a visible message. If the message is outside the scroll buffer,
it's effectively unreachable from the UI.

Current workaround

The only workaround is to use opencode session cat <id> or read the raw JSON
file to find the message, then manually edit the session file to create a fork.
This is cumbersome and not user-friendly.

Proposed Solution

One or more of the following:

  • Remove or significantly increase the TUI scroll buffer limit, keeping the
    full session history scrollable
  • Add a "jump to message" or search within session feature in the TUI
  • Add a opencode session fork <session-id> <message-id> CLI command
    so forks can be created without needing to scroll to the message visually

Expected behavior

Users should be able to scroll to any message in the session history and
fork from it, regardless of session length.

Activity

  1. github-actions commented on Jun 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. vpetrigo commented on Jun 8, 2026

    @vpetrigo

    There is a PR #26861 related to that issue. I would really appreaciate the feedback.

  3. D1ChangGeng commented on Jun 24, 2026

    @D1ChangGeng

    Confirming on v1.17.9: the TUI never calls loadMore/cursor pagination at all — it renders the initial limit: 100 page only, and session.first (scrollTo(0)) just jumps to the top of that loaded page, not the true beginning. Older messages are unreachable from the TUI even though they're all present in opencode.db. This blocks fork-from-history for any long session. PR #26861 looks directly relevant — would appreciate a review.

  4. github-actions commented on Aug 24, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  5. added a commit that references this issue on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions