You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update keychain docs to reflect securityCLI as default (#15)
Update CLAUDE.md, CHANGELOG.md, KEYCHAIN_FIX.md, and
DEVELOPMENT_SETUP.md to reflect that /usr/bin/security CLI is now
the default keychain read strategy, eliminating prompt issues.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,8 +36,9 @@
36
36
- Menu: hide contextual provider actions while Overview is selected and rebuild switcher state when overview availability changes (#416).
37
37
38
38
### Claude OAuth & Keychain
39
+
-**Default to `/usr/bin/security` CLI for Claude keychain reads**, eliminating recurring macOS keychain password prompts after rebuilds/updates. Security.framework remains available as a user override.
39
40
- Use a `claude-code/<version>` User-Agent for OAuth usage requests instead of a generic identifier.
40
-
-Add an experimental Claude OAuth Security-CLI reader path and option in settings.
41
+
-Rename `.securityCLIExperimental` → `.securityCLI` (now the production default).
41
42
- Apply stored prompt mode and fallback policy to silent/noninteractive keychain probes.
42
43
- Add cooldown for background OAuth keychain retries.
43
44
- Disable experimental toggle when keychain access is disabled.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Macro support types live in `Sources/CodexBarMacroSupport/`, implementations use
70
70
### Authentication Chain
71
71
72
72
Providers authenticate via a fallback chain configured in their descriptor's `supportedSourceModes`:
73
-
1.**OAuth** — Token from macOS Keychain (Claude, Codex, VertexAI)
73
+
1.**OAuth** — Token from macOS Keychain (Claude, Codex, VertexAI). Claude defaults to `/usr/bin/security` CLI reader (avoids keychain prompts on rebuild); Security.framework available as user override.
74
74
2.**Web/Cookies** — Browser cookie extraction via SweetCookieKit (Cursor, Copilot, Gemini). Default to Chrome-only to avoid other browser prompts.
75
75
3.**CLI** — Parse stdout from CLI tools via PTY (Claude, Codex, Augment)
Copy file name to clipboardExpand all lines: docs/DEVELOPMENT_SETUP.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,15 @@ read_when:
8
8
9
9
# Development Setup Guide
10
10
11
-
## Reducing Keychain Permission Prompts
11
+
## Keychain Permission Prompts
12
12
13
-
When developing CodexBar, you may see frequent keychain permission prompts like:
13
+
As of v0.18.0-beta.3-jl.2, CodexBar defaults to reading Claude credentials via `/usr/bin/security` CLI, which **does not trigger keychain prompts**. No special setup is needed.
14
14
15
-
> **CodexBar wants to access key "Claude Code-credentials" in your keychain.**
16
-
17
-
This happens because each rebuild creates a new code signature, and macOS treats it as a "different" app.
18
-
19
-
### Quick Fix (Temporary)
15
+
If you've switched to the Security.framework reader (via Preferences), you may see prompts like:
20
16
21
-
When the prompt appears, click **"Always Allow"** instead of just "Allow". This grants access to the current build.
22
-
23
-
### Permanent Fix (Recommended)
17
+
> **CodexBar wants to access key "Claude Code-credentials" in your keychain.**
24
18
25
-
Use a stable development certificate that doesn't change between rebuilds:
19
+
This happens because each rebuild creates a new code signature, and macOS treats it as a "different" app. To reduce these prompts with the Security.framework reader:
Make sure you clicked **"Always Allow"** or set up the development certificate (see above).
132
+
With the default `/usr/bin/security` CLI reader, this should not happen. If using the Security.framework reader, make sure you clicked **"Always Allow"** or set up the development certificate (see above).
5. Claude CLI keychain service: `Claude Code-credentials`(promptable fallback).
48
+
5. Claude CLI keychain service: `Claude Code-credentials`— read via `/usr/bin/security` CLI by default (prompt-free), with Security.framework as fallback.
49
49
50
-
Prompt mitigation:
50
+
Keychain read strategy:
51
+
-**Default: `/usr/bin/security` CLI** (`ClaudeOAuthKeychainReadStrategy.securityCLI`). The CLI binary is permanently in the keychain item's ACL (added by Claude Code during login), so reads never trigger macOS keychain prompts — even after app rebuilds or updates.
52
+
-**Override: Security.framework** (`ClaudeOAuthKeychainReadStrategy.securityFramework`). Available via user preference. Uses `SecItemCopyMatching`, which requires the calling binary to be in the keychain ACL — invalidated on every rebuild, causing recurring prompts.
53
+
- Strategy is stored in UserDefaults key `claudeOAuthKeychainReadStrategy`.
0 commit comments