Skip to content

fix(auth): let ChatGPT connections step up scopes in the tool result - #425

Open
geoquant wants to merge 1 commit into
mainfrom
geoquant/chatgpt-cimd-client
Open

geoquant wants to merge 1 commit into
mainfrom
geoquant/chatgpt-cimd-client

Conversation

@geoquant

Copy link
Copy Markdown

ChatGPT connections didn't get step-up (scope challenges) that ChatGPT can act on. src/clients.ts recognised ChatGPT only by a chatgpt.com redirect URI on a registered client. But the ChatGPT connector now authorizes with a Client ID Metadata Document (https://chatgpt.com/oauth/client.json), and in a sample of production grants every ChatGPT grant uses it. A URL client ID only matches clientIdMetadataDocument, so these connections got the spec's HTTP 403 challenge, which fails ChatGPT's tool call (openai/codex#20518), instead of the challenge in the tool result.

This adds that document to the ChatGPT entry, so these connections get scopeChallenge: 'tool' like Codex. The redirect-host match stays for older dynamically registered connections.

Found while investigating ESCALATION-14883.

Created with Claude Opus 5.5 in Pi; council review with Grok 4.7, GPT-6.2 Sol and Claude Opus 5.5.

@geoquant
geoquant requested review from a team as code owners November 21, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant