mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5902] A model turn that is only a command tag is thrown away in Game Mode #3260
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#3260
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 @kolacheee on GitHub (Sep 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5902
Originally assigned to: @SpicyMarinara on GitHub.
When the model's whole reply is a command tag and nothing else, stripping the tag leaves an empty
response, and the engine has a path for exactly that: it saves a hidden anchor message so the commands
have something to attach to. But the test that decides whether to save that anchor counts only
Conversation-mode commands. In Game Mode those counters are always zero, so a Game turn that consists
solely of a command is discarded — no message, no swipe, nothing for anything to claim against.
Where it is. The empty-response branch calls
shouldSaveHiddenGenerationAnchoratpackages/server/src/routes/generate.routes.ts:7253-7258, passingparsedCommands.lengthandparsedRawCommandCount. The gate itself ispackages/server/src/routes/generate/spatial-transition-request.ts:44-54— it saves only if a spatialdirective was detected or one of those two counters is above zero. Both counters are only ever
incremented inside the block guarded by
conversationCommandsEnabled(
generate.routes.ts:6958, populated at:6976), and that flag ischatMode === "conversation" && chatMeta.characterCommands !== false(:2115). So in Game Mode thegate can only pass on the spatial-directive branch. When it does not pass, control falls through to
the empty-response error at
:7334-7339, which logs a warning, sends the user "The AI returned anempty response", and returns
nullbefore the save block.Why it matters. Today this mostly shows up as an unexplained "empty response" error when a Game turn
happens to be command-only, which is confusing but rare. It becomes structural the moment Game Mode
gets a command vocabulary of its own — a package-declared verb channel means the model can legitimately
answer a turn with just an instruction, and every such turn would be dropped with an error message the
user cannot act on. The user's mental model is "the GM did something and the app broke", when in fact
the engine understood the turn and then threw it away for having no prose.
The smallest honest fix is to make the anchor gate aware of whatever commands the current mode actually
parses, rather than only the Conversation ones — which means the gate needs a general "the model
emitted something actionable" input instead of two mode-specific counters. Worth deciding alongside
that: whether a prose-less command turn should produce a visible message row at all, or whether the
right answer for Game Mode is a distinct silent-but-saved shape, since the Conversation anchor exists
to carry command attachments and a Game verb may want different anchoring. Whatever the shape, the
current outcome — an error shown to the user for a turn the engine parsed fine — is the part that
should not survive.
@SpicyMarinara commented on GitHub (Sep 9, 2026):
Owner: @SpicyMarinara, assisted by Codex. Taking this issue in the assigned-issue sweep, PR #6007 targeting staging. Existing outside contributor PRs are excluded from the sweep.
@SpicyMarinara commented on GitHub (Sep 9, 2026):
Addressed in #6007, merged into
stagingas46d184753d. The final CI matrix and CodeRabbit review passed; validation details and manual follow-up checks are in the PR.