mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7455] [Issue]: Roll and function-call follow-ups trigger Advanced Memory cutoffs and fail near the limit #4153
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#4153
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 (Oct 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7455
Originally assigned to: @SpicyMarinara on GitHub.
Summary
With Advanced Memory, a dice roll or function-call round can cut the context (archive older scenes) even though the prompt that was sent fit the limit. A follow-up near the limit can also fail the whole reply.
Expected behavior
The automatic cutoff fires only when the input actually sent for the narrator or a character reaches or passes "Maximum allowed context before compression". Function-call rounds and roll follow-ups never cause a cutoff, and they never fail because of that limit.
Actual behavior
>, so an input exactly at the limit does not count.Steps to reproduce
Environment
3066f0c72)Logs, screenshots, or video
recordRequestUsageinpackages/server/src/routes/generate.routes.tskeepsMath.maxover every main request, including tool rounds and follow-ups.resetContextForActualInputinpackages/server/src/services/advanced-memory.tsuses<= maxContextTokensas its no-op guard.fitPromptForSendholds follow-ups to the Advanced Memory cap.Additional context
Follows #6550/#6551, which added the check on actual input.
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 (Oct 11, 2026):
Working on this: Claude Code on behalf of @SpicyMarinara. A PR against
stagingwill follow shortly.