Repository navigation
Turn on coding-agent sign-in and narrow Codex's scopes - #4926
Merged
Merged
Conversation
…more Codex asks for every scope the sign-in server lists, identity scopes included, and was refused with invalid_scope, so it could not sign in. An agent's authorization request, and a self-registration, now keep the scopes the MCP endpoint grants (the agent scopes and offline_access) and leave the rest out, as RFC 6749 and RFC 7591 allow. The consent page offers exactly those, the connection holds only those, and an agent is never granted an identity scope. AGCONN-R25 states the rule. Found by signing the real Codex CLI in against a local stack.
The glossary and the rest of the product call a coding agent "agent de code"; the consent page, the connected agents page and their notices said "agent de programmation".
… off TALE_MCP_CLIENT_METADATA_DOCUMENTS and TALE_MCP_DYNAMIC_CLIENT_REGISTRATION now default to on. A person can connect Claude Code, Codex, Cursor and the like by signing in from the agent; the discovery documents answer, the consent page and the Connected agents page are live, and an API key keeps working. Setting both to false returns to keys alone and refuses the access tokens of agents already connected. API contract 3.44.0 names the change, and the OpenAPI document gains the agentOAuth security scheme (authorization code with PKCE, the seven scopes) beside the API key on the MCP endpoint. The self-hosted pages say what a deployment must provide: the well-known documents at the host root, outbound HTTPS to the agent's metadata host, the limits on self-registration, and what to check before leaving it on (hosted Claude reachability, egress, who may connect), in English, German and French. Verified by signing the real Codex CLI in against a local stack (client metadata document from chatgpt.com, consent, token, tools/list) and a stand-in agent through discovery, registration, consent, a refused tool, refresh and disconnect.
An agent that asks for identity scopes alone asks for nothing the endpoint grants. A mutation round showed nothing held the sign-in step in front of the provider to leaving that request as it came: it could rewrite the scope to an empty one, and the provider would never see what the agent sent. The unit test now holds the scope as sent; the flow test against the real provider and a lane check hold the answer to `invalid_scope`; the rule card says so. The flow test also holds Codex's ask-for-everything request to a consent for the agent scopes alone.
The agentOAuth scope descriptions are keyed by the shared scope list, so a scope the endpoint starts to grant cannot be left out of the document. A spec test pins the scopes, the sign-in server's authorize and token paths, the resource document it names, the refresh lifetime it issues and that the MCP operation alone takes the scheme.
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The operator side of coding-agent sign-in (O‑S6): a person can connect Claude Code, Codex, Cursor and the like by signing in from the agent, with nothing to configure — and what the real Codex CLI asks for is no longer refused.
openid profile email tale:organization …beside the agent scopes, and the endpoint answeredinvalid_scope(an agent connection never holds an identity scope). It now narrows instead of refusing: at registration (RFC 7591 §3.2.1 lets a server register a client for a subset; with nothing left the provider's own agent scope set applies) and at authorization, the scopes the endpoint does not grant are dropped, never granted, and the consent page offers the agent scopes alone. An agent that asks for identity scopes alone asks for nothing the endpoint grants and is still refused (invalid_scope). Rule AGCONN‑R25.TALE_MCP_CLIENT_METADATA_DOCUMENTSandTALE_MCP_DYNAMIC_CLIENT_REGISTRATIONare on unless set tofalse(a malformed value is still refused at boot). Bothfalsereturns to API keys alone: the discovery documents go quiet and the access tokens of agents already connected are refused.agentOAuthsecurity scheme (authorization code with PKCE, the seven scopes) beside the API key, on the MCP operation alone. Its scope descriptions are keyed by the shared scope list, so a scope the endpoint starts to grant cannot be left out; a spec test pins the scopes, the sign-in server's authorize/token paths, the resource document it names, the refresh lifetime and "the MCP operation alone".true); Authentication (new Coding-agent sign-in section); TLS and domains (the.well-knowndocuments live at the host root, with a path table for a reverse proxy); Hardening (what to check before leaving it on: hosted agents' reachability with Anthropic's published range linked, outbound HTTPS to an agent's metadata host, who may connect, the limits on self-registration).AUTH-F34,SET-B38,reference/automation.md) says "on by default"; the French strings say "agent de code" (the glossary term) instead of "agent de programmation".Proof
@tale/shared958; platform server+pii 88,962 (19 skipped); platform UI 7,898; docs 713.checkAgentOAuth,checkAgentConsent,checkAgentDoor,checkAgentConnections,checkAgentLifecycle) 125/125 at the new defaults, including an agent that registers with identity scopes, one that asks for every listed scope (consent for the agent scopes alone) and one that asks for identity scopes alone (refused).codex mcp add, thencodex mcp login --no-browser): fetched its client metadata document from chatgpt.com, was sent to consent, got its token, and its stored credential listed 39 tools over MCP. This run is what found the refusal above./mcp, which I could not script here, so it is not verified end to end.agentSignInOnand the OpenAPI scheme. 19 were killed at once; the survivor (the sign-in step rewriting the scope of an agent that asks for identity scopes alone) is now held by a unit test, a flow test against the real provider and a lane check, and dies.Not here / owed
falseto keep agents on API keys. Check that the.well-knownpaths reach Tale and that the backend can fetch an agent's metadata document (outbound HTTPS) before leaving it on.tests/manual/suites/auth.md.