GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — openai: adding a second ChatGPT account fails with workspace scope denied · Issue #56298 · anomalyco/opencode

openai: adding a second ChatGPT account fails with workspace scope denied #56298

New issue
Copy link
New issue
Copy link
Done
#64945
Done
openai: adding a second ChatGPT account fails with workspace scope denied#56298
#64945
Copy link
Assignees
rekram1-node

Description

@KomeijiReimu
KomeijiReimu
opened on Oct 17, 2026
Issue body actions

Description

Adding another account with “Sign in with ChatGPT” fails on the OpenAI authorization page with 3p_login_workspace_scope_denied: the app is only available to members of its workspace. Removing the first saved account and then signing in with the second succeeds. Keeping one account on the new method and adding the other through “Codex browser (legacy)” also works.

In v2.0.32, the ChatGPT OAuth method takes the client ID from the active credential, including when the TUI starts “Add account”. OpenAI’s account-management guide says a different account should use its own saved registration or register a new one with client_id=dynamic_agent_client:
https://developers.openai.com/siwc/token-sharing-open-source/profiles-and-sessions#switching-chatgpt-accounts

Expected: adding the second account should leave the first account connected and start an independent registration. Reauthorizing an existing account should retain that account’s issued client ID.

Plugins

@cortexkit/opencode-magic-context@latest, @cortexkit/[email protected], oh-my-opencode-slim. Not yet reproduced with plugins disabled.

OpenCode version

2.0.32

Steps to reproduce

  1. Run /connect, select OpenAI, then “Sign in with ChatGPT”, and sign in with account A.
  2. Run /connect again, select OpenAI → “Add account” → “Sign in with ChatGPT”.
  3. Sign in with a different ChatGPT account B.
  4. Observe the workspace-scope denial. Remove A from OpenCode and repeat B’s sign-in; it succeeds.

Screenshot and/or share link

Not available.

Operating System

Linux x86_64 / WSL2, kernel 6.18.54.1-microsoft-standard-WSL2

Terminal

tmux (TERM=tmux-256color), zsh

Reacted by Mariusz Józala, NODA Kai, Eli Stark and Hong Minhee (洪 民憙)

Activity

  1. opencode-agent commented on Oct 17, 2026

    @opencode-agent
    opencode-agentBot
    on Oct 17, 2026 – with OpenCode Agent
    Contributor
    More actions

    Thanks for the detailed report. I couldn't reproduce this here: the denial comes from OpenAI's live sign-in page, and testing it needs two real ChatGPT accounts in different workspaces, which this sandbox doesn't have. A maintainer with such accounts will need to confirm it.

    Your explanation matches the code, though I haven't run it. In packages/core/src/plugin/provider/chatgpt.ts, "Sign in with ChatGPT" takes its client ID from the active OpenAI credential and puts it in the authorize URL. It only falls back to dynamic_agent_client when no ID is saved. Nothing treats "Add account" differently from signing in again to an existing account, so account B's sign-in reuses account A's client ID. That code is the same in 2.0.32 and on dev.

    Until this is looked at, the workaround you found still works: connect the second account through "Codex browser (legacy)".

    Related: #52141 and #52147, the PRs that added this sign-in method.

  2. iCodePoet commented on Nov 12, 2026

    @iCodePoet
    iCodePoet
    on Nov 12, 2026
    More actions

    I'm experiencing the same issue on OpenCode 2.2.7 on macOS.

    The first ChatGPT account connects successfully, but adding a different account via “Sign in with ChatGPT” fails with:

    3p_login_workspace_scope_denied

    Adding the second account via “Codex browser (legacy)” succeeds.

  3. KomeijiReimu commented on Nov 12, 2026

    @KomeijiReimu
    KomeijiReimu
    on Nov 12, 2026
    Author
    More actions

    @iCodePoet so whats the diff with #56302

  4. iCodePoet commented on Nov 12, 2026

    @iCodePoet
    iCodePoet
    on Nov 12, 2026
    More actions

    @KomeijiReimu The core fix overlaps with #56302. The additional changes in #63517 cover reauthorization of a selected account in the web/desktop app, along with an E2E regression test. Feel free to use the app-related changes if they’re useful for your PR.

  5. xeonise commented on Nov 18, 2026

    @xeonise
    xeonise
    on Nov 18, 2026
    More actions

    same issue being experienced

  6. KomeijiReimu commented on Nov 21, 2026

    @KomeijiReimu
    KomeijiReimu
    on Nov 21, 2026
    Author
    More actions

    My fix for this issue (#56302) was closed by the automated PR cleanup. Could a maintainer reopen it so the fix can be reviewed? I’ve also left a reopen request on the PR. Thanks!
    @rekram1-node @thdxr

  7. rekram1-node
    self-assigned this
    on Nov 24, 2026
  8. rekram1-node
    closed this as completedin #64945on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.