mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8382] [Issue]: Linked roleplay OOC extraction discards whole replies #8334
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#8334
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 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8382
Originally assigned to: @SpicyMarinara on GitHub.
Summary
In a linked roleplay chat, a model response consisting entirely of a valid ... block is stripped to an empty string and discarded. The extracted OOC content is not shown in the roleplay chat or posted to the connected conversation.
Expected behavior
The generated response should remain visible or the extracted OOC content should be posted to the connected conversation as promised by the linked-chat instruction. If post-processing removes all visible text, the user should receive a diagnostic identifying post-processing as the cause.
Actual behavior
When the entire response is wrapped in a case-insensitive, properly closed ... block, cleanGeneratedReply removes the block, leaves an empty response, and discards the turn. The user sees a toast claiming the model returned no visible text, although visible tokens were generated. The extracted content does not appear in either chat.
Steps to reproduce
Environment
Logs, screenshots, or video
Support diagnostics report build 2.5.1+e5ead06ac2fe, commit
e5ead06ac2. Repeated server log: {"finishReason":"stop","completionTokens":486,"completionReasoningTokens":53,"contentReplaced":true,"maxTokens":8192,"msg":"[generate] Empty response after post-processing"}. Debug output showed a 1,729-character response wrapped in ..., with 376 visible completion tokens and 53 reasoning tokens. The output stopped normally and did not approach the 8,192-token limit.Additional context
The issue requires roleplay mode, not impersonating, a connectedChatId, and a response wholly wrapped in a correctly closed OOC block. It was observed 10 times in a linked chat over 95 minutes and zero times in a non-linked chat under the same model and connection. The connected-chat injection explicitly instructs the model to use tags and says the text will be posted to the conversation. The likely failure is in packages/server/src/routes/generate/reply-text-cleanup.ts, which strips OOC blocks without guarding against an empty result. The extracted text was not relocated and no ooc_influences record was observed. Post-processing agents and debug mode did not affect reproduction.
Discord thread: Linked-chat OOC extraction empties the reply when the whole response is one blockVersion: 2.5.
Discord thread link: https://discord.com/channels/1417099416812392641/1564369026812084355
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)
Discord thread transcript (7 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 (Oct 26, 2026):
@SpicyMarinara / Codex is taking this issue. I confirmed that OOC-only replies are stripped to empty before their extracted text reaches the linked-chat posting path. I am preparing a focused preservation fix and regression coverage for OOC-only, mixed, unlinked, and impersonated replies.
@SpicyMarinara commented on GitHub (Oct 26, 2026):
Fixed in #8383 and merged into staging as
696a510e3. OOC-only replies now remain visible in Roleplay; mixed replies retain linked-conversation forwarding. All required checks and final-head review passed, including 1,118 regression files and both hosted smoke suites. The merge tree matches the tested head. Postmerge workflows are still running.