[GH-ISSUE #7252] [Issue]: Merged group chats read Chat Summary sections as the first character in chat order #4046

Closed
opened 2026-10-21 06:09:49 +07:00 by bsakaguchi · 1 comment
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

With Advanced Memory off, the classic Chat Summary in a merged Roleplay group chat checks {{#if char == "Name"}} sections as the first character in chat order. Only that one character's private sections reach the shared prompt, and every other character's are dropped. If the narrator is first in chat order, narrator-only sections reach the prompt instead.

This was found while building #7239 (the Advanced Memory fix for #7237): that PR changed Advanced Memory to keep what any present character knows and mark it "known only to …", but the classic Chat Summary path still uses the prompt's single {{char}}.

Expected behavior

As Mari decided for #7237 (2026-10-07): "things should not break; the who-remembers-what is more informative for the model." A merged reply can voice anyone present, so a Chat Summary section that depends on the character should be checked for each present character. A section not everyone knows should be kept and marked with who knows it, for example [Known only to Maukie: …], exactly as Advanced Memory does since #7239. Narrator-only sections should never reach the shared prompt.

Individual group chats, a pinned speaker, impersonation and single-character chats should read the summary exactly as before.

Actual behavior

The summary is resolved once with char set to the first character in chat order (buildPromptMacroContext uses names[0]). For a merged chat with Narrator, Maukie and Pantalone (in that order), this summary:

{{user}} and {{char}} reached the harbor.
{{#if char == "Maukie"}}{{char}} hid the compass.{{/if}}
{{#if char == "Maukie" || char == "Pantalone"}}The travelers kept the compass promise.{{/if}}
{{#if char == "Narrator"}}NARRATOR_ONLY The storm was planned.{{/if}}
{{#if char == "Pantalone"}}Pantalone owes Cara a debt.{{else}}Nobody mentions the debt.{{/if}}

reaches the prompt as:

<chat_summary>
    Mari and Narrator reached the harbor.


    NARRATOR_ONLY The storm was planned.
    Nobody mentions the debt.
</chat_summary>

Maukie's and Pantalone's private sections are gone, the section they share is gone, and the narrator-only section is included.

Steps to reproduce

  1. Create a Roleplay group chat in Merged mode with three characters, for example Narrator, Maukie and Pantalone, with Narrator first. Leave Advanced Memory off.
  2. Add a Chat Summary entry with the text above (character-scoped sections like these are also what Advanced Memory saves to Chat Summaries, so they remain after Advanced Memory is turned off).
  3. Open Peek Prompt (or generate a reply) and look at the Chat Summary block.

Environment

  • Marinara Engine version: staging at 10bdad166 (after #7239)
  • Install type: source
  • OS + version: macOS
  • Browser or app shell: n/a (server-side prompt assembly)

Logs, screenshots, or video

Reproduced with a prompt-assembly fixture against staging; output shown above.

Additional context

  • Related: #7237 (merged group chats losing memories), #7239 (Advanced Memory fix and the per-reader "known only to …" labels this should reuse).
  • The rendering happens in the chat_summary marker expansion and in appendFallbackChatSummaryToSystemPrompt, for both generation and the prompt preview (dry run).

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 (Oct 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7252 Originally assigned to: @SpicyMarinara on GitHub. ## Summary With Advanced Memory **off**, the classic Chat Summary in a **merged** Roleplay group chat checks `{{#if char == "Name"}}` sections as the first character in chat order. Only that one character's private sections reach the shared prompt, and every other character's are dropped. If the narrator is first in chat order, narrator-only sections reach the prompt instead. This was found while building #7239 (the Advanced Memory fix for #7237): that PR changed Advanced Memory to keep what any present character knows and mark it "known only to …", but the classic Chat Summary path still uses the prompt's single `{{char}}`. ## Expected behavior As Mari decided for #7237 (2026-10-07): "things should not break; the who-remembers-what is more informative for the model." A merged reply can voice anyone present, so a Chat Summary section that depends on the character should be checked for each present character. A section not everyone knows should be kept and marked with who knows it, for example `[Known only to Maukie: …]`, exactly as Advanced Memory does since #7239. Narrator-only sections should never reach the shared prompt. Individual group chats, a pinned speaker, impersonation and single-character chats should read the summary exactly as before. ## Actual behavior The summary is resolved once with `char` set to the first character in chat order (`buildPromptMacroContext` uses `names[0]`). For a merged chat with Narrator, Maukie and Pantalone (in that order), this summary: ```text {{user}} and {{char}} reached the harbor. {{#if char == "Maukie"}}{{char}} hid the compass.{{/if}} {{#if char == "Maukie" || char == "Pantalone"}}The travelers kept the compass promise.{{/if}} {{#if char == "Narrator"}}NARRATOR_ONLY The storm was planned.{{/if}} {{#if char == "Pantalone"}}Pantalone owes Cara a debt.{{else}}Nobody mentions the debt.{{/if}} ``` reaches the prompt as: ```text <chat_summary> Mari and Narrator reached the harbor. NARRATOR_ONLY The storm was planned. Nobody mentions the debt. </chat_summary> ``` Maukie's and Pantalone's private sections are gone, the section they share is gone, and the narrator-only section is included. ## Steps to reproduce 1. Create a Roleplay group chat in **Merged** mode with three characters, for example Narrator, Maukie and Pantalone, with Narrator first. Leave Advanced Memory off. 2. Add a Chat Summary entry with the text above (character-scoped sections like these are also what Advanced Memory saves to Chat Summaries, so they remain after Advanced Memory is turned off). 3. Open **Peek Prompt** (or generate a reply) and look at the Chat Summary block. ## Environment - Marinara Engine version: `staging` at 10bdad166 (after #7239) - Install type: source - OS + version: macOS - Browser or app shell: n/a (server-side prompt assembly) ## Logs, screenshots, or video Reproduced with a prompt-assembly fixture against `staging`; output shown above. ## Additional context - Related: #7237 (merged group chats losing memories), #7239 (Advanced Memory fix and the per-reader "known only to …" labels this should reuse). - The rendering happens in the `chat_summary` marker expansion and in `appendFallbackChatSummaryToSystemPrompt`, for both generation and the prompt preview (dry run). ## 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 06:09:49 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

@SpicyMarinara commented on GitHub (Oct 7, 2026):

Fixed on staging by #7254. Ships to main with the next promotion.

<!-- gh-comment-id:6040196279 --> @SpicyMarinara commented on GitHub (Oct 7, 2026): Fixed on `staging` by #7254. Ships to `main` with the next promotion.
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#4046
No description provided.