[GH-ISSUE #6444] [Feature]: Stabilize prompt cache boundaries and expose real usage #3608

Closed
opened 2026-10-21 06:05:02 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SirAdoni on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6444

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Changing scene data and corrections invalidated large stable prompt prefixes, while the UI obscured cache behavior.

Proposed solution

  • Separate stable lore/instructions from changing history, scene state, live macros and authorial corrections.
  • Keep provider-specific cache identity, marker/lifetime handling and bounded replay invalidation explicit.
  • Expose input, output, cache-read/write counts, percentages and unavailable telemetry; add an optional pre-send cache guard.
  • Respect the configured context budget, including large-context use.
  • Persist named-character prompt snapshots and fold additions at six new cards or 30,000 added characters to reduce churn in cached prefixes.
  • Warn before a Claude send that would disrupt the recorded cache boundary; an acknowledged send proceeds. Cache savings remain workload/provider dependent.

Alternatives considered

Keep current behavior, which leaves the reported problem unresolved. The contribution preserves existing staging behavior outside this scope.

Additional context

Implementation owner: @SirAdoni, with AI assistance. Approved contribution lane E03, dependent on diagnostic foundation #6438. Provider and live-campaign validation will be distinguished from automated checks. No private campaign examples will be published.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @SirAdoni on GitHub (Sep 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6444 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Changing scene data and corrections invalidated large stable prompt prefixes, while the UI obscured cache behavior. ## Proposed solution - Separate stable lore/instructions from changing history, scene state, live macros and authorial corrections. - Keep provider-specific cache identity, marker/lifetime handling and bounded replay invalidation explicit. - Expose input, output, cache-read/write counts, percentages and unavailable telemetry; add an optional pre-send cache guard. - Respect the configured context budget, including large-context use. - Persist named-character prompt snapshots and fold additions at six new cards or 30,000 added characters to reduce churn in cached prefixes. - Warn before a Claude send that would disrupt the recorded cache boundary; an acknowledged send proceeds. Cache savings remain workload/provider dependent. ## Alternatives considered Keep current behavior, which leaves the reported problem unresolved. The contribution preserves existing staging behavior outside this scope. ## Additional context Implementation owner: @SirAdoni, with AI assistance. Approved contribution lane E03, dependent on diagnostic foundation #6438. Provider and live-campaign validation will be distinguished from automated checks. No private campaign examples will be published. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3608
No description provided.