bug(calendar): events --page with several calendars sends one calendar's token to all of them

Open
#1,281 1 comment 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@goutamadwant is already working on this.

Since Oct 31, 2026.

  • #1285 by @goutamadwant — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start with internal/cmd/calendar_list.go at the loadPagedItems(page, …) call around line 168, then check the calendar events command's tests. Confirm how nextPageTokens represents per-calendar tokens and how multi-calendar --page input is handled. Done means a token from one calendar no longer causes the other calendars' requests to fail silently; an open linked pull request already addresses this issue.

Written by the indexing model from the issue text.

Description

clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2

Summary

With --cal/--calendars/--all, --page is passed to every selected calendar's events.list. A page token belongs to one calendar, so the others reject it. Each rejection is only a stderr line, and the command exits 0.

Current (v0.47.1)

gog calendar events --cal 1 --cal 2 --page <token from calendar 1>
# calendar <calendar 2 id>: googleapi: Error 400: Invalid page token value., invalid
# No events          (exit 0)

calendar_list.go#L168 calls loadPagedItems(page, …) with the same page for each calendar. The JSON output's nextPageTokens lists tokens per calendar, but there is no way to pass one back for its calendar.

Suggested

Either reject --page with more than one calendar (pointing to --all-pages), or accept per-calendar tokens, such as --page CALENDAR_ID=TOKEN (repeatable), matching nextPageTokens.

Environment

gog v0.47.1 (main at 82e7fd6). Reproduced against a local fake of the Calendar API through GOG_GOOGLE_API_BASE_URL.

Dominant language
Go
Stars
8.5k
Forks
721
Avg merge
17h 48m
Merged PRs (30d)
52

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from openclaw/gogcli

All issues in openclaw/gogcli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.