anomalyco / anomalyco/opencode

Repeated session pagination cursor causes unbounded requests

Open
#49,496 1 comment 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 17, 2026.

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

Description

Description

The app session-list helper recursively follows every pagination cursor without remembering cursors it has already requested. If a remote, older, or incompatible server returns a non-empty page with the same next cursor twice, the app repeatedly requests that page and never finishes loading sessions.

Plugins

None

OpenCode version

1.18.31

Steps to reproduce
  1. Call listAllSessions with a session API whose first page contains data and returns cursor.next = "repeat".
  2. Have the repeat page also contain data and return cursor.next = "repeat".
  3. Count subsequent session.list calls.

Expected: session loading rejects the malformed pagination cycle with a clear duplicate-cursor error.

Actual: the helper requests the repeat page again and continues recursively without a termination condition.

Screenshot and/or share link

Not applicable; a two-page fake session API reproduces the repeated requests directly.

Operating System

All

Terminal

All

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.