[GH-ISSUE #8309] Game Mode: the GM's format reminder keeps most of each turn's prompt out of the provider cache #8242

Closed
opened 2026-10-26 04:03:39 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @kolacheee on GitHub.

What happens

Every Game turn rebuilds the whole format reminder (output format, commands, ruleset guidance, sheets, inventory, scene state) and sends it after the history. Providers cache a prompt's prefix, so only the system prompt is cached: the history behind it is re-read in full each turn, because the reminder before the previous player message differs from the one sent now.

Measured on a 13-turn 5e game across Gemini 3.8 Flash, 3.5 Flash-Lite, 3.1 Pro, Claude Haiku/Sonnet/Opus 5.5 and GPT-5.6 Terra: on ordinary consecutive turns about 30% of the prompt came from cache.

Separately, the narration screen mishandles a few speaker-line shapes models write:

  • [Name] [main] [side] [expr]: … shows [Name] as narration and main as the speaker.
  • [Name] [main|thinking]: … uses main|thinking as the sprite.
  • [Name] [thought] - … shows the raw brackets.
  • [Name] [whisper:Target] [expr]: … loses its target and type: the unknown-tag stripper removes [whisper:Target].

Expected

The instructions that hold for the whole game are cached with the system prompt, and only what changes turn to turn follows the history. Drifted speaker lines show as the character's line, and a whisper shows as a whisper.

Originally created by @kolacheee on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8309 Originally assigned to: @kolacheee on GitHub. ## What happens Every Game turn rebuilds the whole format reminder (output format, commands, ruleset guidance, sheets, inventory, scene state) and sends it after the history. Providers cache a prompt's prefix, so only the system prompt is cached: the history behind it is re-read in full each turn, because the reminder before the previous player message differs from the one sent now. Measured on a 13-turn 5e game across Gemini 3.8 Flash, 3.5 Flash-Lite, 3.1 Pro, Claude Haiku/Sonnet/Opus 5.5 and GPT-5.6 Terra: on ordinary consecutive turns about 30% of the prompt came from cache. Separately, the narration screen mishandles a few speaker-line shapes models write: - `[Name] [main] [side] [expr]: …` shows `[Name]` as narration and `main` as the speaker. - `[Name] [main|thinking]: …` uses `main|thinking` as the sprite. - `[Name] [thought] - …` shows the raw brackets. - `[Name] [whisper:Target] [expr]: …` loses its target and type: the unknown-tag stripper removes `[whisper:Target]`. ## Expected The instructions that hold for the whole game are cached with the system prompt, and only what changes turn to turn follows the history. Drifted speaker lines show as the character's line, and a whisper shows as a whisper.
bsakaguchi 2026-10-26 04:03:39 +07:00
  • closed this issue
  • added the
    in-pr
    label
Author
Owner

@coderabbitai[bot] commented on GitHub (Oct 25, 2026):

⚠️ Possible Duplicate Issue(s)

📝 Issue Planner

Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

  • Create Plan

🧪 Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

💬 Have feedback or questions? Drop into our discord!

<!-- gh-comment-id:6397705819 --> @coderabbitai[bot] commented on GitHub (Oct 25, 2026): <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated issue plan by CodeRabbit --> <details> <summary>⚠️ Possible Duplicate Issue(s)</summary> <dl> <dd> - https://github.com/Pasta-Devs/Marinara-Engine/issues/8253 </dd> </dl> </details> --- <details> <summary>📝 Issue Planner</summary> <dl> <dd> <sub>Check the box below or use the `@coderabbitai plan` command to generate an implementation plan and prompts that you can use with your favorite coding assistant.</sub> - [ ] <!-- {"checkboxId":"8d4f2b9c-3e1a-4f7c-a9b2-d5e8f1c4a7b9"} --> Create Plan </dd> </dl> </details> --- <details> <summary> 🧪 Issue enrichment is currently in open beta.</summary> <dl> <dd> You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your `.coderabbit.yaml`: ```yaml issue_enrichment: auto_enrich: enabled: false ``` </dd> </dl> </details> 💬 Have feedback or questions? Drop into our [discord](https://discord.gg/coderabbit)!
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#8242
No description provided.