Skip to content

Feature Request: update OpenCode OpenAI auth when switching accounts #53

@tlerbao

Description

@tlerbao

Hi, thanks for the project.

I would like to request support for updating OpenCode's OpenAI authorization when switching accounts manually or via auto-switch.

Current problem:

  • codex-auth can switch the Codex account
  • but OpenCode still keeps its previous OpenAI auth state
  • so after switching accounts, I still need to manually update / refresh the OpenCode authorization separately

This makes the workflow inconvenient, especially when switching accounts frequently.

Requested behavior:

  1. When switching accounts manually, also update the OpenCode OpenAI auth used by opencode
  2. When auto-switch happens, keep OpenCode auth in sync as well
  3. Ideally this should work for the common local auth files / locations automatically, or at least provide an optional command / flag for syncing OpenCode auth

The goal is to make account switching fully consistent across Codex and OpenCode, so users do not have to re-authorize OpenCode by hand after every switch.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions