Skip to content

fix(agents): read the Claude login without a keychain prompt - #19

Merged
Quost merged 1 commit into
mainfrom
claude/keychain-prompt
Nov 11, 2026
Merged

Quost merged 1 commit into
mainfrom
claude/keychain-prompt

Conversation

@Quost

@Quost Quost commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Problem

With Claude limits on, macOS kept asking for the login keychain password ("Menew wants to access Claude Code-credentials"), even after Always Allow.

Claude Code saves its login with /usr/bin/security and saves it again on every token renewal (on this Mac the item was last rewritten minutes ago). Each rewrite drops the access macOS had granted Menew. Menew also read the keychain on every fetch, every 5 minutes, so the prompt kept coming back.

Fix

  • Read the item with /usr/bin/security find-generic-password -s "Claude Code-credentials" -w, the same tool that saves it. The item trusts that tool, so macOS doesn't ask. The ~/.claude/.credentials.json fallback stays.
  • Keep the token in memory until it expires. It is forgotten when it expires or when Anthropic answers 401, so a renewed login is picked up on the next read.
  • The setting's description no longer says "macOS asks first", in all 5 languages. README Privacy and CHANGELOG updated.
  • Tests for parsing the login and decoding the security output (plain text or hex).

./build.sh and swift test (73 tests) pass. Not checked yet against the real keychain prompt: that needs Menew running with Claude limits on.

🤖 Generated with Claude Code

Claude Code saves its login with /usr/bin/security and saves it again on
every token renewal, which drops the "Always Allow" macOS gave Menew, so
the password prompt came back. Read the item through the same tool, which
the item trusts, and keep the token in memory until it expires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Quost
Quost merged commit c1bd64f into main Nov 11, 2026
11 checks passed
@Quost
Quost deleted the claude/keychain-prompt branch November 11, 2026 11:26
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