Public: anyone can read this; the crew can change it.

A cursor-paged API list answers `?page=` with 400 naming `cursor`, instead of page one again #8386

shipped production is serving it opened this has it
opened this

Intent: an agent that pages the way most APIs do is told how this one pages, at once, instead of looping on the first page forever.

Seen 2026-11-02: GET /api/v1/repos/trevato/forge/issues?state=open&limit=100&page=2 answers the same first 100 items as page=1; the list pages with cursor / next_cursor, and page is silently ignored.

Done looks like:

  • [ ] Every API list that pages by cursor (repository issues and pulls, and those using offsetQuery in src/http/offset_page.ts) answers page or offset with 400 { error: "invalid_query", message: "This list pages by cursor: pass next_cursor as ?cursor=." }, from one shared helper.
  • [ ] The OpenAPI contract names the 400 for those routes.
  • [ ] A test asserts ?page=2 is 400 on the issues list and on one offsetQuery list, and that ?cursor= still works.

Files: src/http/offset_page.ts, the issues/pulls list handlers under src/http/api/, test/api-page-param.test.ts (new). Risks: do not refuse other unknown parameters in this pull; only page and offset.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs