Skip to content

Fix Cursor Arc cookie import and access errors#374

Open
jperezr21 wants to merge 1 commit intosteipete:mainfrom
jperezr21:codex/fix-cursor-arc-cookie-import
Open

Fix Cursor Arc cookie import and access errors#374
jperezr21 wants to merge 1 commit intosteipete:mainfrom
jperezr21:codex/fix-cursor-arc-cookie-import

Conversation

@jperezr21
Copy link

@jperezr21 jperezr21 commented Feb 14, 2026

Summary

  • add Arc-specific Chromium cookie import/decrypt path for Cursor sessions
  • propagate browser cookie access-denied as a dedicated Cursor error
  • expand recognized Cursor session cookie names
  • harden Arc decrypt by stripping the 32-byte prefix only when it matches host-key SHA-256
  • tighten cursor domain matching to exact/suffix rules
  • add tests for likely/non-session cookie name detection

Validation

  • ./Scripts/compile_and_run.sh
  • swift test --filter CursorStatusProbeTests
  • swift run CodexBarCLI usage --provider cursor --log-level debug

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49afa43c77

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +23 to +27
"session",
"__recent_auth",
"__wuid",
"workos_id",
"__kduid",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Narrow Cursor session cookie heuristics

Including very generic names like session, __wuid, and workos_id in the session-cookie allowlist makes importSession return on cookies that are not guaranteed to authenticate a user, and that short-circuits the browser scan before later browsers are tried. In fetch, a false-positive from the first browser can lead to .notLoggedIn (or fallback to stale stored cookies) even when another browser in the configured order has a valid Cursor login.

Useful? React with 👍 / 👎.

Comment on lines +164 to +166
throw BrowserCookieError.accessDenied(
browser: browser,
details: "\(browser.displayName) Safe Storage keychain item is not accessible.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish missing Arc key from denied keychain access

This path throws .accessDenied whenever no safe-storage label yields a password, but findGenericPassword returns nil for both true permission denials and non-denial cases like missing/renamed keychain items. Treating all misses as access-denied causes BrowserCookieAccessGate.recordIfNeeded to suppress retries and surfaces a misleading “allow Keychain access” error when the actual issue is key lookup, not user denial.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant