Sulat.com / Writing on AISaturday, November 21, 2026
Agent Engineering/21 November 2026

OpenCode Console now takes OIDC tokens in place of API keys, as Claude and OpenRouter do

OpenCode Console now lets GitHub Actions jobs and other OIDC workloads call models with short-lived tokens. Anthropic, OpenRouter, Vercel and Orq.ai already do this, but OpenCode’s docs don’t yet give the token lifetime.

Glossy white OpenCode logo block on a pale stage, with a crumbling brass key on one side and a glowing clock-ring glass ticket on the other

At a glance

  • OpenCode said on 21 November that Console now supports keyless auth, so CI jobs and other OIDC workloads can call models without long-lived API tokens.
  • The Console's Add Service Account dialog offers three choices: GitHub Actions, Custom OIDC (GitLab, CircleCI, Kubernetes or any OIDC issuer) and API key.
  • OpenCode's docs don't say how long the token lasts, which repositories or branches a service account trusts, or whether it works with Go endpoints. A 9 November GitHub issue asked for all three.
  • Anthropic, OpenRouter, Vercel AI Gateway and Orq.ai already accept OIDC tokens for model access, with lifetimes from 15 minutes (OpenRouter's maximum) to an hour (Orq.ai's default).
  • Amp is only partly keyless: orbs sign in with a short-lived identity, but a CI pipeline running the Amp CLI still needs an access token in AMP_API_KEY.

OpenCode Console now lets a CI job call models without a stored API key, OpenCode said on X at 8:10pm NZDT on 21 November. The job presents an OIDC token, a signed identity token that its own platform issues, and the Console accepts it in place of a long-lived key.

OpenCode’s post reads “OpenCode Console now supports keyless auth” and says calling models “from CI or anywhere that supports OIDC no longer requires long lived API tokens”. The setup screen in its screenshot offers GitHub Actions, any other OIDC issuer, or a plain API key. Anthropic, OpenRouter, Vercel and Orq.ai already take OIDC tokens for model access, and Amp does part of it.

OpenCode on X, 21 November 2026: the keyless auth announcement, with a screenshot of the Add Service Account dialog.

OIDC in plain words, and why it’s so good

Start with a robot. A CI job is a program that builds and tests code every time someone changes it, and it often has to log in to other services, such as an AI model provider, to do its work. The question is how the robot proves who it is.

Here’s an analogy, not a description of how the tokens are built. Say the robot wants into a venue. One way is to hand it a copy of a key. That works, but anyone who copies the key gets in too, for as long as nobody changes the lock. The other way is a doorman. The robot shows an ID, the doorman checks it against the guest list, and the robot gets a wristband that stops working at the end of the night. OIDC is the doorman way.

OIDC is short for OpenID Connect, a standard way for one system to vouch for another. In a GitHub Actions job, GitHub plays the ID office: it signs a pass saying which repository, branch and workflow the job belongs to. The service the job wants to use is the venue. It checks GitHub’s signature and its own guest list, then hands back a short-lived token, the wristband.

Hand-drawn three-step picture: the job shows a pass that GitHub signed, the service checks its list for the right repo, branch and job, then a short-lived token comes back like a wristband that stops working soon
Our analogy: the job shows a signed pass, a doorman checks it, and a wristband that runs out comes back.

The older ways all give the robot something to keep. A stored API key sits in the repository’s secrets until someone removes it. A personal access token acts as the person who made it, with that person’s access, and GitHub says these tokens are meant for acting as yourself and points long-lived integrations to a GitHub App. An AWS access key is a long-term credential, and AWS’s docs say to use temporary credentials instead where you can.

Hand-drawn comparison table of a stored API key, a personal token, a cloud access key and an OIDC token, showing whether each is stored, how long it lasts and what it is tied to
Only the OIDC token isn’t stored anywhere, lasts minutes and is tied to one job.

OIDC flips that. Nothing is stored, GitHub signs a fresh pass for every run, and the token that comes back runs out. Here’s why that’s such a good deal.

Hand-drawn list of what happens if each login method leaks and how to fix it: a stored API key works until revoked, a personal token acts as you, a cloud key can give permanent access, an OIDC token runs out in minutes
A leaked key needs cleaning up. A leaked OIDC token runs out within minutes.
  • No key to steal. GitHub’s docs say you don’t need to copy cloud credentials into long-lived GitHub secrets.
  • Nothing to rotate. Rotating means swapping an old key for a new one by hand. With OIDC, GitHub’s docs say the token the cloud provider issues is valid for a single job, then expires.
  • Locked to one job. GitHub’s pass names the repository, branch and workflow, so a service can admit one repository’s main branch and nothing else. Orq.ai’s docs walk through exactly that rule.
  • A paper trail. Orq.ai records each exchange in its audit log against the job’s identity, and Anthropic keeps an authentication history page.
  • One identity, many services. The same GitHub identity can be exchanged at any service that trusts it, and each service gets a token addressed only to it.

