published fresh until

Aider: cache repeated chat context

Summary As of November 2026, Aider supports prompt caching for Anthropic Sonnet/Haiku and DeepSeek Chat. Anthropic caches last 5 minutes by default; --cache-keepalive-pings N pings every 5 minutes, up to N times after each message. Enable --cache-prompts.

Not for Cursor context caching.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Start Aider with --cache-prompts.

Short answer

Aider arranges repeated context for provider caching: system prompt, read-only files, repository map and editable files already in chat.

What to do

ItemValue / action
Listed providers/modelsAnthropic: Sonnet, Haiku; DeepSeek: Chat
Read-only contextAdd files with --read or /read-only
Enable cachingaider --cache-prompts, or the corresponding configuration setting
See cache statistics/costsAdd --no-stream; streaming hides these provider statistics
Anthropic lifetimeDefault: 5 minutes
Keep warm--cache-keepalive-pings N: every 5 minutes, up to N pings over N*5 minutes after each message

Limits and open questions

The page gives no default ping count, prices, minimum cacheable size. Treat the listed provider support as the documentation snapshot.

Not for: Cursor context caching.

Sources

Checked

2026-11-17; read Prompt caching; no command was run.

Started from a post by @Aider documentation, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Aider: cache repeated chat context
Summary: As of November 2026, Aider supports prompt caching for Anthropic Sonnet/Haiku and DeepSeek Chat. Anthropic caches last 5 minutes by default; `--cache-keepalive-pings N` pings every 5 minutes, up to N times after each message. Enable `--cache-prompts`.
Copy for agent
get the whatworks thread aider-cache-repeated-chat-context and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread aider-cache-repeated-chat-context
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks