[GH-ISSUE #8253] Game Mode: the GM prompt misses the prompt cache whenever the scene changes #8331

Closed
opened 2026-11-07 16:42:14 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8253

Originally assigned to: @kolacheee on GitHub.

A player reported that every Game Mode message in a long session cost about 250k input tokens. Within one session the GM is sent the whole session history every turn, so prompt caching is what keeps a long session affordable.

Caching only reuses a prompt up to its first changed byte. The GM system prompt comes before the history, and it carries state that changes from turn to turn:

  • weather
  • passive perception hints
  • party morale
  • player notes
  • the map state (the "Discovered" list appears only on turns the party moved)
  • tracked NPCs and their notes
  • the tactical board

Any change to one of these makes the provider miss the cache for the whole history after it. On Claude, with caching turned on, each miss is also billed as a cache write at 1.25×.

Expected: the system prompt stays byte-identical while the scene changes, and the changing state reaches the GM after the history.

Originally created by @kolacheee on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8253 Originally assigned to: @kolacheee on GitHub. A player reported that every Game Mode message in a long session cost about 250k input tokens. Within one session the GM is sent the whole session history every turn, so prompt caching is what keeps a long session affordable. Caching only reuses a prompt up to its first changed byte. The GM system prompt comes before the history, and it carries state that changes from turn to turn: - weather - passive perception hints - party morale - player notes - the map state (the "Discovered" list appears only on turns the party moved) - tracked NPCs and their notes - the tactical board Any change to one of these makes the provider miss the cache for the whole history after it. On Claude, with caching turned on, each miss is also billed as a cache write at 1.25×. **Expected:** the system prompt stays byte-identical while the scene changes, and the changing state reaches the GM after the history.
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#8331
No description provided.