Skip to content
The AI Agent Factory

Appendix: runtime details

Approved by
Panaversity ·
15 min read

What this appendix is for

This appendix holds the technical details behind Cloud environments and self-hosted runners. You do not need them to follow the rest of the section.

A self-hosted environment lets Claude Code cloud sessions run on computers that your organization operates, instead of on Anthropic's. It is in public beta on Team and Enterprise plans, and it is off by default.1

Each part first says what a detail means for the person who sets things up. Then it gives the technical name.

Network secrets

A network secret is an API key or token that you store on a cloud environment. Claude can then call that API from any session in the environment, but it never sees the key. Each session runs on its own virtual machine (VM), a separate computer made in software. A proxy is a go-between that requests pass through. Anthropic's agent proxy is the proxy for requests that leave the VM. It adds the key to each request after the request leaves. So the key stays outside the session.2

A few words in the table below need a plain meaning first:

  • An Owner is a role in a Team or Enterprise organization on claude.ai. On these plans, Owners count as organization admins. Admins, despite the name, do not.2
  • A shared environment is one that an Owner makes for every member of the organization.2
  • A host is the name of the server an API runs on, such as api.example.com.
  • A setup script is a script that runs in a new session before Claude starts work.2
  • Telemetry export is the usage and cost data that Claude Code can send to your organization's own monitoring tools.3
  • Customer-managed encryption keys let an organization keep its own key, and Anthropic uses that key to encrypt some of its data in Claude.4
Fact about network secretsDetail
PlansPro, Max, Ultra, Team and Enterprise
Who can add oneAnyone, on their own environment, on any of these plans. On Team and Enterprise, non-Owners get a shorter Add secret form. It is in the environment's own window at claude.ai/code. It takes one secret. That secret covers one host. On a shared environment, only an Owner can add one
Never attached toGitHub, the Anthropic API, public package registries, setup script requests and telemetry export
Not availableIn a self-hosted environment, and for organizations that use customer-managed encryption keys
ReachabilityThe API must accept traffic from the internet, because requests leave from Anthropic's network

Basis: vendor-documented.2

The list of requests that never get a secret has reasons. GitHub has its own proxy, described next. A setup script runs before Claude Code connects to the agent proxy. Claude Code sends its telemetry export itself, so that request does not go through the agent proxy.2

In an Anthropic-hosted environment, every GitHub request goes through a separate GitHub proxy. It keeps your real GitHub login outside the session. The proxy refuses two things. A branch is a separate line of work in a repository. The proxy rejects deleting a branch, and it rejects pushing anything other than a branch, such as a tag. A tag is a fixed label on one version of the code. The proxy does not limit which branches a push can update. For that, Anthropic points to branch protection rules or rulesets. Both are settings on GitHub that limit who can change a branch.2

How a runner handles a session

In a self-hosted environment, a runner is the program on your computers that does the work. A session is one Claude Code task that someone started.1

[Vendor-documented]1

  1. Anthropic's control plane, the service that organizes sessions, places the session on the environment's queue. The queue is a waiting line of sessions.
  2. A runner with free capacity claims it and holds a lease, a time-limited claim on the session.
  3. The runner clones the repository and starts a Claude Code process for the session. A process is a running program.
  4. The session streams its events to Anthropic over HTTPS. Meanwhile, the runner keeps polling, which means it checks in with Anthropic again and again. Each check-in renews the lease and shows the runner is still alive.
  5. If the runner stops polling, its lease lapses after about 60 seconds. Then Anthropic's server puts the session back on the queue for another runner. That step can take a few minutes, and sometimes longer.

A runner serves one owner at a time. The owner is the account that a session belongs to. The first session a runner claims locks it to that owner. As a result, checked-out code never mixes between owners. When a person starts a session, the owner is that person's account.1

Claude Tag is Claude working in Slack channels as your organization's shared identity, not as any one member.2 For Claude Tag channel sessions, the owner is the Claude Tag agent, not a person.1

Two kinds of session cannot use a self-hosted environment yet. Claude Security sessions scan your code for security weaknesses.5 Code Review sessions review the pull requests in your GitHub repositories.6 Neither one routes to self-hosted environments yet.1

The self-hosted session token

Your own services inside your network may get requests from a session. Each service needs to know two things. Did the request really come from a Claude Code session in your environment? And who started that session?7

So every self-hosted session gets a token in CLAUDE_CODE_SESSION_ACCESS_TOKEN. It is a JWT (JSON Web Token), a short piece of text that a service can check. It is signed, which means Anthropic adds a mark that shows the token came from Anthropic. Your service checks that mark with keys. These keys are different from API keys. Anyone may read them, because they can only check the mark. They cannot make one. Anthropic lists them at a public JWKS endpoint. An endpoint is a web address that a program calls, and JWKS means JSON Web Key Set.7

Inside the token are fields, which are named values. The issuer is the field that says who made the token. The audience is the field that says who the token is for.7

A token cannot be canceled early. It stops working only when it expires. In technical terms, Anthropic publishes no revocation feed. That would be a published list of tokens canceled before their expiry time.7

The tokenDetail
ProvesAnthropic issued it for one session in one environment. It also names who created the session, as described below the checks
Does not proveWhich process presents it. To present the token is to show it to your service. "Any code Claude runs, and any tool or MCP server the session starts, can read and present it"
ChecksSix checks, with their values, in the numbered list below
LifetimeFour hours by default, eight at most. The runner gets a fresh token before the old one expires. There is no revocation feed

Basis: vendor-documented.7

Here is what each check in the table means for your service:

  1. The token starts with sk-ant-cc-. Tokens for sessions on Anthropic's own machines start with sk-ant-si- instead. They are signed with different keys, so your service rejects them.
  2. The signature is real. ES256 is the signing method, and your service checks the signature with Anthropic's published keys.
  3. The issuer must be exactly ccr, the value Anthropic always writes there.
  4. The audience must contain your environment ID. Token fields call an environment a pool, so the ID starts with ccpool_. You can see it with your environment on the Cloud environments admin page. This check rejects tokens made for another organization's environment.
  5. The role must be exactly session_worker. Other tokens signed with the same keys carry other roles.
  6. The token must not have expired.

The token's act field records who created the session, and act.sub holds that creator's ID. A value that starts with user: means a person did. A value that starts with agent: means your organization's service identity did. That is the account Claude Tag channel sessions start from.7

Anthropic says not to treat the token as the creator signing in, because any code in the session can use it. Your service may trade the token for its own credentials, such as a key to an internal system. If so, limit them to what one coding session needs. Make them expire no later than the token. Record the session ID and the token ID with the creator's identity, so you can trace each action back to one session.7

  1. As verified on November 20, 2026. Self-hosted environments, Claude Code Docs.↑↑2↑3↑4↑5↑6
  2. As verified on November 20, 2026. Configure cloud environments, Claude Code Docs.↑↑2↑3↑4↑5↑6↑7↑8
  3. As verified on November 20, 2026. Monitoring, Claude Code Docs.↑
Owner
Panaversity