There’s no long-lived key to leak, and that’s the whole appeal. It isn’t magic. A service’s trust rules have to be tight or the wrong repository gets in, and Anthropic’s docs say the whole scheme is only as strong as the identity provider behind it.

What OpenCode announced

The screenshot shows the Console’s Add Service Account dialog for an account named “NoKeys”. Under the heading “Where will it run?” it says “Short-lived tokens from your workload, with no secret to store or leak.” Three options follow: GitHub Actions (“Workflows in a repository”), Custom OIDC (“GitLab, CircleCI, Kubernetes, or any OIDC issuer”) and API key (“A secret key for anywhere else”).

A service account is the Console’s identity for scripts and pipelines rather than a person. Until now, the Console API docs say, “Every request authenticates with an API key”, sent as a bearer token. A key can be set to expire after 1, 7 or 30 days, or a custom 1 to 365 days, or to “Never”, and an expired key can’t be renewed. A CI job on that path kept the key in a repository secret.

Hand-drawn comparison: an API key is created once, stored as a CI secret and can never expire, while an OIDC token is requested per job, swapped for a short-lived one, with no secret to store
A stored key lives until someone rotates it. A swapped token lives for minutes.

The new path removes the stored secret, which is what OpenCode’s dialog means by “no secret to store or leak”. The API key option stays for anything that can’t present an identity token.

It was in the Console before the announcement

The feature wasn’t new on 21 November. An issue filed in OpenCode’s repository on 9 November says the Console already showed a GitHub Actions snippet for service accounts. The snippet exchanges the job’s OIDC token at https://opencode.ai/console/auth/oauth/token using a token-exchange grant, with the audience https://opencode.ai/console.

The issue asked for documentation, and an OpenCode bot replied the same day that the Console API docs “only describe static service account keys right now”. Twelve days later the docs page still opens with “Every request authenticates with an API key”, and OpenCode’s changelog has no entry for the change.

How the exchange works

GitHub Actions issues an OIDC token to a running job only if the workflow grants the job the id-token: write permission. The job asks GitHub for a token addressed to one audience, here OpenCode’s, and sends it to the Console’s token endpoint. The Console swaps it for a token of its own, the token-exchange grant the issue names, and the job uses that token for model calls.

Hand-drawn flow: a GitHub Actions job with id-token write sends an ID token to OpenCode Console, which exchanges it for a short-lived token used for model calls with no API key in the repo
The job proves who it is, and the Console hands back a short-lived token.
See the token GitHub issues to a job

This is GitHub’s own request for an ID token, not OpenCode’s snippet. The audience is the one the issue reports for the Console. The exchange call to OpenCode isn’t documented, so it isn’t shown here.

Code
permissions:
  id-token: write
  contents: read

# inside a step: ask GitHub for an ID token addressed to one audience
curl -sS -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
  "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=https://opencode.ai/console"

Don’t confuse this with OpenCode’s GitHub action. In its docs, id-token: write lets the action exchange an OIDC token for a GitHub App token that comments and pushes changes, while the model provider’s key, ANTHROPIC_API_KEY in the examples, still sits in a repository secret.

Who already does it

Four model services and three coding harnesses document a keyless route, checked against each vendor’s own pages on 21 November. Amp gets only part of the way, and the table says where.

