mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7637] [MERGED] fix(memory): keep Helper replies that end in Anthropic's "end_turn" #7849
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#7849
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7637
Author: @SpicyMarinara
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/recollections-backfill-resume📝 Commits (2)
806f359fix(memory): keep Helper replies that end in Anthropic's "end_turn"e15ab07Merge branch 'staging' into fix/recollections-backfill-resume📊 Changes
4 files changed (+58 additions, -6 deletions)
View changed files
📝
packages/server/src/services/advanced-memory.ts(+4 -4)📝
packages/server/src/services/agents/agent-progress.ts(+2 -1)📝
packages/server/src/services/generation/empty-response-reason.ts(+12 -0)📝
scripts/regressions/advanced-memory-recollections.regression.ts(+40 -1)📄 Description
Linked issue
No linked issue: reported by the maintainer on 2026-10-14. Follow-up to #7605 (#7602, character recollections).
Why this change
"stop". The Anthropic provider passes Anthropic's ownstop_reasonthrough (provider-compatpins that), so a normal Claude reply ends in"end_turn". The same check guards the scene check, scene summaries, constant summaries, message visibility and the agent scene check. A Claude Helper therefore couldn't even get past the first scene check; it only worked before with Helpers that end in"stop", such as OpenAI models.What changed
length(cut off),abort,error,content_filter,refusal,tool_calls. Any other ending is accepted when the reply has what was asked for (the JSON fields, a summary): Anthropic'send_turnandstop_sequence, a local server's own wording, or no reason at all. The existing format checks still refuse a reply that lacks them.replyUnfinished(services/generation/empty-response-reason.ts), used by the four checks:askHelperJson(scene check and message visibility),summarize(scene summaries, constant summaries, recollections), the scene decision inclassify, and the agent scene check incompleteAgentCall.advanced-memory-recollectionssection 10 runs a Helper that ends every reply inend_turn. Scene check, summaries and backfilled recollections are all kept, each scene is paid for once, and nothing is asked again. Against staging's code it fails at the first scene check:The scene helper did not complete its scene decision; retry preparation(advanced-memory.ts:2749).Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run (results as reported, not a substitute for the boxes above):
pnpm check: exit 0, run beforetool_callswas added back to the unfinished endings (a one-word change).node scripts/run-regressions.mjs --filter advanced-memory: 18/18 passed, includingadvanced-memory-post-generation, which pins thatlength,error,abort,tool_callsandcontent_filterare still refused.--filter agent-scene-check1/1,--filter scene4/4,--filter agent19/19 passed.Manual verification notes
claude-opus-5-5) as the Advanced Memory Helper in a Roleplay chat whose scenes are already summarized: turn on Character recollections. They should be written for every scene, and the run should end without an error.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Not in this PR: Delete for a single recollection in the Inspector, and keeping a paid reply that fails a later step. Those follow in a separate PR so this fix isn't held up.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.