anomalyco / anomalyco/opencode
Repeated session pagination cursor causes unbounded requests
@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
- Call
listAllSessionswith a session API whose first page contains data and returnscursor.next = "repeat". - Have the
repeatpage also contain data and returncursor.next = "repeat". - Count subsequent
session.listcalls.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.