# Appendix: runtime details (/appendices/claude-and-chatgpt-2/appendix-runtime-details)

---
type: Document
title: "Appendix: runtime details"
description: "The details behind cloud environments: who can add network secrets, how a self-hosted runner handles a session, and what the session token holds."
status: stable
order: 904.5
ksor:
  owner: team:panaversity
  audience: [ public ]
  approval:
    by: process:panaversity
    at: 2026-11-20T09:52:25Z
chapter: "F00A"
part: Front
expert_status: required
concepts: []
last_verified: 2026-11-20
sources:
  - id: cloud-environments
    title: "Configure cloud environments (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/cloud-environments
  - id: self-hosted
    title: "Self-hosted environments (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/self-hosted-environments
  - id: self-hosted-identity
    title: "Verify session identity in self-hosted environments (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/self-hosted-environments-identity
  - id: cmek
    title: "What are customer-managed encryption keys (CMEK)? (Claude Help Center, updated 15 June 2026, verified 2026-11-20)"
    resource: https://support.claude.com/en/articles/15505325-what-are-customer-managed-encryption-keys-cmek
  - id: monitoring
    title: "Monitoring (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/monitoring-usage
  - id: claude-security
    title: "Scan your codebase for vulnerabilities (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/claude-security
  - id: code-review
    title: "Code Review (Claude Code Docs, verified 2026-11-20)"
    resource: https://code.claude.com/docs/en/code-review
generated:
  at: 2026-11-20T09:52:25Z
  by: process:panaversity
trust_tier: unverified
build_id: sha256:b1b8ba6179b4acd06d17bd32e6d6ba124becd3c1e125ab480accc40ff9d9b160
dirty: true
ksor_version: 0.0.60
---

### What this appendix is for

This appendix holds the technical details behind [Cloud environments and self-hosted runners](../../claude-and-chatgpt-2/architecture/cloud-environments-and-self-hosted-runners.md). 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.[^self-hosted]

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.[^cloud-environments]

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.[^cloud-environments]
- A **shared environment** is one that an Owner makes for every member of the organization.[^cloud-environments]
- 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.[^cloud-environments]
- **Telemetry export** is the usage and cost data that Claude Code can send to your organization's own monitoring tools.[^monitoring]
- **Customer-managed encryption keys** let an organization keep its own key, and Anthropic uses that key to encrypt some of its data in Claude.[^cmek]

| Fact about network secrets | Detail |
| --- | --- |
| Plans | Pro, Max, Ultra, Team and Enterprise |
| Who can add one | Anyone, 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 to | GitHub, the Anthropic API, public package registries, setup script requests and telemetry export |
| Not available | In a self-hosted environment, and for organizations that use customer-managed encryption keys |
| Reachability | The API must accept traffic from the internet, because requests leave from Anthropic's network |

**Basis:** vendor-documented.[^cloud-environments]

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.[^cloud-environments]

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.[^cloud-environments]

### 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.[^self-hosted]

**[Vendor-documented]**[^self-hosted]

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.[^self-hosted]

**Claude Tag** is Claude working in Slack channels as your organization's shared identity, not as any one member.[^cloud-environments] For Claude Tag channel sessions, the owner is the Claude Tag agent, not a person.[^self-hosted]

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

### 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?[^self-hosted-identity]

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.[^self-hosted-identity]

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.[^self-hosted-identity]

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.[^self-hosted-identity]

| The token | Detail |
| --- | --- |
| Proves | Anthropic issued it for one session in one environment. It also names who created the session, as described below the checks |
| Does not prove | Which 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" |
| Checks | Six checks, with their values, in the numbered list below |
| Lifetime | Four 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.[^self-hosted-identity]

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.[^self-hosted-identity]

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.[^self-hosted-identity]

[^cloud-environments]: As verified on November 20, 2026. Configure cloud environments, Claude Code Docs.
[^self-hosted]: As verified on November 20, 2026. Self-hosted environments, Claude Code Docs.
[^self-hosted-identity]: As verified on November 20, 2026. Verify session identity in self-hosted environments, Claude Code Docs.
[^cmek]: As verified on November 20, 2026. What are customer-managed encryption keys (CMEK)?, Claude Help Center, updated June 15, 2026.
[^monitoring]: As verified on November 20, 2026. Monitoring, Claude Code Docs.
[^claude-security]: As verified on November 20, 2026. Scan your codebase for vulnerabilities, Claude Code Docs.
[^code-review]: As verified on November 20, 2026. Code Review, Claude Code Docs.
