Repository navigation
Conversation
bee conversations list returns one page; reading a whole history means a paging loop in every client. --all follows next_cursor until it runs out and prints one combined response. --limit sets the page size, --cursor the starting point, and an empty page or a 1000-page cap stops the loop. CLI only: MCP callers already page one tool call at a time.
There was a problem hiding this comment.
🟡 Changes recommended
Empty terminal pages incorrectly preserve and return their cursor instead of null.
1 open finding
What changed in this PR
Adds automatic pagination to bee conversations list via --all.
Changes:
- Follows cursors while aggregating conversations.
- Adds pagination tests and CLI documentation.
| File | Description |
|---|---|
sources/resources/conversations/index.ts |
Implements --all pagination. |
sources/resources/conversations/index.test.ts |
Tests pagination behavior. |
README.md |
Documents the new flag. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const next = record["next_cursor"]; | ||
| cursor = typeof next === "string" && next.length > 0 ? next : undefined; | ||
| if (cursor === undefined || items.length === 0) { | ||
| break; | ||
| } |
There was a problem hiding this comment.
Good catch, fixed in ab2c0be. An empty page now ends the walk with next_cursor: null, so there is no pagination footer either. Only the 1000-page cap leaves a cursor in place, since that is the one case where more history is known to remain. The empty-page test now asserts next_cursor is null, and a new test checks the Markdown output has no ## Pagination section. Both fail on the previous commit and pass now. Full suite: 315 pass, 1 skip, 0 fail; typecheck clean.
…page An empty page that still carried a cursor ended the walk but left the cursor in the combined response, so --all printed next_cursor and a pagination footer for a page it had decided not to follow. Only the page cap now leaves a cursor in place. Review feedback on bee-computer#20.

What
Adds
--alltobee conversations list. It followsnext_cursoruntil the server stops returning one, then prints a single combined response:{ conversations, next_cursor: null, timezone }.--limitstill sets the page size and--cursorsets where to start.Why
listreturns one page (20 by default), so reading a whole history means every client writes the same paging loop. On a real account with 143 conversations over nine days,bee conversations list --jsonreturns 20;bee conversations list --all --limit 100 --jsonreturns all 143.This bit me while building on the CLI for the Amazon Developer Hackathon: a first pull came back with two days out of nine and nothing looked wrong.
bee changedwithout a cursor also only covers recent changes, solistis the only way to read a full history, and it shouldn't take a loop to do it.Details
--all(kind: "bool"); USAGE and README updated.next_cursoris missing or empty, when a page comes back empty (even if it carries a cursor), or after a 1000-page safety cap, so a misbehaving cursor can't loop forever. The combined response reportsnext_cursor: nullin every case except the cap, where more history is known to remain.bee_list_conversationsis unchanged: agents already page one tool call at a time, and returning a whole history in one tool result would be the wrong shape for them. The tool snapshot is untouched.--all, behaviour and output are byte-for-byte the same.Tests
Four new tests in
sources/resources/conversations/index.test.ts:[1, 2, 3], checking each request's query string--cursorwhen givennext_cursor: nullbun run typecheckandbun testpass locally (315 pass, 1 skip, 0 fail).Heads-up: as in #12, installing locally needed a workaround for #10 (
bun.lockresolves to a private registry). No lockfile changes are included in this PR.