Skip to content

BUFGIX: OAuth credentials lost after in-TUI login

Choose a tag to compare

@MrCesar107 MrCesar107 released this 17 Apr 20:50
· 20 commits to main since this release
  • When logging in to OpenAI via OAuth from within the chat (/login) while already authenticated with another provider (e.g. Anthropic) and using a non-Codex model, the freshly stored OAuth credentials were wiped from ~/.ruby_coded/config.yaml. The root cause was two UserConfig instances holding independent in-memory copies of the config; when ensure_valid_codex_model! called @user_config.set_config("model", "gpt-5.4"), the stale hash (loaded before the OAuth login) was serialized back to disk, overwriting the OAuth credentials written moments earlier by CredentialsStore. Fixed by threading a single shared UserConfig through Initializer, AuthManager, CredentialsStore and Chat::App