[GH-ISSUE #4270] [Issue]: Regenerated messages leak into summary and memory context #2310

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

Originally created by @SpicyMarinara on GitHub (Jul 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4270

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Regenerating an assistant message after an automatic summary run causes the original message to remain in the outgoing prompt through the Chat Summary and, in some cases, Memories blocks.

Expected behavior

When regenerating an assistant message, the original message should be excluded from all prompt context, including automatic summaries and recalled memories.

Actual behavior

The Chat Summary block describes the assistant message being regenerated. If at least five unchunked messages accumulated, the Memories block can also contain that message, causing models to behave as though they already produced the response.

Steps to reproduce

  1. Start a roleplay chat with automaticSummaryEnabled: true and the default summaryRunInterval: 5.
  2. Generate messages until an automatic summary run occurs.
  3. Regenerate the assistant message that was just summarized.
  4. Open Peek Prompt and inspect the outgoing prompt.
  5. Observe that the Chat Summary block describes the message being regenerated.
  6. If at least five unchunked messages had accumulated, observe that the Memories block also contains the regenerated message.

Environment

  • Marinara Engine version: v2.3.3
  • Install type: termux
  • OS + version: Android 16
  • Browser or app shell: Not provided

Logs, screenshots, or video

Attached root-cause analysis and suggested patches: regen-summary-contamination.md (not vetted by the reporter): https://cdn.discordapp.com/attachments/1532101607595180164/1532101608119341056/regen-summary-contamination.md?ex=6a6ba050&is=6a6a4ed0&hm=523e0c086b7601b053cd31bea02e4dd045531349c6253a8fcef54a6928a099f2&

Additional context

Affects DM and RP modes; Game mode was not tested. With reasoning models, the chain of thought may indicate that the model believes it already produced the message and may repeat the same response. Installation was performed using start-termux.sh.

Discord thread: Regenerated messages leak into context via summary + memory recall
Discord thread link: https://discord.com/channels/1417099416812392641/1532101607595180164
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-07-29T19:04:48.322Z] containerd: OS: Android 16
Install: start-termux.sh
ME version: v2.3.3

Affects DM and RP modes. I haven't tested Game mode. 

Repro:
1. Roleplay chat, `automaticSummaryEnabled: true`, default `summaryRunInterval: 5`.
2. Generate until a summary run fires
3. Regenerate the assistant message that was just summarized.
4. Inspect the outgoing prompt (Peek Prompt). The `Chat Summary` block describes the message from the history that we're trying to regen. If ≥5 unchunked messages had accumulated, the `Memories` block contains it too.
5. If it's with a reasoning model, the CoT typically includes things like "wait I just said this. I guess I'll say the same thing again."

Claude Fable's root cause analysis and suggested patches are attached. I didn't vet any of it.
[attached file: regen-summary-contamination.md — https://cdn.discordapp.com/attachments/1532101607595180164/1532101608119341056/regen-summary-contamination.md?ex=6a6ba050&is=6a6a4ed0&hm=523e0c086b7601b053cd31bea02e4dd045531349c6253a8fcef54a6928a099f2&]
[Discord message: https://discord.com/channels/1417099416812392641/1532101607595180164/1532101607595180164]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4270 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Regenerating an assistant message after an automatic summary run causes the original message to remain in the outgoing prompt through the Chat Summary and, in some cases, Memories blocks. ## Expected behavior When regenerating an assistant message, the original message should be excluded from all prompt context, including automatic summaries and recalled memories. ## Actual behavior The Chat Summary block describes the assistant message being regenerated. If at least five unchunked messages accumulated, the Memories block can also contain that message, causing models to behave as though they already produced the response. ## Steps to reproduce 1. Start a roleplay chat with `automaticSummaryEnabled: true` and the default `summaryRunInterval: 5`. 2. Generate messages until an automatic summary run occurs. 3. Regenerate the assistant message that was just summarized. 4. Open Peek Prompt and inspect the outgoing prompt. 5. Observe that the Chat Summary block describes the message being regenerated. 6. If at least five unchunked messages had accumulated, observe that the Memories block also contains the regenerated message. ## Environment - Marinara Engine version: v2.3.3 - Install type: termux - OS + version: Android 16 - Browser or app shell: Not provided ## Logs, screenshots, or video Attached root-cause analysis and suggested patches: `regen-summary-contamination.md` (not vetted by the reporter): https://cdn.discordapp.com/attachments/1532101607595180164/1532101608119341056/regen-summary-contamination.md?ex=6a6ba050&is=6a6a4ed0&hm=523e0c086b7601b053cd31bea02e4dd045531349c6253a8fcef54a6928a099f2& ## Additional context Affects DM and RP modes; Game mode was not tested. With reasoning models, the chain of thought may indicate that the model believes it already produced the message and may repeat the same response. Installation was performed using `start-termux.sh`. Discord thread: Regenerated messages leak into context via summary + memory recall Discord thread link: https://discord.com/channels/1417099416812392641/1532101607595180164 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-07-29T19:04:48.322Z] containerd: OS: Android 16 Install: start-termux.sh ME version: v2.3.3 Affects DM and RP modes. I haven't tested Game mode. Repro: 1. Roleplay chat, `automaticSummaryEnabled: true`, default `summaryRunInterval: 5`. 2. Generate until a summary run fires 3. Regenerate the assistant message that was just summarized. 4. Inspect the outgoing prompt (Peek Prompt). The `Chat Summary` block describes the message from the history that we're trying to regen. If ≥5 unchunked messages had accumulated, the `Memories` block contains it too. 5. If it's with a reasoning model, the CoT typically includes things like "wait I just said this. I guess I'll say the same thing again." Claude Fable's root cause analysis and suggested patches are attached. I didn't vet any of it. [attached file: regen-summary-contamination.md — https://cdn.discordapp.com/attachments/1532101607595180164/1532101608119341056/regen-summary-contamination.md?ex=6a6ba050&is=6a6a4ed0&hm=523e0c086b7601b053cd31bea02e4dd045531349c6253a8fcef54a6928a099f2&] [Discord message: https://discord.com/channels/1417099416812392641/1532101607595180164/1532101607595180164] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:47:12 +07:00
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#2310
No description provided.