# Prompt caching

> When every run opens with the same tools and system prompt, the model provider can cache that prefix and bill repeat reads at a fraction of the input price. Put stable content first and changing content last, so the cached prefix survives from one run to the next.

Last checked: 30 Nov 2026, against the vendor's own pages.

Cache hits bill at $0.20 per million tokens on Claude Opus 5.5 and $0.10 on Sonnet 5.5 (0.05x their input price), and $0.01 on Haiku 5.5 (0.1x). ([source](https://platform.claude.com/docs/en/about-claude/pricing))

Family: Pay less per token.

## Where it fits
- **Building my own agent**: fits. cache_control on the Claude API; automatic on OpenAI.
- **Using a coding agent**: partly. The harness caches for you.
- **Using an enterprise assistant**: partly. The vendor caches for you.
- **Using a workflow tool**: partly (not confirmed). Depends on the model node.

## The setting in each harness
- [Claude API and Agent SDK](https://usefewertokens.com/harnesses/claude-api/): cache_control: {"type": "ephemeral"} after the tools and system prompt ([source](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), read 30 Nov 2026)
- [OpenAI Responses and Agents SDK](https://usefewertokens.com/harnesses/openai/): on by default, long, repeated prefixes are cached automatically; keep the prefix stable ([source](https://developers.openai.com/api/docs/guides/prompt-caching), read 30 Nov 2026)
- [Claude Code](https://usefewertokens.com/harnesses/claude-code/): on by default, the prompt is cached for you; ENABLE_PROMPT_CACHING_1H=1 keeps it an hour on API keys ([source](https://code.claude.com/docs/en/prompt-caching), read 30 Nov 2026)

## Read more
- [Anthropic's prompt caching guide](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
- [OpenAI's prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
