An agent definition file can declare a prompt cache time-to-live under experimental: { cacheTtl }, and that value is carried into the query as an agent-level override of how long the prompt cache entry lives. It only takes effect when no higher-precedence setting is present, so agents that leave it out behave exactly as before. Nothing like this existed in the previous build.
- The
CLAUDE_CODE_PROMPT_CACHE_TTLenvironment variable and thepromptCacheTtlsetting both win over the frontmatter value, which applies only when thesubagentPromptCacheTtlsetting and its environment variable are both absent, and is recorded with the reasonagent_frontmatter. - A value of
"1h"is rejected when the caller is in a mode where a one-hour cache is not permitted, and the field's own description notes that a one-hour value is ignored while a Claude subscription is in overage. - The
experimentalobject is permissive: unrecognised keys inside it are ignored rather than rejected by the otherwise strict agent frontmatter check. - The override is only passed along when the agent actually sets it, so the default path is unchanged.
{ ttl: t, reason: "agent_frontmatter" }, agentCacheTtlOverride, Experimental per-agent options; unknown keys are ignored.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
V2 was an experimental session API that removed the need for async generators and yield coordination. Instead of managing generator state across turns, each turn was a separate `send()`/`stream()` cycle. The API surface reduced to creating…agent-sdk/typescript-v2-preview see the edit
| `experimental.themes` | string\|array | Color theme files/directories (replaces default `themes/`). See [Themes](#themes) | `"./themes/"` |plugins-reference see the edit
Anthropic's documentation has since written up experimental, on Plugins reference.
Added experimental.cacheTtl ("5m" or "1h") to agent frontmatter: a per-agent prompt cache TTL used when no subagent TTL setting is…