Skip to main content
Authenticate Claude Code, OpenAI Codex, and GitHub Copilot CLI once and reuse the same credential across every workspace and project, without a browser login each time a workspace starts.

How it works

The pattern is the same for all three agents:
  1. Generate the credential once on your laptop (or any machine with a browser).
  2. Store it as a Domino user environment variable. In the Domino UI, go to Account > Account Settings > User environment variables. User-level variables follow you across all projects and workspaces (unlike project-level variables), and Domino injects them into every run you start.
  3. If the CLI needs a file on disk or first-run state patched, add a snippet to the Compute Environment’s pre-run script (Environments > Edit Definition > Run Setup Scripts). This runs at workspace startup, after the user environment variables are already injected. A user or admin adds this to the environment once.
Claude Code and Copilot CLI only need the environment variable. Codex additionally needs a pre-run script to materialize its credential file.
These recipes reuse your existing coding agent subscription across workspaces. You can also use coding agents alongside the new Domino LLM Gateway 2.0 to route agent traffic through Domino’s centrally governed model access. LLM Gateway 2.0 is currently in early access and distributed as a separately deployed app; contact your Domino field representative for details.
Claude Code uses a single long-lived OAuth token that works across many workspaces at once.
  1. Generate the token once on your laptop:
    The command walks you through OAuth login and prints a token that starts with sk-ant-oat01-.... It is not saved anywhere, so copy it. The token is valid for roughly a year and auto-refreshes.
  2. In Account Settings > User environment variables, add:
    • Name: CLAUDE_CODE_OAUTH_TOKEN
    • Value: sk-ant-oat01-...
  3. That’s it. The Claude Code settings shipped with the Domino Standard Environment handle first-run onboarding, so the token is picked up automatically in every new workspace.
No interactive login is needed. Requires a Pro, Max, Team, or Enterprise plan.
If ANTHROPIC_API_KEY is also set (check project- and environment-level variables too), it takes precedence once approved and bills per-token to your API account instead of using your subscription. Remove it.
Parallel workspaces: Work fine; the same static token works everywhere simultaneously.

Quick comparison

Keep any API-key environment variables (ANTHROPIC_API_KEY, CODEX_API_KEY, OPENAI_API_KEY) out of your user, project, and environment variables unless you deliberately want per-token API billing instead of subscription usage.

Use with Domino LLM Gateway 2.0

Coding agents can be used in concert with the new Domino LLM Gateway 2.0 to centrally govern how they call external Large Language Model providers, alongside the subscription-reuse pattern above. LLM Gateway 2.0 is currently in early access and distributed as a separately deployed app. Contact your Domino field representative for details on how to route your coding agent traffic through it.

Next steps