Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b20415806c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let cached = memory.credentials, | ||
| let timestamp = memory.timestamp, | ||
| Date().timeIntervalSince(timestamp) < self.memoryCacheValidityDuration, | ||
| !cached.isExpired | ||
| { |
There was a problem hiding this comment.
Re-detect Claude keychain changes before using cache
The cache is now returned immediately after only checking the credentials file fingerprint. If a user re-authenticates or switches Claude accounts in the CLI (which updates the Claude keychain but not the file), CodexBar will keep serving the cached access token from its own keychain/memory until it expires, so usage/identity can stay stuck on the old account. This used to be handled by invalidateCacheIfClaudeKeychainChanged() and is now missing, so account switches via keychain won’t be detected unless the cached token expires or the user manually clears it.
Useful? React with 👍 / 👎.
Follow-up work on top of #245 (merged) to further reduce Claude OAuth/Keychain prompt storms and improve background behavior.
Intended behaviour:
Related: #108