mirror of
https://github.com/stablyai/orca.git
synced 2026-10-16 16:03:26 +00:00
Fixes #5370. Orca injects a private managed CODEX_HOME into Codex processes. For a single OpenAI/ChatGPT account, OAuth enforces one active session, so two independently refreshing homes (Orca's managed home and the user's ~/.codex) revoke each other's single-use refresh tokens — silently breaking non-Orca Codex usage. The refresh is driven both by interactive Codex and by Orca's BACKGROUND quota poller, which spawns the real codex binary against the managed home. Adds an opt-in "Use default Codex config directory" setting (Settings > Accounts > Codex). When enabled: - PTY launches inject no CODEX_HOME (all three buildPtyHostEnv sites OR in isCodexDefaultHomeEnabled), so terminals resolve ~/.codex. - The background quota poller and host Codex launches resolve the system ~/.codex home instead of spawning codex against the managed home — closing the revocation gap that persisted even after the ~/.zshenv workaround. Supersedes community PR #5594: re-derives the locale changes (drops the out-of-scope "Create PR" status-message block, keeps only the new Codex keys), closes the background-revocation gap left unaddressed by the original PR, and sharpens the setting description to state it also disables the managed-home quota refresh. Co-authored-by: Eilon Goldberg <eilon@onyx.security>