docs(planning): scope the cache-safety claim to the explicit breakpoint

Closed
AW
2mo ago
+10-6

Summary

The Planning docs and docstring say the reminder "never invalidates the prompt cache". That holds for the prefix up to the CachePoint Planning anchors on the last durable user prompt, but not for cache entries written past it. Anthropic automatic caching and OpenAI server-side prefix caching both store through the reminder, and because the reminder is dropped from the next request, those entries never match again. pydantic/pydantic-ai#9275 has a no-API-key repro.

This PR only corrects the wording, in both pydantic_ai_harness/planning/README.md and docs/planning.md (kept in sync) plus the class docstring:

  • The absolute "never invalidates the prompt cache" claims now say the cached prefix stays stable.
  • A new paragraph under "The solution" explains that caches storing past the breakpoint re-write the tail on each request once a plan exists.

No behavior change. Changing the behavior itself is being discussed in pydantic/pydantic-ai#9275.

SystemReminders makes the same claim and uses the same ephemeral-tail mechanism. I left it out to keep this scoped to the reported issue, and I'm happy to fold it in if you'd prefer.

Linked Issue

Refs pydantic/pydantic-ai#9275

Checklist

  • Linked issue exists and is referenced above
  • Tests added/updated for new behavior (docs only, no behavior change)
  • make lint && make typecheck && make test passes locally (ran ruff check/ruff format --check on the touched module only)
  • pyproject.toml and uv.lock are unchanged, or a maintainer added dependencies:approved to the current head
  • Docstrings use single backticks (not RST double backticks)