CodexBar menu bar icon hangs and remains memory-heavy
Environment
- App:
/Applications/CodexBar.app - Version:
0.32.4(CFBundleVersion: 79,CodexGitCommit: edf3d8da) - Bundle ID:
com.steipete.codexbar - Machine:
/Users/dhruvanand/Library/... - Observed on:
2026-06-07
Summary
Opening the CodexBar menu bar icon hangs and leaves the app instance in an unhealthy state with elevated resident memory.
Live process snapshot
Captured while the issue was happening:
pid 27497 /Applications/CodexBar.app/Contents/MacOS/CodexBar
cputime: 2:33.83
elapsed: 03:42:45
%cpu: 0.0
%mem: 1.0
rss: 170944 KB (~167 MB)
Related Codex-related processes still running and active in the same session:
pid 90556 /Users/dhruvanand/.codex/packages/standalone/current/codex
cputime: 91:01.02
%mem: 1.1
rss: 181744 KB (~177 MB)
Evidence from macOS logs
Recent logs for PID 27497 show repeated LocalAuthentication/Keychain security activity and connection churn:
2026-06-07 04:43:23.789022+0530 CodexBar: (Security) SecItemCopyMatching
2026-06-07 04:43:23.789038+0530 CodexBar: (Security) SecItemCopyMatching_ios
2026-06-07 04:43:23.793249+0530 CodexBar: (libxpc.dylib) ... connection cancelled by xpc_connection_cancel()
2026-06-07 04:43:23.793638+0530 CodexBar: (LocalAuthentication) ... Creating LAContext new
...
2026-06-07 04:43:24.662160+0530 CodexBar: (CFNetwork) Task ... done using Connection 486
I only collected local runtime logs and process state, not external diagnostics. The app seems to be stuck while interacting with auth/keychain and keeps the instance alive with high baseline RSS.
Steps observed
- Open CodexBar from menu bar.
- Click the CodexBar icon to open UI / account area.
- UI appears to hang and/or become unresponsive; menu interaction takes long and process state remains high-memory.
Expected
- Menu opens quickly and interaction remains responsive.
- Process RSS should remain stable at normal idle baseline.
Notes
I can provide the full command output snippets if needed.
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 12, 2026, 5:19 PM ET / 21:19 UTC.
Summary The historical v0.32.4 beachball is credible, and v0.34.0 now ships several directly relevant menu-tracking, Codex-account, Keychain-prompt, and WebView-cache fixes. However, no current-release retest proves that both the hang and sustained-memory symptom are resolved, and the discussion identified multiple distinct performance root causes, so a conservative close is not justified.
Reproducibility: no. The issue provides credible v0.32.4 runtime evidence, but there is no v0.34.0 or current-main reproduction after the relevant menu, Codex-account, Keychain-prompt, and WebView-cache fixes.
Ways to help us reproduce this
- Add a screenshot or short recording showing the behavior.
- Add expected vs actual behavior.
Next step Maintainer-guided live macOS verification is required because the report predates several shipped fixes and routine automation must not trigger real Keychain prompts.
Review details
Best possible solution:
Retest v0.34.0 or a fresh current-main bundle with the reporter's provider/account configuration, capture a hang sample and an RSS timeline, then limit any repair to the proven menu-tracking, account-reconciliation, Keychain, or WebView-cache path.
Do we have a high-confidence way to reproduce the issue?
No. The issue provides credible v0.32.4 runtime evidence, but there is no v0.34.0 or current-main reproduction after the relevant menu, Codex-account, Keychain-prompt, and WebView-cache fixes.
Is this the best way to solve the issue?
Yes for the next investigative step: current-release live profiling is the narrowest maintainable path, while guessing from unified Security logs or changing authentication policy would risk addressing the wrong cause.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
- The original evidence does not distinguish routine Security framework calls from the operation that blocked the UI, and a single approximately 167 MB RSS snapshot does not establish a leak.
- The v0.32.4 symptom may have combined multiple causes; closing based on adjacent fixes could hide a remaining auth-specific or memory-retention problem.
- A repair that changes Keychain prompting or provider authentication behavior could affect privacy and requires maintainer sign-off under VISION.md.
Codex review notes: model internal, reasoning high; reviewed against 1dfd7d90f3f1.
Label changes
Label changes:
- add
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label. - add
clawsweeper:fix-shape-clear: Current issue advisory state selects this label. - remove
issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label. - remove
clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.
Label justifications:
P2: The historical beachball is credible and user-visible, but multiple shipped fixes make current severity and remaining scope uncertain.impact:auth-provider: The report specifically associates the unhealthy menu-open state with Security, Keychain, and LocalAuthentication activity.impact:crash-loop: The reported beachball and persistent unhealthy process are an application-availability failure, although no restart loop was recorded.
Evidence reviewed
What I checked:
- Historical runtime evidence: The issue records a v0.32.4 beachball, approximately 167 MB RSS, and Security/LocalAuthentication activity while opening the menu; the linked attachment supports that a real hang occurred but does not identify the blocking stack.
- Switcher starvation fix: Current main gates the menu-tracking event-queue peek using session HID counters, avoiding the per-pass nextEvent work later isolated as one merged-menu beachball cause. (
Sources/CodexBar/StatusItemController+ProviderSwitcher.swift:9, eda747ba6d42) - Codex account tracking fix: Current main moved Codex account file reads and reconciliation away from menu tracking, addressing a plausible account-area blocker in the reported click path. (
Sources/CodexBar/StatusItemController+AccountMenuDisplay.swift:1, f1c1b6cdf3ea) - Keychain prompt coordination: Current main includes a coordinator and access-gate change intended to prevent repeated CodexBarCache Keychain prompts, adjacent to the report's LocalAuthentication churn. (
Sources/CodexBar/KeychainPromptCoordinator.swift:1, f561834141ac) - Memory-adjacent cache fix: Current main schedules eviction of idle cached OpenAI dashboard WebViews, addressing one plausible source of retained resident memory without proving it caused this report. (
Sources/CodexBar/OpenAIDashboardWebViewCache.swift:1, 1246ec6fc3f7) - Release provenance: The relevant fixes are contained by shipped tags through v0.34.0, but release inclusion alone does not establish that this combined report no longer reproduces. (
CHANGELOG.md:1, 7717813b9eed)
Likely related people:
- Peter Steinberger: Authored the broad merged-menu switching-hang work and integrated later menu/account performance changes now on main. (role: recent area contributor and merger; confidence: high; commits: 9778128bcb9c, febf562741e5, 1dfd7d90f3f1; files:
Sources/CodexBar/StatusItemController+Menu.swift,Sources/CodexBar/StatusItemController+MenuTracking.swift,Sources/CodexBar/StatusItemController+ProviderSwitcher.swift) - Yuxin-Qiao: Authored the current-main Keychain prompt coordination change and contributed issue triage distinguishing auth activity from general menu rebuild lag. (role: authentication-path contributor; confidence: high; commits: f561834141ac; files:
Sources/CodexBar/KeychainPromptCoordinator.swift,Sources/CodexBarCore/KeychainAccessGate.swift) - ProspectOre: Authored the Codex account menu snapshot and reconciliation work and supplied the later live bisection separating merged-menu performance drivers. (role: performance root-cause contributor; confidence: high; commits: f1c1b6cdf3ea; files:
Sources/CodexBar/StatusItemController+AccountMenuDisplay.swift,Sources/CodexBar/Providers/Codex/CodexSettingsStore.swift) - bcssewl: Authored the session-counter gating fix for the switcher event peek, a directly demonstrated cause of merged-menu beachballing. (role: menu-tracking contributor; confidence: high; commits: eda747ba6d42; files:
Sources/CodexBar/StatusItemController+ProviderSwitcher.swift,Tests/CodexBarTests/ProviderSwitcherEventPeekGateTests.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.
It was beachballing a while back https://github.com/user-attachments/assets/5b5a4ace-1afd-4840-babb-dde7eb022366
@clawsweeper re-review
🦞🧹 ClawSweeper re-review requested.
I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.
Re-review progress:
- State: Complete
- Detail: The targeted re-review finished, the durable review comment was updated, and the synced verdict was routed.
- Run: https://github.com/openclaw/clawsweeper/actions/runs/27076929521
- Updated: 2026-06-06T23:38:12.821Z
Triage cross‑link: see the consolidated 0.32.x menu‑lag map in #1321. This report looks like a distinct root cause from the general menu‑rebuild lag — your logs show Keychain / LocalAuthentication (SecItemCopyMatching) churn plus elevated RSS, i.e. an auth/keychain path rather than the SwiftUI menu‑card rebuild path — so it probably warrants its own fix rather than being folded into that cluster.
Several directly related fixes shipped after the reported v0.32.4 behavior: menu-tracking event gating, Codex account reads moved out of menu tracking, Keychain prompt coordination, and idle WebView eviction.
Please retest on v0.35.0 or current main. If it still beachballs, attach a fresh sample taken during the hang:
sample CodexBar 10 -file CodexBar-sample.txt
Also include the enabled providers and whether Merge Icons is enabled. A current stack is required before changing another menu/auth path.
I built current main and re-checked this against the shipped fixes. The original v0.32.4 beachball looks credible, but every root cause discussed here has a corresponding fix that landed through v0.34.0, and the related regression suites pass on current main (ProviderSwitcherEventPeekGateTests, OpenAIDashboardWebViewCacheTests, CodexAccountMenuDisplaySnapshotTests).
Mapping the shipped fixes to the reported symptoms:
- Menu-open beachball → switcher event-peek gating.
StatusItemController+ProviderSwitcher.swiftnow gates the menu-tracking event-queue peek behind session HID counters, instead of re-enteringeventTrackingmode on every pass during hover-heavy interaction (eda747ba6d42). - Menu-open beachball → Codex account reconciliation moved off menu tracking.
StatusItemController+AccountMenuDisplay.swiftnow reads a cached projection on the menu path and schedules reconciliation asynchronously, so account file/Keychain I/O no longer blocks the open (f1c1b6cdf3ea). - LocalAuthentication churn → repeated Keychain prompts coordinated.
KeychainPromptCoordinator/KeychainAccessGatedisable Keychain access for unbundled/dev executables, avoiding the modal prompt storm that can block the main thread (f561834141ac). - ~167 MB resident memory → idle WebView eviction.
OpenAIDashboardWebViewCachenow schedules an idle prune so cached dashboard WebViews (and their helper processes) are evicted instead of staying resident across the refresh cadence (1246ec6fc3f7).
I couldn't run a live GUI repro headlessly (the menu-tracking hang and sustained-RSS symptom both need a real session with the reporter's account/provider config), so this is a code-and-regression mapping rather than a live before/after.
@dhruv-anand-aintech — could you retest on v0.34.0+ ? If it still beachballs or holds high RSS, the most useful follow-up would be: exact version (About menu), a Sample/spindump captured during the hang, an Activity Monitor RSS reading, and your provider/account count — that would let us isolate whatever remains rather than guessing from the pre-fix evidence.
Now the usage bars for codex are simply not showing up
they transiently appear and disappear on further manual refreshes
version is 0.34.0 (83), though i am in the beta channel. no option to update shows up
Thanks @dhruv-anand-aintech — this looks separate from the original beachball/high-RSS report, so probably two things to track: the menu-hang/memory side (what the v0.34 menu-tracking / Keychain / WebView fixes target), and this new Codex usage bars missing + flickering on refresh.
To narrow the Codex one: when the bars vanish, is there a red error line on the card, or are they just empty with no error? Which Codex source are you on (Auto / CLI / Web)? A redacted CodexBar.app/Contents/Helpers/CodexBarCLI diagnose --provider codex --format json --pretty taken right after a refresh where the bars are missing would pin it down — that pairs with the sample @steipete already asked for.
Separately, you're on 0.34.0 (83) with no update prompt — happy to help you get onto current main / 0.35, since it's worth confirming this still reproduces there first.
Btw, the slowness etc. is no longer theree (even on 34). Updated to v0.35 (85) and issues remains. No red lines, just shows "Refreshing..." which then becomes "Updated just now"
Also switching back to an already loaded codex account tab clears the usage bars. They should remain till any refresh returns with fresher results. My codex source is oauth.
sample CodexBar 10 -file CodexBar-sample.txt is not returning anything for me. It just hangs indefinitely.
A few traces:
/Applications/CodexBar.app/Contents/Helpers/CodexBarCLI diagnose --provider codex --format json --pretty
{
"auth" : {
"configured" : true,
"modes" : [
"web",
"oauth"
]
},
"displayName" : "Codex",
"fetchAttempts" : [
{
"errorCategory" : "unknown",
"kind" : "web",
"wasAvailable" : true
},
{
"kind" : "oauth",
"wasAvailable" : true
}
],
"provider" : "codex",
"schemaVersion" : "1.0",
"settings" : {
"sourceMode" : "auto"
},
"source" : "oauth",
"sourceMode" : "auto",
"timestamp" : "2026-06-15T15:58:26Z",
"usage" : {
"extraWindowCount" : 2,
"providerCostPresent" : false,
"providerSpecificData" : [
],
"updatedAt" : "2026-06-15T15:58:26Z",
"windows" : [
{
"hasResetDescription" : true,
"label" : "primary",
"resetsAt" : "2026-06-15T20:58:26Z",
"usedPercent" : 0,
"windowMinutes" : 300
},
{
"hasResetDescription" : true,
"label" : "secondary",
"resetsAt" : "2026-06-22T15:58:26Z",
"usedPercent" : 0,
"windowMinutes" : 10080
},
{
"hasResetDescription" : true,
"label" : "Codex Spark 5-hour",
"resetsAt" : "2026-06-15T20:58:26Z",
"usedPercent" : 0,
"windowMinutes" : 300
},
{
"hasResetDescription" : true,
"label" : "Codex Spark Weekly",
"resetsAt" : "2026-06-22T15:58:26Z",
"usedPercent" : 0,
"windowMinutes" : 10080
}
]
}
}
/Applications/CodexBar.app/Contents/Helpers/CodexBarCLI diagnose --provider codex --format json --pretty
{
"auth" : {
"configured" : true,
"modes" : [
"web",
"oauth"
]
},
"displayName" : "Codex",
"fetchAttempts" : [
{
"errorCategory" : "unknown",
"kind" : "web",
"wasAvailable" : true
},
{
"kind" : "oauth",
"wasAvailable" : true
}
],
"provider" : "codex",
"schemaVersion" : "1.0",
"settings" : {
"sourceMode" : "auto"
},
"source" : "oauth",
"sourceMode" : "auto",
"timestamp" : "2026-06-15T16:00:54Z",
"usage" : {
"extraWindowCount" : 2,
"providerCostPresent" : false,
"providerSpecificData" : [
],
"updatedAt" : "2026-06-15T16:00:54Z",
"windows" : [
{
"hasResetDescription" : true,
"label" : "primary",
"resetsAt" : "2026-06-15T17:38:40Z",
"usedPercent" : 1,
"windowMinutes" : 300
},
{
"hasResetDescription" : true,
"label" : "secondary",
"resetsAt" : "2026-06-19T18:52:49Z",
"usedPercent" : 23,
"windowMinutes" : 10080
},
{
"hasResetDescription" : true,
"label" : "Codex Spark 5-hour",
"resetsAt" : "2026-06-15T21:00:54Z",
"usedPercent" : 0,
"windowMinutes" : 300
},
{
"hasResetDescription" : true,
"label" : "Codex Spark Weekly",
"resetsAt" : "2026-06-16T08:00:01Z",
"usedPercent" : 4,
"windowMinutes" : 10080
}
]
}
}
FWIW, I just upgraded to 0.36.0 (87) and this is the first version that doesn't seem to lag at all. 🙏
Follow-up on the current v0.35/v0.36 symptom here:
The original menu slowness appears resolved based on the latest reporter/user comments. The remaining Codex OAuth behavior, where usage bars vanish or flicker during manual refresh/account switching, maps to #1583.
I validated #1583 locally at head dac73259:
swift test --filter StatusMenuPersistentRefreshTests
Suite StatusMenuPersistentRefreshTests passed after 1.056 seconds.
Test run with 22 tests in 1 suite passed after 1.056 seconds.
swift test --filter MenuCardRefreshTests
Suite MenuCardRefreshTests passed after 0.031 seconds.
Test run with 1 test in 1 suite passed after 0.031 seconds.
The relevant regression coverage is the Codex case that keeps frozen quota values visible while manual refresh is in flight. I also requested visual proof on #1583 so the actual menu behavior can be verified before merge.
It seems to be fixed in v0.36.1 (88)
Closing as fixed. The original menu slowness no longer reproduces for the reporter on v0.34+, another user confirmed v0.36.0 removed the lag, and the remaining refresh-time bar flicker was fixed by #1583 in commit https://github.com/steipete/CodexBar/commit/13616b0d442f35b833431a9c8a78220c526c0b73. A final report confirms the combined behavior is fixed in v0.36.1.
Please open a new issue with a current sample if menu hangs or sustained memory growth returns.