anomalyco / anomalyco/opencode

app: /fork dialog only lists currently loaded messages

Open
#45,242 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 26, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

In the desktop app, /fork opens “Fork from message” with a list of user prompts from the current session. That list is not the full session. It only shows whatever is already in the client message cache.

If I stay in a session from the first turn to the last, the dialog has every turn. After I restart the app and open the same session, it only has the latest turns. If I scroll the timeline all the way to the top and open /fork again, the missing turns come back.

The dialog reads data.session.message.list(). That store is paged: first sync loads the newest 20 messages, and older pages are fetched only when the timeline scrolls up (loadMore). Fork is a separate picker, so it should not depend on how far I have scrolled.

I would like to fix this. Suggested approach: when the dialog opens, fetch the session’s user messages itself (same idea as session export) and search/select against that list. Do not drain the timeline cache just to populate the picker. If the selected message is not in the timeline store, use the fetched copy instead of data.session.message.get().

Other options: keep calling loadMore until the timeline cache is complete, or add a dedicated fork-points API. I think the first of those couples the dialog to timeline paging, and the second is more than this bug needs.

TUI’s fork dialog uses the same list() store, so it may have the same gap.

Plugins

none related

OpenCode version

desktop beta (current dev / V2)

Steps to reproduce
  1. Start a session with at least 3–4 user turns and leave it without restarting.
  2. Run /fork. The dialog lists every turn.
  3. Quit and reopen the desktop app, then open the same session (stay at the bottom).
  4. Run /fork again. Only the latest turns are listed.
  5. Scroll the timeline to the first message, then run /fork again. The earlier turns reappear.
Screenshot and/or share link

I'll attach before/after screenshots shortly (full list vs latest turns only).

Operating System

macOS

Terminal

n/a (desktop app)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.