Skip to content

fix(prompt): keep volatile context outside cache - #1838

Closed
sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/prompt-cache-boundary
Closed

sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/prompt-cache-boundary

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

A short first model call could write several thousand prompt-cache tokens because Pi places its Anthropic cache marker on the current user message, after Junior's volatile runtime context.

This change moves the mostly stable capability catalog into the system-prefix area. It also adjusts the first request payload for a Turn so the cache marker ends before <runtime-turn-context>. Later tool-loop calls keep Pi's normal history caching behavior.

The change keeps actor, configuration, runtime, plugin request context, and the current request outside the cache boundary.

via Dave Rosenthal.

--

View Junior Session [Sentry]

Co-Authored-By: Dave Rosenthal <david.rosenthal@sentry.io>
Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Sep 11, 2026 6:23am UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – junior-docs 635cd861 Deployed Sep 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant