Repository navigation
fix(agents): read the Claude login without a keychain prompt - #19
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/securityand 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
/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.jsonfallback stays.securityoutput (plain text or hex)../build.shandswift test(73 tests) pass. Not checked yet against the real keychain prompt: that needs Menew running with Claude limits on.🤖 Generated with Claude Code