Repository navigation
Open
Labels
improvementImprovementneeds discussionRequires team discussion before implementationpriority: mediumMedium priorityservice: platformPlatform service
Description
Summary
The owner decided on 2026-10-08 that a coding agent connected to Tale over MCP can ask to add a member's own AI subscription (Claude, ChatGPT, Gemini, Nous Portal) to the organization: org-wide, pending until the member confirms in Tale with a fresh sign-in, admins notified, the row tagged with who contributed it and disabled when they leave, and a vendor-terms notice in the confirm dialog. None of it is built. This issue collects what has to be settled before it is, because two items are for the owner and for legal to answer and a few change how serving works.
Anchors are at main da3b98b730 (2026-10-13). Statements about vendors come from the design pass of 2026-10-08 and were not checked again for this issue.
What is on main
- Four harnesses declare a
subscription:block:claude-code,codex,gemini,hermes(configs/platform/system/harnesses/<slug>/harness.yml). - A person can add a pasted Claude OAuth token as a subscription key in Settings › AI providers (feat(platform): add a pasted Claude OAuth token as a subscription key #4369). The AI gateway service pools Claude and ChatGPT subscriptions (feat(ai-gateway): pool Claude and ChatGPT subscriptions #3452).
- Nothing lets an agent ask for one: there is no pending-link table and no
add_subscriptiontool (git grepfinds the names only in a test that guards the server instructions,services/platform/lib/mcp/instructions.test.ts). - The MCP inventory is at 39 tools and a guard allows at most 40 (
services/platform/lib/mcp/tools.test.ts:548-558).
What the design pass proposed
- A coding agent can only ask; a person adds. Every call creates a pending link, never a credential; nothing serves until the person confirms in Tale with a sign-in younger than 10 minutes; a link expires after 15 minutes.
- Four lanes, human lanes preferred: the person pastes on Tale's confirm page; the person drops a file on it (Gemini, maybe Hermes); for Codex, Tale runs OpenAI's device sign-in itself and shows the one-time code on the confirm page; or the agent passes the credential in the call (allowed for static cases, stored encrypted in the pending link only, flagged "sent through your agent's conversation", refused for Codex).
- Codex gets a platform-owned path: Tale holds the ChatGPT access and refresh tokens, refreshes under a row lock and hands Codex the access token only. Importing a Codex
auth.jsonwas rejected (OpenAI asks for one file per runner; refresh rotation would sign the person's own CLI out). - Claude is paste-only (
claude setup-token): Tale never runs Anthropic's OAuth. - Serving: a confirmed subscription is pooled for agent turns of its harness (chat, model steps, vision and speech never read the pool); an organization with no pooled row behaves exactly as today.
- Offboarding: when the contributor is removed or disabled, the row is disabled and its ciphertext erased.
- Everything audited with who asked and through which door; admins notified on request, confirmation and every system disable.
What is open
- Legal (the owner's call). The consumer terms of the subscription vendors restrict how a login or credential may be shared, and using one person's subscription for the whole organization is the case they were not written for. The owner chose org-wide use with a notice in the confirm dialog; the design pass recommended a legal review of that notice and of the feature itself before release, and, later, an optional "only my runs" switch on a row. Nothing here has been reviewed by a lawyer.
- The vendor-terms notice copy for every provider needs owner or legal sign-off before the confirm dialog ships.
- Precedence. A pooled subscription serves an agent turn before the provider's API-key default for its harness, or only when nothing else serves.
- Hermes. If no stable credential exists for Nous Portal: drop its subscription delivery, or build a Tale-owned sign-in profile (Nous documents only a loopback sign-in).
- Who contributes. Owner, admin or developer (the credential-admin rule today), or plain members too.
- Agent-supplied credentials. Whether an admin may confirm a link whose credential the agent supplied, or only the requester.
Options for how to proceed
- Wait for the legal answer, then build everything.
- Build the lanes where a person supplies the credential (paste, file, device sign-in) and leave "the agent passes the credential" out until it has been reviewed.
- Build everything behind a switch that is off, and decide the copy and the legal question before turning it on.
Constraints
- It needs the "agent request" concept (a person finishes what an agent asked for) described in Improvement: let a coding agent change the other 22 pages of Settings, with a person finishing what needs a secret #4930.
- One tool slot is left in the MCP inventory; the design pass put the subscription tools in their own group.
Related
Metadata
Metadata
Assignees
Labels
improvementImprovementneeds discussionRequires team discussion before implementationpriority: mediumMedium priorityservice: platformPlatform service
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Build it behind two switches that are off by default, with only the lanes where a person supplies the credential. The lane where the agent passes the credential is never built, and no sandbox ever receives a refresh token.
The rule
apply_settingsa subscription provider credential, and when both switches are on, the call returns a pending agent request (the Improvement: let a coding agent change the other 22 pages of Settings, with a person finishing what needs a secret #4930 concept) with aconfirmUrl. The agent pollsget_agent_request, which takes the 40th and last tool slot. There is noadd_subscriptiontool.TALE_SUBSCRIPTION_REQUESTS(unset = off) and an organization policy "Owners, admins and developers may contribute their own AI subscriptions" (default off). If either is off, the call is refused withUSE_SUBSCRIPTION_FLOW, as today. The same switches gate a new "this is my own subscription" option in Settings › AI providers. Company credentials are entered as today./reauthenticaterenews it). Admins are notified on request, on confirmation, and on every disable. Every step is audited.claude setup-token; Nous Portal by paste of a static key; Codex by a device sign-in that Tale runs; Gemini by droppingoauth_creds.json. For Codex and Gemini, Tale keeps the refresh token and hands the harness only a short-lived access token.Answers
Why
No secret passes through an agent's conversation. A row serves the whole organization, so anything in the sandbox can be read by any member's prompt-injected turn. Keeping refresh tokens on the platform keeps that exposure to a short-lived access token, never the contributor's whole Google or OpenAI account. A contributed row is defined by its tag, not by the door that created it, so the Settings door cannot sidestep the switches, the notice or offboarding. Today's precedence stays, so no billing route or data path changes silently. One agent-request lifecycle with one polling tool stays within the 40-tool budget.
Implementation units (all on
main)Before release: owner and legal sign-off on org-wide use, on each provider's notice copy, and on Tale running the vendors' sign-in and refresh flows.
Cross-issue amendments (decisions taken together with #4930):