Betas
A beta is an early API feature that a request switches on with a value in the anthropic-beta header.
Claude Code keeps a list of these values and sends the ones that fit the model and the provider.
If a proxy rejects a request with a beta error, set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to stop the pre-release values.
ANTHROPIC_BETAS adds values (comma list), and so does the --betas flag. CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 turns off the experimental betas. DISABLE_INTERLEAVED_THINKING turns off one. The betas go in the anthropic-beta header, or in the betas field of the body on Bedrock.
About the List
Claude Code joins the active values into the anthropic-beta header (or into the betas field of the body on Bedrock).
A row is
ANTHROPIC_BETAS and CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS, and the program for the rest.
How Claude Code Builds the List
Claude Code takes these steps for each request.
- It adds the betas that fit the model and the provider.
- It adds the values of
ANTHROPIC_BETAS, a comma list, unless the experimental betas are off. It drops a value that hasafk-mode, and it skipsmid-conversation-system-2026-04-07, because that feature is generally available. - It removes
context-1m-2025-08-07when the model has the 1M window already. - For an agent query, it adds
claude-code-20250219if the list lacks it. - It adds the betas that depend on the turn, and then the values of the flag
--betas. On a third-party provider it keeps only the allowed values of--betas.
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS or a HIPAA policy turns the experimental betas off.
Then Claude Code ignores ANTHROPIC_BETAS and --betas, and it leaves out the betas that only the Anthropic API takes.
Registry
The Registry Name column is the internal name of the value in the program.
| Header Value | Status | Registry Name | When Claude Code Sends It |
|---|---|---|---|
claude- | Undocumented: Only the program shows this item. It can change without notice. | claude_ | For every model whose name has no haiku, and for agent queries. |
oauth- | Undocumented: Only the program shows this item. It can change without notice. | oauth_ | When you sign in with a subscription (OAuth). |
interleaved- | Documented: An official docs page names this item. | interleaved_ | For each model except claude-, unless DISABLE_ is set. The docs name it as interleaved-. |
context- | Undocumented: Only the program shows this item. It can change without notice. | long_ | When the model name has the [1m] suffix, also for a model with a 1M window. Never without the suffix (see Probes). |
context- | Undocumented: Only the program shows this item. It can change without notice. | context_ | On the Anthropic API, on Anthropic-run clouds, and on Foundry, for each model except claude-. |
structured- | Undocumented: Only the program shows this item. It can change without notice. | structured_ | On the Anthropic API for a model that supports it, behind an experiment. |
web- | Undocumented: Only the program shows this item. It can change without notice. | web_ | On Vertex for models with web search there, and on Foundry. |
advanced- | Undocumented: Only the program shows this item. It can change without notice. | tool_ | With tool search, as a second header value. |
tool- | Undocumented: Only the program shows this item. It can change without notice. | tool_ | With tool search. On Bedrock it goes in the body instead. |
effort- | Undocumented: Only the program shows this item. It can change without notice. | effort | The program lists it, and no source states when it is sent. Since 2., when the server refuses the effort setting, Claude Code sends the request again without output_ and this beta, and leaves both out for that model until the process ends (v2.1.310 release; the program). |
task- | Undocumented: Only the program shows this item. It can change without notice. | task_ | The program lists it, and no source states when it is sent. |
prompt- | Undocumented: Only the program shows this item. It can change without notice. | prompt_ | On the Anthropic API and Anthropic-run clouds, and when MCP tools are in the tool list. Since 2. it is not sent behind a custom ANTHROPIC_ gateway or on Foundry (release notes). |
prompt- | Undocumented: Only the program shows this item. It can change without notice. | prompt_ | When a message has the evict_ cache control. |
cache- | Undocumented: Only the program shows this item. It can change without notice. | cache_ | When the keep-alive switch is on. It needs a subscriber login (see Probes). |
extended- | Documented: An official docs page names this item. | extended_ | When the cache time is 1h on the Anthropic API. The docs name it as extended-. |
fast- | Undocumented: Only the program shows this item. It can change without notice. | speed | The program lists it, and no source states when it is sent. |
redact- | Undocumented: Only the program shows this item. It can change without notice. | redact_ | On the Anthropic API when interleaved thinking is on and the session is interactive. |
thinking- | Undocumented: Only the program shows this item. It can change without notice. | thinking_ | The program lists it, and no source states when it is sent. |
thinking- | Undocumented: Only the program shows this item. It can change without notice. | thinking_ | With interleaved thinking on the Anthropic API, and on Bedrock and Mantle for some models. |
afk- | Undocumented: Only the program shows this item. It can change without notice. | afk_ | For auto mode. |
advisor- | Undocumented: Only the program shows this item. It can change without notice. | advisor_ | The program lists it, and no source states when it is sent. |
cache- | Undocumented: Only the program shows this item. It can change without notice. | cache_ | The program lists it, and no source states when it is sent. |
context- | Undocumented: Only the program shows this item. It can change without notice. | context_ | The program lists it, and no source states when it is sent. |
mcp- | Undocumented: Only the program shows this item. It can change without notice. | mcp_ | The program lists it, and no source states when it is sent. |
files- | Undocumented: Only the program shows this item. It can change without notice. | files_ | The program lists it, and no source states when it is sent. |
environments- | Undocumented: Only the program shows this item. It can change without notice. | environments | The program lists it, and no source states when it is sent. |
ccr- | Documented: An official docs page names this item. | ccr_ | The program lists it, and no source states when it is sent. The docs name it in Self-Hosted Environments Testing. |
per- | Undocumented: Only the program shows this item. It can change without notice. | per_ | For models that take the effort with each message. |
timing- | Undocumented: Only the program shows this item. It can change without notice. | per_ | When the time goes with each message. |
mid- | Undocumented: Only the program shows this item. It can change without notice. | mid_ | For models that allow tool changes in the middle of a conversation. |
inline- | Undocumented: Only the program shows this item. It can change without notice. | inline_ | With the previous value, when a second check passes. CLAUDE_ also adds it (see Probes). |
server- | Undocumented: Only the program shows this item. It can change without notice. | server_ | The program lists it, and no source states when it is sent. |
server- | Undocumented: Only the program shows this item. It can change without notice. | server_ | The program lists it, and no source states when it is sent. |
fallback- | Undocumented: Only the program shows this item. It can change without notice. | fallback_ | The program lists it, and no source states when it is sent. |
auto- | Undocumented: Only the program shows this item. It can change without notice. | auto_ | The program lists it, and no source states when it is sent. |
dangerous- | Undocumented: Only the program shows this item. It can change without notice. | dangerous_ | The program lists it, and no source states when it is sent. |
thinking- | Undocumented: Only the program shows this item. It can change without notice. | thinking_ | The program lists it, and no source states when it is sent. |
thinking- | Undocumented: Only the program shows this item. It can change without notice. | thinking_ | The program lists it, and no source states when it is sent. |
message- | Undocumented: Only the program shows this item. It can change without notice. | message_ | The program lists it, and no source states when it is sent. |
mid- | Undocumented: Only the program shows this item. It can change without notice. | - | The program holds it as a plain constant, with no registry name. ANTHROPIC_ skips it, because that feature is generally available. |
mid- | Undocumented: Only the program shows this item. It can change without notice. | mid_ | For the wire shape that keeps reminders. |
The registry also holds two internal switches, x-cc-internal-mid-conv-cache-promotion and x-cc-internal-mid-conv-cache-promotion-ok.
They are
Other Beta Values in the Program
These values belong to the embedded Anthropic SDK client or to the provider code. Claude Code does not put them in the model request. All of them are
| Value | Where It Is Used |
|---|---|
managed- | The endpoints /, /, and /. |
dreaming- | The endpoint /. |
user- | The endpoint /. |
agent- | The endpoint /. |
message- | The batch endpoint. |
token- | The endpoint /. |
mcp- | The endpoint /. |
oidc- | The federation endpoints. |
ccr- | The endpoint /. |
bedrock- | The anthropic_ of the Bedrock body. |
vertex- | The anthropic_ of the Vertex body. |
Observed Request
A transcript of 2.1.305 records each request in an api-request line. In a stub run with an API key, that line held 10 betas, from claude-code-20250219 to thinking-display-updates-2026-08-18.
On 2.1.307 the same stub run held 9 betas: prompt-caching-scope-2026-01-05 is gone, because the stub is a custom ANTHROPIC_BASE_URL (probe print.transcripts.lines).
On a local machine, the api-request lines of 2.1.305 held 19 betas (with claude-sonnet-5-5 and with claude-opus-5-5) or 20 betas (with claude-opus-5-5 only, which added extended-cache-ttl-2025-04-11).
The list ran from claude-code-20250219 and oauth-2025-04-20 to message-threads-2026-08-12.
This is one observation and not a rule. See Transcript Format.
On 2.1.306 we compared the first request with tools (the main request) of claude -p "Reply with 'OK'." with a subscription login (CLAUDE_CODE_OAUTH_TOKEN) and with a fake API key. Each side sent one /v1/messages request. The body had the same keys, the same tool names, and 4 system blocks. The login sent 15 betas, and the key sent 13. The two only the login sent were oauth-2025-04-20 and extended-cache-ttl-2025-04-11. The default model differed: claude-sonnet-5-5 with the login and claude-opus-5-5 with the key. See Probes.
Example
Add a beta by hand, then turn all experimental betas off for a proxy that rejects them.
# Add one value to the header
ANTHROPIC_BETAS="files-api-2025-04-14" claude -p "hi"
# Stop the experimental values (also ignores ANTHROPIC_BETAS and --betas)
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 claude -p "hi"