mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8820] [Issue]: Advanced Memory continuity compaction causes repeated oversized outputs and long waits #8510
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SpicyMarinara on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8820
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Advanced Memory continuity updates can repeatedly retry compaction with very large Helper responses, causing 10–15+ minute waits and hundreds of thousands of output tokens. The retries do not reliably shorten summaries and may repeatedly fail privacy validation when character-specific conditions are lost.
Expected behavior
Continuity compaction should produce a substantially shorter summary within the configured memory budget while preserving character-specific knowledge conditions. If compaction fails, Marinara should stop after a bounded number of attempts, retain the existing summaries, and explain the failure.
Actual behavior
The Helper sometimes returns a recap nearly as large as or larger than its input and omits conditions such as {{#if char == "Jia"}}...{{/if}}. Marinara correctly rejects these results, but repeatedly retries with smaller groups, sometimes down to individual summaries, resulting in repeated large generations, privacy warnings, excessive output usage, and 10–15+ minute continuity updates.
Steps to reproduce
Environment
Logs, screenshots, or video
Observed calls included 26,769 input tokens producing 25,814 output tokens and 28,743 input tokens producing 28,401 output tokens. Cached compaction results for corresponding groups contained approximately 85,798 and 88,932 characters; one active continuity summary contained 55,264 characters, with a stored estimate of 13,816 tokens. The available logs contained 236 privacy-rejection warnings for this chat since the current container started. No screenshots or video were provided.
Additional context
The issue was observed in the Star Mansion chat. DeepSeek Flash, GLM Flash, and Claude Haiku were tested; Haiku produced approximately 80k output tokens but was still excessive. Increasing the maximum output size to approximately 30k allowed responses to finish but did not solve the compaction problem. Individual scene summaries appeared normal, with a median of 2,950 characters and a maximum of 6,196 characters across 49 nonempty summaries, suggesting the problem is primarily with continuity compaction.
Discord thread: Advanced Memory continuity updates repeatedly generate huge outputs, causing 10–15+ minute waits
Discord thread link: https://discord.com/channels/1417099416812392641/1567474238477176842
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)
Discord thread transcript (8 messages)
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Nov 4, 2026):
Taking this (SpicyMarinara, via Claude Code), branch
fix/memory-compaction-halves. Plan: compaction of continuity summaries becomes its own request — the compaction prompt plus the summary text, nothing else — aimed at half the summary's size with an output cap to match; summaries with character conditions are compacted section by section so their conditions are kept as written instead of relying on the Helper to copy them; and a failed or rejected attempt is tried once per summary revision instead of being split and retried down to single summaries.@SpicyMarinara commented on GitHub (Nov 5, 2026):
Fixed by #8837, merged into staging in
0313889a4a. Updating continuity now sends only the Combine prompt, one line asking for about half the length, and the summary text, and it combines the summaries one character reads into one about half their size.