-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Description
Problem
Sub-agents (Pi embedded agent) cannot use openai/gpt-5.2 or openai/gpt-5.2-pro with OAuth Pro subscription tokens.
Error:
HTTP 401: You have insufficient permissions for this operation.
Missing scopes: api.responses.write.
Root Cause
- Sub-agents use the Responses API (
/v1/responses) viaopenai-responsesprovider - The main session uses Chat Completions API (
/v1/chat/completions) — works fine - OAuth tokens from ChatGPT Pro subscription ($200/mo) only have scopes:
openid, profile, email, offline_access - The
api.responses.writescope is not available via the Codex OAuth client (app_EMoamEEZ73f0CkXaXp7hrann) - Confirmed with both browser OAuth and device-code auth flow — same scopes
Expected Behavior
Sub-agents should work with OpenAI OAuth Pro tokens, either by:
- Requesting
api.responses.writescope in the OAuth client registration - Falling back to Chat Completions API when Responses API returns 401/scope error
- Using
openai-codex-responsesprovider (chatgpt.com/backend-api) which works with the same token
Environment
- OpenClaw: 2026.2.22-2
- OpenAI subscription: Pro ($200/mo)
- Auth mode: OAuth (device-code + browser)
- codex CLI: 0.104.0
Workaround
Use openai-codex/gpt-5.3-codex for sub-agents (works via chatgpt.com/backend-api).
Main session can use openai/gpt-5.2 normally.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels