mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #677] [Issue]: <context> and <commands> tags leak into user turn in Conversation mode #318
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#318
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 @Faird1 on GitHub (May 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/677
Summary
In Conversation mode, the engine's injected
<context>and<commands>XML tags appear to leak into the user message turn, causing the AI to perceive them as user-sent content rather than as silent system instructions.Expected behavior
<context>and<commands>tags should be injected into the system prompt only and remain fully transparent — the AI should have no awareness of them as part of the conversation.Actual behavior
The AI (Professor Mari) explicitly referenced the injected tags in her response, stating that the user had "sent" her
<context>and<commands>tags — which the user never typed. The user cannot see these tags in the UI at all, confirming the leak is on the backend injection side.Steps to reproduce
<context>and<commands>XML tags as if they were written by the userEnvironment
Logs, screenshots, or video
(sorry for Russian, but yeah)

Additional context
The tags are invisible to the user in the UI — only the model receives them, which confirms this is a backend injection placement issue. The tags are likely being appended to the user turn instead of (or in addition to) the system prompt.
@SpicyMarinara commented on GitHub (May 11, 2026):
Model's skill issue: all the newer models recognize XML tags as instructions. This is an intended design. They are in the last user message, since otherwise the model forgets to use them if the conversation goes on too long; I haven't had any issue with models recognizing them as that, especially since we specify what they are.
You have a toggle to disable them if you don't want to send them to the model (in Chat Settings -> Commands). I can move to the system message, but it only applies to the most recent messages and can be skipped if we do that, so I would rather avoid it.