[GH-ISSUE #7245] [Issue]: A character joining a group chat holds back Advanced Memory scenes with hidden messages #4041

Closed
opened 2026-10-21 06:09:47 +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/7245

Originally assigned to: @SpicyMarinara on GitHub.

Summary

When a character joins a Roleplay group chat, Advanced Memory holds back every earlier scene recap whose scene had a message hidden from one of its characters. The recaps stay saved, but they drop out of the prompt for the characters with partial access and show up as needing review until Fix writes them again with paid helper calls. This happens in both merged and individual group chats.

This is part of the Discord report by kociol21 behind #7237: "adding a new character midway ... older summaries remained saved, but their content disappeared from the prompt." #7239 fixes the merged recall rule for newcomers but not this.

Expected behavior

  • A character who joins later does not change what the existing characters may know, so it must not invalidate an existing scene recap.
  • A change that matters still withholds the recap exactly as today: renaming a character who was a reader when the recap was written, or changing which of the scene's messages such a character can see.
  • A recap is never shown to a reader whose visibility of its sources changed since it was written.

Actual behavior

The saved scene-visibility revision (sceneVisibility() in packages/server/src/services/advanced-memory.ts) hashes the visibility of every character currently in the chat. Adding a character changes that hash, so hasCurrentSceneVisibility() turns false for every recap that saved one (scenes with partly hidden messages). Those recaps are then withheld from partial readers and flagged for Fix.

Steps to reproduce

  1. Create a Roleplay group chat with Maukie, Pantalone and a narrator, and enable Advanced Memory.
  2. Hide one message of a scene from Pantalone before its summary is written, so the scene's recap is shared by Maukie and Pantalone with a hidden part.
  3. Close the scene and let Advanced Memory summarize it. The recap is recalled for Pantalone (and, in a merged chat, for the group).
  4. Add Cara to the chat.
  5. Open the Prompt preview for Pantalone's reply: the scene recap is gone (no-recall-candidates in a merged chat). In an individual chat Pantalone loses it too, while Maukie, who sees every message of it, keeps it. The scene is now listed as needing Fix.

Environment

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

Logs, screenshots, or video

Reproduced with an Advanced Memory regression fixture on staging. Leaving the newcomer out of the visibility readers brings the recap back in both group modes.

Additional context

  • Discord report by kociol21 (2026-10-07), tracked in #7237. Related: #7239.
  • Recaps that were written before a fix cannot know which characters they covered, so they keep today's comparison; Fix repairs them once.

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/7245 Originally assigned to: @SpicyMarinara on GitHub. ## Summary When a character joins a Roleplay group chat, Advanced Memory holds back every earlier scene recap whose scene had a message hidden from one of its characters. The recaps stay saved, but they drop out of the prompt for the characters with partial access and show up as needing review until **Fix** writes them again with paid helper calls. This happens in both merged and individual group chats. This is part of the Discord report by **kociol21** behind #7237: "adding a new character midway ... older summaries remained saved, but their content disappeared from the prompt." #7239 fixes the merged recall rule for newcomers but not this. ## Expected behavior - A character who joins later does not change what the existing characters may know, so it must not invalidate an existing scene recap. - A change that matters still withholds the recap exactly as today: renaming a character who was a reader when the recap was written, or changing which of the scene's messages such a character can see. - A recap is never shown to a reader whose visibility of its sources changed since it was written. ## Actual behavior The saved scene-visibility revision (`sceneVisibility()` in `packages/server/src/services/advanced-memory.ts`) hashes the visibility of **every** character currently in the chat. Adding a character changes that hash, so `hasCurrentSceneVisibility()` turns false for every recap that saved one (scenes with partly hidden messages). Those recaps are then withheld from partial readers and flagged for Fix. ## Steps to reproduce 1. Create a Roleplay group chat with Maukie, Pantalone and a narrator, and enable Advanced Memory. 2. Hide one message of a scene from Pantalone before its summary is written, so the scene's recap is shared by Maukie and Pantalone with a hidden part. 3. Close the scene and let Advanced Memory summarize it. The recap is recalled for Pantalone (and, in a merged chat, for the group). 4. Add Cara to the chat. 5. Open the Prompt preview for Pantalone's reply: the scene recap is gone (`no-recall-candidates` in a merged chat). In an individual chat Pantalone loses it too, while Maukie, who sees every message of it, keeps it. The scene is now listed as needing Fix. ## Environment - Marinara Engine version: 2.5.0 / `staging` c2f214aa7 - Install type: source - OS + version: any - Browser or app shell: any ## Logs, screenshots, or video Reproduced with an Advanced Memory regression fixture on `staging`. Leaving the newcomer out of the visibility readers brings the recap back in both group modes. ## Additional context - Discord report by kociol21 (2026-10-07), tracked in #7237. Related: #7239. - Recaps that were written before a fix cannot know which characters they covered, so they keep today's comparison; **Fix** repairs them once. ## 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:47 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

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

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