Constantly reoccuring keychain prompt for "Claude Code-credentials"
Summary
Many times a day, the same keychain prompt appears from macOS. They often appear even when I don;t actively click on CodexBar from the menu. It doesn't just show upon regular background refresh, too, since it occurs less frequently than my set 2/5 minute reset.
Clicking "Always Allow" prevents the prompt from occurring every time I open the app from the menu, but it does not prevent the prompt from occurring throughout each day at various points.
Similar issues
This issue is not the same symptom as #1823, which reports an error whereas my issue is a regular request from macOS. #1161 reports needing to relogin to Claude, but this issue only requires macOS password. #1844 addresses CodexBar opening the browser, which I have not experienced.
Environment
Claude usage source: Auto Macbook Pro 2024, 24gb RAM, M4 CodexBar 0.42.1 (and for at least a week prior) Claude Code version: numerous
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 13, 2026, 1:25 AM ET / 05:25 UTC.
Summary This issue remains necessary: v0.42.1 reportedly triggers background authorization prompts despite the established only-on-user-action policy, and although current main retires a plausible interactive CLI reader, no fix commit or packaged current-main reproduction proves the symptom resolved. Likely related people are @steipete (medium confidence) and @artuskg (medium confidence) based on Claude credential and no-UI Keychain history.
Reproducibility: no. live current-main reproduction is established, but there is a credible source-level path: an affected build could execute /usr/bin/security ... -w during background credential discovery without interaction gating. Packaged-app attribution is still required for high-confidence reproduction.
Ways to help us reproduce this
- Include the exact command, prompt, or workflow that triggered it.
- Add expected vs actual behavior.
- Include redacted logs or terminal output.
Next step Route this to the Claude credential owners for packaged current-main reproduction and security-boundary attribution; a repair should not be queued until the requesting executable and remaining prompt-capable path are confirmed.
Maintainer decision needed
- Question: What packaged current-main evidence is sufficient to confirm whether CodexBar or one of its helpers still triggers this background Keychain prompt?
- Rationale: Source shows a plausible retired path but does not prove which executable and call site produced the reporter’s v0.42.1 prompts or whether current main resolves them.
- Likely owner: steipete — They are the strongest available owner for packaged-app validation and the Claude credential boundary.
- Options:
- Capture packaged attribution (recommended): Reproduce with a freshly packaged current-main app and collect a redacted screen recording plus unified-log attribution identifying the requesting executable and Claude credential reader.
- Treat reader retirement as sufficient: Accept the current-main strategy fallback as the fix and close only after identifying its exact commit and proving release or main-only provenance.
Security Needs attention: The issue plausibly exposes an unintended interactive credential-access path during background work and needs executable-level attribution before repair or closure.
Review details
Best possible solution:
Keep Security.framework as the sole production reader, guarantee that every scheduled Claude credential probe uses no-UI queries, add upgrade coverage for retired persisted reader settings, and expose a redacted diagnostic showing the reader, interaction context, and requesting executable without requiring Terminal investigation.
Do we have a high-confidence way to reproduce the issue?
No live current-main reproduction is established, but there is a credible source-level path: an affected build could execute /usr/bin/security ... -w during background credential discovery without interaction gating. Packaged-app attribution is still required for high-confidence reproduction.
Is this the best way to solve the issue?
Yes in direction: production background reads should use the existing no-UI Security.framework path, not an interactive CLI reader. The final patch boundary should be chosen only after confirming whether current main still prompts and which executable requests access.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The current-main reader fallback may already fix the release-only behavior, but closing without a fix SHA or packaged verification could hide a remaining Security.framework, helper-signing, or periodic-call-site prompt.
- The screenshot identifies the requested Keychain item but not the requesting executable path, so another CodexBar helper or installed app copy remains possible.
- Changing credential reads without upgrade testing could make Claude OAuth silently unavailable for users whose only usable credentials remain in the Claude CLI Keychain item.
Codex review notes: model internal, reasoning high; reviewed against c852c135e10c.
Label changes
Label justifications:
P2: The recurring authorization dialog is a significant current-release bug with limited Claude-provider scope and no proven total outage.impact:auth-provider: The reported prompt targets the Claude OAuth credential source used by the provider.impact:security: Unexpected background requests cross the macOS Keychain authorization boundary and require caller attribution.impact:ux-friction: Repeated system password prompts interrupt normal background operation despite the provider remaining usable.
Evidence reviewed
Security concerns:
- [medium] Attribute the background credential requester —
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthCredentials+SecurityCLIReader.swift:1051Determine whether the packaged app, bundled CLI, or another installed copy invokes the Keychain request; changing the wrong reader could leave the prompt or break credential availability. Confidence: 0.82
What I checked:
- Plausible prompting path: The experimental reader invokes
/usr/bin/security find-generic-password -w; its own documentation says interaction context is diagnostic only and does not prevent execution for background callers. (Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthCredentials+SecurityCLIReader.swift:1051, c852c135e10c) - Current-main mitigation: Current main converts any persisted experimental Security CLI strategy back to Security.framework and defaults new installations to Security.framework, but provenance establishing when this changed was unavailable. (
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthKeychainReadStrategy.swift:359, c852c135e10c) - Established prompt policy: The stored default is
onlyOnUserAction; current main applies background gates and no-UI Security.framework queries around Claude credential discovery. (Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthKeychainPromptMode.swift:434, c852c135e10c) - Background call site: Credential-existence discovery calls the optional Security CLI reader before the later background prompt gate, which explains how that reader could bypass the normal no-UI path when enabled in an affected build. (
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthCredentials.swift:3309, c852c135e10c) - Historical recurrence: https://github.com/steipete/CodexBar/issues/108 reported the same repeated
Claude Code-credentialsdialog after selecting Always Allow on v0.16.1; the current report shows the symptom recurred on v0.42.1. - Release state: The latest shipped release is v0.42.1 at 3e05988f5c5fc1dff70c7a58bd659208cf34c840, while the inspected current main is c852c135e10cfdfb047895bd13c1a4425ded4afb; no specific post-release fix SHA could be established, so implemented-on-main closure is not justified. (
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthKeychainReadStrategy.swift:359, c852c135e10c)
Likely related people:
- steipete: The repository owner has broad responsibility across the Claude provider and release history, making them the strongest available routing candidate for the credential-boundary decision and packaged reproduction. (role: repository owner and recent area contributor; confidence: medium; commits: c852c135e10c; files:
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthCredentials.swift,Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthKeychainReadStrategy.swift) - artuskg: Release history credits work enforcing no-UI Keychain reads more reliably, directly adjacent to the reported background-prompt behavior. (role: recent adjacent contributor; confidence: medium; files:
Sources/CodexBarCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthCredentials.swift)
How this review workflow works
- ClawSweeper keeps one durable marker-backed review comment per issue or PR.
- Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
- A fresh review can be triggered by eligible
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch. - PR/issue authors and users with repository write access can comment
@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto request a fresh review only. - Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
- Maintainer-only repair and merge flows require explicit commands such as
@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review. - Maintainers can comment
@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.
Confirming this same symptom on 0.42.1 (build 103), macOS.
Root cause on my machine: defaults read com.steipete.codexbar claudeOAuthKeychainPromptMode was always instead of onlyOnUserAction. With refreshAllProvidersOnMenuOpen=1 and a 15-minute background refresh timer, this meant essentially every menu-bar click or background tick asked macOS for a fresh Keychain authorization for Claude Code-credentials — producing a click -> password prompt -> menu closes -> re-click -> prompt again loop.
Workaround that fixed it for me:
defaults write com.steipete.codexbar claudeOAuthKeychainPromptMode -string "onlyOnUserAction"
then quit and relaunch CodexBar. No more prompts on click or background refresh since.
Log evidence before the fix, if useful — repeated keychain reads with abnormal duration (seconds instead of near-instant) despite interactive=false/allowKeychainPrompt=false on the call, plus one status=-128 (errSecUserCanceled):
[DEBUG] com.steipete.codexbar.claude-usage: Claude keychain data read start interactive=false process=CodexBar service=Claude Code-credentials
[DEBUG] com.steipete.codexbar.claude-usage: Claude keychain data read result duration_ms=54232.62 interactive=false process=CodexBar service=Claude Code-credentials status=0
...
[DEBUG] com.steipete.codexbar.claude-usage: Claude keychain data read result duration_ms=3122.43 interactive=false process=CodexBar service=Claude Code-credentials status=-128
This lines up with the automated review comment above — sounds like the always/onlyOnUserAction preference isn't reliably enforced at every call site, so resetting it manually is only a workaround, not a real fix. Posting in case the repro/workaround helps narrow it down or helps other people hitting this loop.
Why "Always Allow" doesn't stop it: there are actually two different prompts
Worked through this today. I think the reason "Always Allow" seems to not work is that CodexBar makes two different keychain requests for the same Claude Code-credentials item, and they're worded differently:
- "CodexBar wants to use your confidential information stored in 'Claude Code-credentials'"
- "CodexBar wants to access key 'Claude Code-credentials'"
If you click plain "Allow", it only says yes to that one request for this session. The other request is still blocked, so it pops up again later. That's why it feels random and never stops.
What fixed it for me: clicking "Always Allow" on every prompt (I got about 3 before they stopped). After that CodexBar cached the token itself and stopped asking. Full usage now shows with no more popups.
Two things I ruled out:
- Keychain wasn't locked (
security show-keychain-infosaidno-timeout). - Token wasn't actually expired —
claudein the terminal worked fine the whole time. CodexBar just couldn't read it until I said "Always Allow" to both requests. (The card said "OAuth token expired," which was misleading — it was really "not allowed to read it yet.")
Suggestion: make it one request instead of two, so a single "Always Allow" covers everything. If that's not possible, the warning before the prompt should tell people to click "Always Allow" (not "Allow") and mention a second, differently-worded prompt may follow.
Setup: CodexBar 0.42.1, macOS 26.5.2, Claude Code 2.1.208, source = Auto.
Hi @harjothkhara, I'm glad that worked. Unfortunately for me, I've entered my password and clicked "Always Allow" probably 15 or 20 times now. Just wanted to add that this fix likely won't work for everyone.
I’ve seen a similar “background agent wakes up and macOS asks for credentials again” pattern when a helper process was probing CLI/auth state more often than expected.
One useful way to narrow it down is to separate three cases:
- prompt appears only when opening the menu/UI;
- prompt appears on the configured refresh interval;
- prompt appears even when no visible refresh should be happening.
For case 3, I’d check whether any background status probe is launching claude, claude-code, gh, or another credentialed helper just to detect availability/version/account state. Even a harmless-looking --version, status, or “whoami” command can touch keychain depending on how the underlying CLI initializes.
If possible, adding temporary debug logs around each background credentialed command would help: timestamp, command family only, and whether it was triggered by UI open, timer refresh, or startup. That should show whether the keychain prompt correlates with a specific background probe instead of user action.
Workaround that helped me in a similar setup: disable/lengthen background refresh, restart the app, then re-enable features one by one until the prompt returns.
Hi @Phat-Po, I'm moderately confident that your fix worked in reducing the frequency of occurances on my own machine. Thanks!
However, this did not work in entirely eliminating the keychain popups for me. I'm curious to see if @harjothkhara's finding about separate keychain requests is the cause for why it slowed--but did not entirely eliminate--the issue.
Leaving this issue open accordingly.
Confirming this on the packaged CodexBar 0.42.1 app with executable-level attribution and a reproducible workaround.
Environment
- CodexBar 0.42.1 (installed at
/Applications/CodexBar.app, notarized release build) - Claude Code 2.1.209
- macOS 26.5.2 (25F84), Apple silicon
- One running/installed CodexBar copy was found; no
CodexBarCLIprocess was running
Observed behavior
The prompt named security, not CodexBar, and requested Claude Code-credentials. Unified logs attributed it to /usr/bin/security:
securityd: displaying keychain prompt for /usr/bin/security(...)
security: SecKeychainSearchCreateFromAttributes
security: SecKeychainSearchCopyNext
security: SecKeychainItemCopyContent
The prompt initially matched CodexBar's five-minute refresh cadence. During retries/startup it escalated into a prompt approximately every five seconds. Clicking Always Allow did not persist: /usr/bin/security was not added to the Keychain item's Access Control list, and the prompt returned.
At the time of reproduction, the relevant preferences were already restrictive:
claudeOAuthKeychainPromptMode = never
keychainAccessDisabled = 1
debugDisableKeychainAccess = 1
Despite those settings, leaving the Claude provider enabled allowed Auto mode to fall back to the Claude CLI. That delegated CLI path invoked /usr/bin/security, bypassing CodexBar's in-process Keychain policy. Disabling only the Claude provider immediately stopped the prompt loop while leaving Codex tracking enabled.
Workaround that restored Claude tracking
- Quit CodexBar.
- Disable the Claude provider to stop the retry storm.
- Run
claude auth logout, followed byclaude auth login, to recreate the macOS Keychain credential. - Verify
claude auth status --textcompletes without a Keychain prompt. - Re-enable the Claude provider while keeping CodexBar's direct Keychain access disabled.
After the clean login, this succeeded without prompting and returned both the five-hour and weekly windows:
codexbar --provider claude --source cli --format json
CodexBar was then relaunched with Claude enabled. Monitoring security/securityd showed no new Keychain helper activity, and the prompts remained gone.
Expected behavior
keychainAccessDisabled and a Claude prompt policy of never should cover delegated provider probes as well as in-process Security.framework reads. If a Claude CLI fallback would require interactive Keychain access, an automatic refresh should fail closed or enter a cooldown after the first denial/cancellation. It should not retry every refresh—or every few seconds during recovery.
This appears related to the retired Security CLI reader discussed in #1877, but the prompt-capable path here was the delegated Claude CLI fallback. A useful fix may be to propagate the no-prompt policy across that boundary, detect Keychain-denied/cancelled CLI results, and suppress automatic retries until explicit user action or a multi-hour cooldown.
No credential values, tokens, or account identifiers were collected.
I dont use claude code anymore, so I've been hitting deny and it continues to pop up.
CodexBar: 0.42.1 (103) MacOS 15.6.1
I had this issue with the very early versions of CodexBar but at some point there was a release that solved it and I stopped seeing them. Then a recent version update caused these to start again. Unfortunately I'm not sure exactly which version was the first to reintroduce these incessant keychain prompts, I think it was version 0.38.0. I'm certain I've been reproducing this on all versions since 0.40.0.
I'm on version 0.43.0 (140) now and it just occurred again.
MacOS 26.5 Tahoe
@CoreyCole disable claude provider in settings and you should stop getting these
i am also seeing this, and hitting always allow is useless
Root-cause closeout after #2191 and #2195: this was four independent prompt-capable paths, which explains why the earlier repair/sync fix did not stop every report.
- Startup bootstrap exception: app startup could temporarily bypass the stored Only on user action policy for an uncached Claude OAuth read. #2195 removes that exception and all
allowBackgroundPromptBootstrap/ startup-bootstrap plumbing. - Background Auto CLI preflight and delegated refresh: Auto planning ran
claude auth status --json, and expired CLI-owned credentials could trigger the delegated/statusrefresh. The Claude CLI can invoke/usr/bin/securityoutside CodexBar's prompt controls; the unified-log evidence reported here attributed the recurring prompt to that path. #2191 blocks both opaque CLI calls unless the stored Keychain prompt policy is Always. - Background MCP-only discovery: the experimental security-CLI reader could discover MCP-only state during a background data read. #2191 now gates that read using the stored prompt policy too.
- Repair/sync recovery: these were the paths fixed earlier by
c47a20a; that change did not cover the startup, CLI-preflight, delegated-refresh, or MCP-only paths above.
#2191 merged as 5f136af0899f9867165bae5b23b899065b2793f0; #2195 merged as 19e156251d45f51c0f4a78e039773d4fb9d1db3e. Together they close the remaining known background prompt routes under the default Only on user action policy.
This is now on main and will be in the next release build. Please reopen this issue if any Claude Code credentials prompt recurs on that build. If it does, please include the CodexBar version, whether the trigger was startup or refresh, and fresh unified-log attribution for the prompting process.
@steipete Confirmed recurrence on the latest release after the fixes cited in this issue.
Environment
- CodexBar 0.45.2 (109)
- Claude Code 2.1.211
- macOS 26.5.2 (25F84), Apple silicon
- Claude usage source: Auto
- Claude prompt policy:
onlyOnUserAction debugDisableKeychainAccess: absent/false during the recurrence
Exact sequence from unified logs
- On 2026-07-20 at 21:24:22 local time, opening the CodexBar menu caused:
ACL partition mismatch: client teamid:Y5PE65HELJ ACL ("apple-tool:") displaying keychain prompt for /Applications/CodexBar.app(4186) - At 21:24:28, macOS recorded:
user approved 'always allow' for /Applications/CodexBar.app(4186) adding XARA partition 'teamid:Y5PE65HELJ' to list user approved XARA access for 'teamid:Y5PE65HELJ' - After that successful grant,
/usr/bin/securitymodified Keychain content multiple times. The clearest later event was 2026-07-21 at 10:19:54:
A Claude process was active in the same log window. Historical unified logs do not expose the parent PID or the modified item's service name, so this record alone does not establish that Claude launched PID 21304 or that this specific write targeted the Claude credential.security[21304] SecKeychainItemModifyContent no previous integrity acl exists; making a new one ... committed .../Library/Keychains/login.keychain-db - At 10:37:11, opening CodexBar again reproduced the same failure:
ACL partition mismatch: client teamid:Y5PE65HELJ ACL ("apple-tool:") displaying keychain prompt for /Applications/CodexBar.app(60657) - At 10:37:20, macOS again recorded Always Allow and re-added
teamid:Y5PE65HELJ.
The logs establish that Always Allow succeeded, but the Claude credential's ACL was later back to apple-tool: only, causing CodexBar to prompt again. This is not a denied or missed grant.
Please reopen and investigate preservation or recovery of CodexBar's ACL access after the Claude credential changes. No credential values, account identifiers, or tokens were collected.
Another 0.45.2 recurrence with unified-log attribution, plus four mitigations that do not work. This corroborates #367 and the 2026-07-21 report above.
Environment
- CodexBar 0.45.2 (109)
- Claude Code 2.1.218
- macOS 26.5.2 (25F84), Apple M5
- Claude usage source: initially Auto, later
claudeCLI - Stored
claudeOAuthKeychainPromptMode = never debugDisableKeychainAccessabsent during the recurrences
Attribution
securityd [integrity] ACL partition mismatch: client teamid:Y5PE65HELJ ACL ("apple-tool:")
securityd [integrity] asking user about XARA partition for 'teamid:Y5PE65HELJ'
securityd [kcacl] displaying keychain prompt for /Applications/CodexBar.app(<pid>); ACL: <AclValidationContext(action:65538)SUBJECT[not-init]OBJECT[not-init]>
securityd [integrity] adding XARA partition 'teamid:Y5PE65HELJ' to list
action:65538 (0x10002) is the ___PARTITION___ authorization, not a normal decrypt (24). Prompt events on 2026-07-27 (local time): 07:46:44, 07:46:53, 08:48:49, 09:28:50, 10:22:39.
Correlation with the Claude Code rewrite
com.steipete.codexbar → ClaudeOAuthClaudeKeychainFingerprintV2.modifiedAt tracks the item's mdat:
modifiedAt = 2026-07-27 10:20:08 (Claude Code rewrote the item)
XARA prompt = 2026-07-27 10:22:39 (next scheduled refresh)
cdat has been unchanged since 2026-03-30, so the item is updated in place, yet the partition list is back to apple-tool: only. The Claude Code 2.1.218 binary contains add-generic-password (8 occurrences), delete-generic-password (6) and the -U / -T flags, consistent with #367's analysis.
3 of the 4 prompt events had no preceding perform action for menu item in the CodexBar log, i.e. they were background reads despite the stored policy being never.
Mitigations tested
claudeUsageSource = claudeCLI— persists correctly and usage is still fetched, but the prompt is unchanged. The prompting read is therefore not the usage fetch.CODEXBAR_CLAUDE_SECURITY_CLI_KEYCHAIN=1— launched the bundled binary with the variable and confirmed it in the process environment. Ignored; prompt at 10:46:46 on that instance.claudeOAuthKeychainReadStrategy = securityCLIExperimental— the value does persist across launch on 0.45.2, but the prompt fired at 10:49:37 immediately after launch and the fetch did not complete while it was pending (usageRowsempty).debugDisableKeychainAccess = truein the App Group domain — could not be validated as a mitigation because it breaks the display:widget-snapshot.jsonusageRowsbecomes empty andhistory/claude.jsonstops recording, even withclaudeUsageSource = claudeCLI. Reverting restored both immediately. This matches #2425 / #2408.
The CLI is unaffected: codexbar usage --provider claude --source cli returns both windows with no prompt, because the keychain read is performed by the claude process, which matches apple-tool:.
Suggestion
The partition reset is outside CodexBar's control, so the recoverable side is the read. Detecting the partition mismatch and falling back to a non-prompting path (delegated claude, or the credentialsFile source) instead of raising the XARA dialog on a background refresh would remove the user-visible loop. Failing closed with a cooldown, as suggested earlier in this thread, would also be enough.
No credential values, tokens, or account identifiers were collected.
@steipete requesting that this issue be reopened, since it has been mentioned by others as not fixed (#1823, #2380, https://github.com/steipete/CodexBar/issues/2115#issuecomment-5086798072 https://github.com/steipete/CodexBar/issues/2115#issuecomment-5036167018)