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

未关闭 适合新手
#166 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@prakersh 已经在做这个了。

开始于 2026年11月25日。

  • #169 来自 @prakersh —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go, macos, sqlite

调研方向

在 Go 源码中搜索日志字符串 SQLite token is opaque; preferring keychain JWT,找到 Cursor 凭据提供程序,以及 SQLite 读取器旁边的 macOS Keychain 查询。先阅读该查询:目前它使用 macOS 用户名作为账户来查询服务,因此应扩展它,使其在回退到不透明的 SQLite token 之前也尝试账户 cursor-user(或仅按服务查询)。完成标准是:cursor-agent login 后能够获取存储在 cursor-user 下的 Keychain 项目,并通过测试或使用按此方式填充的 Keychain 手动运行来验证。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Go
星标
756
派生
65
平均合并
9 天 4 小时
30 天内合并 PR
1

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

onllm-dev/onWatch 的其他 Issue

查看 onllm-dev/onWatch 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。