Codexbar: Stop Losing Context When Switching Accounts
codexbar-macOS-menu-bar-tool
The Multi-Account Switching Pain
If you frequently switch between OpenAI official accounts, third-party proxies, and different compatible providers, you’ve definitely encountered this:
Config switched, but context feels broken.
Historical sessions are still on disk, but become disjointed after switching accounts. Manually editing config files is annoying, and restoring context is even more painful.
Codexbar’s Core Idea
Codexbar is a macOS menu bar tool. It doesn’t try to “rebuild another Codex”—it solves a more specific problem:
After switching accounts/providers, share the same ~/.codex history pool.
Its approach is simple:
- ❌ No separate CODEX_HOME for each account
- ❌ Don’t split your ~/.codex session pool
- ✅ Only sync current provider/account to config.toml and auth.json
- ✅ Switching only affects new sessions, existing history stays intact
Why This Matters
Many “multi-account switching” solutions create separate CODEX_HOME for each account. Strong isolation, but obvious costs:
- History scattered across multiple directories
- That “context is gone” feeling after switching
- Constantly searching for sessions across environments
Codexbar takes another path: keep a unified history pool.
~/.codex/sessions and ~/.codex/archived_sessions remain shared. Current config syncs to standard locations, switching only affects future requests.
Current Features
- Multiple OpenAI OAuth account management
- Multiple OpenAI-compatible provider management
- Multiple API keys per provider
- Quick switching from menu bar
- Local usage / cost statistics
Cost stats come from scanning ~/.codex/sessions and archived_sessions. See token usage and estimated costs directly in the menu bar—no manual session file digging.
Who It’s For
Codexbar is useful if you:
- Use both OpenAI official and third-party compatible providers
- Maintain multiple API keys per provider
- Don’t want to manually edit config.toml every time
- Want unified ~/.codex history and resume experience
Get It
Open source on GitHub: https://github.com/lizhelang/codexbar
Menu bar tool, macOS only, download and use.
📄 Original: https://github.com/lizhelang/codexbar
关于本站 · 免责声明
🍄 Mushroom Research Blog 是非营利、免费公开的个人科技观察博客与公众号 XStack18,不接受商业合作、不代表任何企业或机构立场,也不谋求商业利益。我们以个人视角客观中立地记录和分析 AI、Web3 等领域的最新模型发布与技术动态——不止转述新闻标题或二手信息,而是给出有独立思考的深入分析,希望帮更多人获得有价值的一手科技认知。
⚠️ 文中介绍的开源代码与模型,仅供学习交流与技术借鉴。它们大多仍处于早期阶段,有待进一步研究和验证,请勿直接用于工作或生产环境;如需采用,请先自行充分测试,并核实其许可证与安全性。
Open-source code and models featured here are shared for learning and reference only. Most are early-stage and still need further study and verification — please don't use them directly in your work or in production. Test them thoroughly and check their licenses and security first.
- 本站文章均为作者基于公开信息的个人研究与观点整理,不代表文中提及的任何公司、产品、模型的官方立场,未与其构成商业关联或合作关系。
- 科技行业信息更新极快,我们尽力保证内容准确、及时,但不对完整性、实时性做绝对保证,具体请以相关企业/项目官方公告为准。
- 文中引用的第三方商标、产品名称、图片、数据等版权归原权利人所有,我们会尽量注明来源;如你认为存在版权疑问或侵权,请通过下方邮箱联系我们,收到通知后会尽快核实处理(更正、加注来源或删除)。
- 文章内容仅为技术科普与个人观点,不构成投资、法律或其他专业建议,据此进行任何决策的后果需自行判断和承担。
📮 侵权 / 勘误 / 合作咨询:hello@mushroom.cv
💬 评论与讨论
使用 GitHub 账号登录后发表评论