Cursor: keychain JWT not found when Cursor CLI stores it under account "cursor-user"

Open Beginner friendly
#166 0 comments 0 reactions 0 assignees View on GitHub

@prakersh is already working on this.

Since Nov 25, 2026.

  • #169 by @prakersh — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, macos, sqlite

Research direction

Grep the Go sources for the log string SQLite token is opaque; preferring keychain JWT to find the Cursor credential provider and the macOS Keychain lookup that sits next to the SQLite reader. Read that lookup first: today it queries the service with the macOS username as account, so extend it to also try account cursor-user (or query by service alone) before falling back to the opaque SQLite token. Done looks like keychain items stored under cursor-user being picked up after cursor-agent login, with a test or a manual run against a keychain populated that way.

Written by the indexing model from the issue text.

Description

On macOS (v2.14.17), Cursor Desktop stores an opaque cursor-safe-storage:v1 token in SQLite, so onWatch should fall back to the Keychain JWT. After cursor-agent login, the Keychain items cursor-access-token and cursor-refresh-token exist, but with account cursor-user, not the macOS username. onWatch doesn't detect them and keeps using the SQLite token, which fails with "unauthorized - invalid or expired token". When I copy the same items under the macOS username, onWatch logs "SQLite token is opaque; preferring keychain JWT" and polling works. Suggested fix: also look up account cursor-user, or search by service only.

Dominant language
Go
Stars
756
Forks
65
Avg merge
9d 4h
Merged PRs (30d)
1

Getting set up

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 onllm-dev/onWatch

All issues in onllm-dev/onWatch

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.