errSecItemNotFound couldn't find your saved login in the macOS keychain

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

started getting the following error when running agent:

Error: Cursor couldn't find your saved login in the macOS keychain (errSecItemNotFound, security exit code 44).

Log out and sign back in to refresh your saved login: run \`agent logout\`, then start agent again. If your keychain is locked, first run \`security unlock-keychain\`.

i tried agent logout&&security unlock-keychain but issue still occurs.

env:

  • darwin arm64/v8
  • macos tahoe 26.5.2 (25F84)
  • agent version 2026.07.23-e383d2b

I removing the CLI:

sudo rm /usr/local/bin/cursor rm -r ~/.local/share/cursor-agent/
sudo rm /usr/local/bin/cursor rm  ~/.local/bin/cursor-agent

and reinstall using:

curl https://cursor.com/install -fsS | bash

but issue persists.

When i try to log in, i see a different error by seems to be related to inability to store cursor auth in keychain:

agent login

Starting login process...
Authenticating with Cursor...
Waiting for browser authentication...
If your browser didn't open, use this link:
https://cursor.com/loginDeepControl?challenge=[redacted]&uuid=[redacted]&mode=login&redirectTarget=cli

Press q to show a QR code to log in from another device.
Failed to store authentication tokens. Please try again.

Steps to Reproduce

run agent

Operating System

MacOS

Version Information

About Cursor CLI

CLI Version         2026.07.23-e383d2b
Model               Auto
Subscription Tier   Unknown
OS                  darwin (arm64)
Terminal            apple-terminal
Shell               zsh
User Email          Not logged in

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey there!

Browser auth is succeeding, but the CLI can’t write the tokens into your macOS login keychain. That’s why reinstall and agent logout don’t help.

Quickest unblock - store credentials in a file instead of the keychain:

export AGENT_CLI_CREDENTIAL_STORE=file
agent login

Add that export to your ~/.zshrc so it sticks. Tokens land in ~/.cursor/auth.json with restricted permissions.

Alternatively, clear the stuck keychain items, then log in again:

security delete-generic-password -s cursor-access-token -a cursor-user
security delete-generic-password -s cursor-refresh-token -a cursor-user
security delete-generic-password -s cursor-api-key -a cursor-user
agent login

(Or delete any cursor entries under your login keychain in Keychain Access.)

We’ve let the team know and this is an issue we’re tracking. I’ll post here when there’s an update.

hey Mohit,

i ended up using a different command i found in your previous forum comment to kick-start it:

env -i HOME="$HOME" PATH="$PATH" TERM="$TERM" agent

now all is working. thanks for the info about where cursor stores its auth on darwin and how to control it, very helpful!