Hand-drawn checklist of services and harnesses with a documented keyless path: OpenCode Console, Claude Platform, OpenRouter, Vercel AI Gateway, Orq.ai, Claude Code, Gemini CLI, and Amp marked partial
Seven have a documented keyless path. Amp only gets halfway.
NameTypeHow it worksLifetime and limitsSource
Claude Platform (Anthropic)ServiceWorkload identity federation: a JWT from GitHub Actions, AWS, Google Cloud, Kubernetes, Entra or another OIDC issuer is exchanged for a short-lived access token. Needs the admin role to set up.60 seconds to 24 hours per rule; API default 1 hour; the setup wizard prefills 10 minutesClaude docs
OpenRouterServiceRFC 8693 token exchange against a federation policy that names the token’s subject and audience.At most 15 minutes; Business and Enterprise plans onlyOpenRouter docs
Vercel AI GatewayServiceAccepts the project’s Vercel OIDC token as the bearer credential in place of an API key.Token comes from Vercel for code running on Vercel; local-development tokens last 12 hoursVercel docs
Orq.aiServiceExchanges an OIDC token for a short-lived Orq.ai API key. Tested with GitHub Actions and Keycloak.1 to 60 minutes, default 60; Enterprise plan onlyOrq.ai docs
Claude CodeHarnessIts GitHub Action reaches Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry using the workflow’s OIDC token, so no long-lived cloud credential sits in the repository.Set by the cloud providerClaude Code docs
Gemini CLIHarnessThe official GitHub Action supports Workload Identity Federation to Google Cloud. A Gemini API key remains the simple option.Set by Google Cloudrun-gemini-cli
AmpHarnessPartly. Orbs sign in with a short-lived thread identity and can mint OIDC ID tokens for other services. A pipeline outside an orb still needs an access token in AMP_API_KEY.Orb ID tokens default to 10 minutes, 60 seconds to 1 hourAmp docs, execute mode
Keyless routes compared on 21 November 2026 against each vendor’s own documentation.

Amp is only partly keyless. Inside an Amp orb, its remote sandbox, the CLI signs in with the orb’s thread identity, “a short-lived credential that Amp rotates automatically”, and Amp is removing the account’s AMP_API_KEY from orb environments. Amp’s OIDC also runs the other way from OpenCode’s: Amp issues tokens that cloud providers trust, while OpenCode’s Console accepts tokens that CI platforms issue. A pipeline that runs the Amp CLI outside an orb is different. Amp’s execute-mode docs tell CI users to set an access token in AMP_API_KEY, and the CLI rejects the short-lived session token that amp login stores.

Claude Code and Gemini CLI get there through their GitHub Actions. Claude Code’s action authenticates to Amazon Bedrock, Google Cloud or Microsoft Foundry with the workflow’s OIDC token. Gemini CLI’s action supports Workload Identity Federation to Google Cloud, and its API key option stays for projects without a Google Cloud setup.

Anthropic’s documentation says the approach swaps static keys for tokens that “expire in minutes rather than never”, then states its limit in one line.

Federated authentication is only as strong as the upstream identity provider that signs the JWT.

Anthropic, Claude Platform docs, Workload Identity Federation

Token lifetimes

Token lifetimes vary by service, and OpenCode’s docs don’t give one. The only expiry OpenCode publishes is for its own API keys, and the longest option there is no expiry at all.

15 min

OpenRouter’s longest token

10 min

what Claude Platform’s setup wizard prefills

60 min

Orq.ai’s default key lifetime

Never

an option for OpenCode’s own API keys

OpenRouter’s tokens never outlive the JWT exchanged for them. Claude Platform caps a token at the lesser of the rule’s setting and twice the remaining life of the incoming token. Orq.ai rejects an incoming token issued more than 10 minutes earlier and accepts each one only once.

What to check before you switch

  • Lifetime. OpenCode’s docs don’t say how long the issued token lasts.
  • Trust rules. The docs don’t say which repositories, branches or events a service account trusts, or where that is set. Orq.ai’s docs, by contrast, require every GitHub rule to bind a numeric repository or owner ID and restrict the events.
  • Go endpoints and usage. The docs don’t say whether the token works with the Go endpoints or how its usage is counted.
  • Subject format. OpenRouter’s docs say GitHub repositories created, renamed or transferred after 15 July 2026 get an immutable subject claim carrying the owner and repository IDs. A trust rule written against the older name-only subject won’t match those tokens.

The first three are the questions in the 9 November issue. OpenCode’s Console API docs have no section for them yet, and the issue asks for a “Use OpenCode from CI” section next to Service accounts.

Terms used here

OIDC
OpenID Connect, a standard way for one system to issue signed identity tokens that another system can verify.
ID token
The signed token a CI platform gives a running job. It names the repository, branch and workflow the job belongs to.
Audience
The service a token is addressed to. A receiver rejects tokens addressed to anyone else.
Token exchange
Swapping one token for another at a token endpoint, defined in RFC 8693.
Service account
A non-human account for scripts and pipelines.
Workload identity federation
Trusting identity tokens from an outside provider for access, instead of giving the workload a secret to store.

OpenCode’s 19 November post on its own GPU capacity is covered separately.



Sources


Discover more from Sulat AI & Tech News

Subscribe to get the latest posts sent to your email.