When running gog gmail search with a query that combines in:spam and is:unread, the is:unread filter is ignored and all spam threads are returned (up to the API's 500-result cap).
To Reproduce
bashgog gmail search "in:spam is:unread" --account user@gmail.com --max 1000 --json | jq '.threads | length'
Returns 500 (full API cap). Expected: only unread threads.
Expected behavior
Only unread threads in spam should be returned, matching the count visible in the Gmail web UI.
Actual behavior
All spam threads are returned regardless of read status. The is:unread operator appears to be ignored when combined with in:spam.
Workarounds attempted
gog gmail messages search "in:spam is:unread" — same behavior
Post-fetch filtering via jq on labelIds | contains(["UNREAD"]) — works but requires fetching all 500 results first
Environment
Account type: personal Gmail (@gmail.com)
gog --version
v0.11.0 (91c4c15 2026-02-15T03:29:18Z)