Repository navigation
Description
Summary
cf r2 objects list --local --start-after first succeeds and includes first. A local script that resumes a listing from a saved key can process that key twice.
Steps to reproduce
Use the CLI described under Runtime or environment. Run these commands in a new temporary directory. They use a disposable local R2 bucket and require no Cloudflare credentials.
cf r2 objects put first --body sample --bucket-name sample-bucket --local --persist-to state
cf r2 objects put second --body other --bucket-name sample-bucket --local --persist-to state
cf r2 objects list --start-after first --bucket-name sample-bucket --local --persist-to stateExpected behavior
The listing contains only objects whose keys sort after first. If local mode does not offer this filter, the CLI gives an explicit unsupported-option error before emitting a successful listing.
Actual behavior
Both CLI builds exited 0 and returned first and second in the JSON array. A control that requested a single object and reused its reported cursor returned only second on the next page.
Runtime or environment
- macOS 27.2 arm64, Node.js 26.13.1, npm 12.2.2.
- Published
cf1.0.0-rc.1 and the currentmainCI package, both with bundled Miniflare 5.20261117.0-beta. The CLI transport at that revision forwards the API query to Local Explorer. - A separate direct probe of the Local Explorer endpoint on Miniflare 5.20261118.0-beta also returned both keys with
start_after=first.
Evidence
- Expected source:
cf r2 objects list --helpdescribes--start-afteras the lower key boundary, and the List Objects API reference definesstart_afterfor lexicographic continuation. - Failure source: The command sequence above returns both keys with status 0. The Local Explorer implementation handles prefix, delimiter, cursor, and page size. Its narrower listing support is consistent with the direct endpoint result.
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
Restoration check
With the same bucket contents, request a listing after first. A successful response contains only second. If the combination remains unsupported, the command exits nonzero and identifies --start-after as unavailable in local mode. Cursor pagination still succeeds.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: An accepted filter returns extra rows under local simulation, which can hide incorrect resume behavior in scripts.
- Workaround status: available
- Workaround basis: In the same local bucket, paginating from the beginning and reusing a cursor advanced past the boundary correctly.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsUntriaged
Activity
workers-devprod commentedon Nov 19, 2026
Automated triage
Issue assessment
bug(high)product:r2(high)package:miniflare(high)feature:local-explorer(high)Actionability and missing information
Local R2 listing silently ignores --start-after despite it being documented as a lower key boundary; a credential-free local reproduction returns both keys with exit 0 and a direct Miniflare endpoint probe reproduces it; report includes versions, steps, expected and actual behavior.
Reproduction reason: The report gives concrete credential-free commands with a persistent local bucket and a direct Miniflare endpoint probe showing local listing returning keys at or before the start-after boundary, so reproduction can be attempted.
Reproduction
Evidence and attempted steps
Steps attempted:
git clone --depth 50 https://github.com/cloudflare/workers-sdk.git /workspace/workers-sdkcd /workspace/reproduction-output/project && pnpm install --no-frozen-lockfilecd /workspace/reproduction-output/project && node reproduce.mjsExpected behavior: The local listing requested after
first(CLI--start-after, forwarded by the CLI's local runtime to Miniflare's Local Explorer) should contain only keys sorting strictly after "first" (i.e. only "second"), or fail loudly identifying the option as unsupported in local mode.Observed behavior: GET /cdn-cgi/local/explorer/api/r2/buckets/sample-bucket/objects?start_after=first returned HTTP 200 with BOTH keys "first" and "second" — identical to the unfiltered baseline listing. The option is silently dropped (the endpoint's query schema accepts only prefix/delimiter/cursor/per_page). Control: per_page=1 plus the returned cursor returned only "second" on the next page, matching the issue's control observation and proving cursor pagination works while start_after is ignored.
Artifact: Download reproduction archive (Cloudflare Access required).
This summary was generated by an LLM and may contain errors. Please verify its findings.
Triage bot commands and options
Repository collaborators with write or admin access can trigger actions by commenting on this issue:
@workers-devprod reproduce: Attempt to reproduce the issue using its description and recent comments.