[GH-ISSUE #7237] [Issue]: Adding a character to a merged group chat hides earlier Advanced Memory recall #4040

Closed
opened 2026-10-21 06:09:46 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Reported on Discord by kociol21 (2026-10-07):

"Adding a new character midway through a group roleplay can cause Advanced Memory to omit earlier memories from the shared prompt, even though the original characters should still remember those events. I added a new character around message 930; older summaries remained saved, but their content disappeared from the prompt. Recall requires access for every current character, and summary conditions were evaluated using the newly added character's name."

In a merged group chat, Advanced Memory only recalls a scene when every character currently in the chat was there. Once a character joins, no earlier scene qualifies, so all earlier memories drop out of the prompt. Character-scoped Chat Summary sections are also evaluated as one arbitrary character (whichever has the smallest random id), which can be the newcomer, so those summaries render empty.

Expected behavior

The merged prompt always comes back as one character speaking at a time, so the model should keep the memories and know who remembers what. The maintainer's design (Mari, 2026-10-07): "In the merged group chat, this should not be happening. Things should not break. It's always one character responding. So the who-remembers-what is more informative for the model."

  • Recall anything at least one character currently in the chat remembers. A character who joined later (or wasn't there) never hides a memory.
  • Mark each memory with who knows it when not everyone present does ("known only to Alice, Bob").
  • Never evaluate character-scoped summary sections as an arbitrary character such as the newcomer. Keep each section a present character qualifies for, marked with who knows it.
  • Memories no present character remembers stay out, as today.
  • Individual group chats, single-character chats, impersonation and narrator rules stay unchanged.

Actual behavior

  • After a character joins, Recalled Scenes is empty (no-recall-candidates) and Chat Summary keeps only empty "Messages #a–#b" headers when the newcomer's id sorts first.
  • Even before anyone joins, a scene only one character saw is never recalled, and private sections are shown or hidden depending on whose id sorts first, with no marking.

Steps to reproduce

  1. Create a merged Roleplay group chat with Alice and Bob, enable Advanced Memory, and play until a few scenes are summarized and moved out of live history.
  2. Add a third character (Cara) to the chat and send one more message.
  3. Open the Prompt preview: Recalled Scenes and Chat Summary no longer contain the earlier memories.

Environment

  • Marinara Engine version: 2.5.0 / staging 3fcbc4619
  • Install type: source
  • OS + version: any
  • Browser or app shell: any

Logs, screenshots, or video

Reproduced on staging with an Advanced Memory audience script (merged Alice + Bob, then Cara added): recall returns no-recall-candidates and the scoped constants render empty when Cara's id sorts first. Individual mode recalls correctly per responder.

Additional context

Root causes: recallAudienceMatches in packages/server/src/services/advanced-memory.ts requires every present character in a scene's audience, and renderEntry resolves summary conditions with char = the first audience id after sorting.

Originally created by @SpicyMarinara on GitHub (Oct 7, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7237 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Reported on Discord by **kociol21** (2026-10-07): > "Adding a new character midway through a group roleplay can cause Advanced Memory to omit earlier memories from the shared prompt, even though the original characters should still remember those events. I added a new character around message 930; older summaries remained saved, but their content disappeared from the prompt. Recall requires access for every current character, and summary conditions were evaluated using the newly added character's name." In a **merged** group chat, Advanced Memory only recalls a scene when every character currently in the chat was there. Once a character joins, no earlier scene qualifies, so all earlier memories drop out of the prompt. Character-scoped Chat Summary sections are also evaluated as one arbitrary character (whichever has the smallest random id), which can be the newcomer, so those summaries render empty. ## Expected behavior The merged prompt always comes back as one character speaking at a time, so the model should keep the memories and know who remembers what. The maintainer's design (Mari, 2026-10-07): "In the merged group chat, this should not be happening. Things should not break. It's always one character responding. So the who-remembers-what is more informative for the model." - Recall anything at least one character currently in the chat remembers. A character who joined later (or wasn't there) never hides a memory. - Mark each memory with who knows it when not everyone present does ("known only to Alice, Bob"). - Never evaluate character-scoped summary sections as an arbitrary character such as the newcomer. Keep each section a present character qualifies for, marked with who knows it. - Memories no present character remembers stay out, as today. - Individual group chats, single-character chats, impersonation and narrator rules stay unchanged. ## Actual behavior - After a character joins, Recalled Scenes is empty (`no-recall-candidates`) and Chat Summary keeps only empty "Messages #a–#b" headers when the newcomer's id sorts first. - Even before anyone joins, a scene only one character saw is never recalled, and private sections are shown or hidden depending on whose id sorts first, with no marking. ## Steps to reproduce 1. Create a merged Roleplay group chat with Alice and Bob, enable Advanced Memory, and play until a few scenes are summarized and moved out of live history. 2. Add a third character (Cara) to the chat and send one more message. 3. Open the Prompt preview: Recalled Scenes and Chat Summary no longer contain the earlier memories. ## Environment - Marinara Engine version: 2.5.0 / `staging` 3fcbc4619 - Install type: source - OS + version: any - Browser or app shell: any ## Logs, screenshots, or video Reproduced on `staging` with an Advanced Memory audience script (merged Alice + Bob, then Cara added): recall returns `no-recall-candidates` and the scoped constants render empty when Cara's id sorts first. Individual mode recalls correctly per responder. ## Additional context Root causes: `recallAudienceMatches` in `packages/server/src/services/advanced-memory.ts` requires every present character in a scene's audience, and `renderEntry` resolves summary conditions with `char` = the first audience id after sorting.
bsakaguchi 2026-10-21 06:09:46 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

Claude Code (for @SpicyMarinara) is working on this on branch fix/merged-group-newcomer-recall; PR to staging follows shortly.

<!-- gh-comment-id:6036179878 --> @SpicyMarinara commented on GitHub (Oct 7, 2026): Claude Code (for @SpicyMarinara) is working on this on branch `fix/merged-group-newcomer-recall`; PR to `staging` follows shortly.
Author
Owner

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

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

<!-- gh-comment-id:6038178338 --> @SpicyMarinara commented on GitHub (Oct 7, 2026): Fixed on `staging` by #7239. 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#4040
No description provided.