mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #924] [Issue]: {{char}} can resolve to the wrong character in multi-character group prompts #449
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#449
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 @NeoKazuya on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/924
Summary
In group prompts with multiple characters, character-specific prompt text can be filled with the first character in the chat instead of the character that owns that text or the character currently replying.
This affects prompt text that uses character macros such as
{{char}}. A visible example is an individual-mode group reply: with Narration Style set toSecond Personand Narrative Perspective set toCharacter's, Bob's model request can includeRespond ONLY as Bob.while the same request still says to write from Alice's perspective.Expected behavior
When prompt text belongs to Bob, character macros that refer to that character should use Bob. That includes Bob's separate reply in an individual-mode group chat, Bob's character fields, and Bob's dialogue examples.
For example, the default output-format instruction should say to write from Bob's perspective for Bob's reply. Regenerating Bob's individual-mode group message should behave the same way.
Actual behavior
Prompt text can be filled with the first character before the app sends or inserts Bob-specific prompt text.
As a result, Bob's model request can contain:
while the same request also contains:
Targeted regeneration of Bob's message in an individual-mode group chat shows the same mismatch.
Steps to reproduce
IndividualSecond PersonCharacter'sExpected: Bob's reply uses Bob in the Character's POV instruction.
Actual: Bob's reply contains
Respond ONLY as Bob.but the output-format instruction still uses Alice in the Character's POV text.Environment
1.5.9mainand reproduced on currentstagingatf60f2a27572a3929d8b787cda2fb6efb3c5a461bLogs, screenshots, or video
Observed current-staging prompt/model request snippets from the affected Bob reply:
The same outgoing request contains both of these instructions:
The same first-character substitution also showed up in broader prompt sections when those sections contained
{{char}}:With an active constant lorebook entry containing
LORE_NAME={{char}}, the Bob request also contained:Additional context
This is adjacent to the regen instruction fix in PR #178, but separate from it: the regen request now knows to say
Respond ONLY as Bob., while character prompt values can still be frozen to Alice.It's also adjacent to the lorebook/regex macro work in #738 / #736, but this issue is about multi-character group prompt text that should resolve against a known responder or character owner.
The character-card, example-dialogue, and lorebook cases are included as broader affected cases because they need to stay correct at the same time.
Respond ONLY as Bob.works because it's added after Bob has already been selected as the responder. The Character's POV line doesn't work because it uses{{char}}, which was already filled as Alice earlier in prompt building.Temporary workaround: prompt authors can avoid the visible POV mismatch by not using
{{char}}in the Character's POV instruction and instead writing a generic phrase such asthe currently replying character. That works for this visible symptom because the same Bob request already has the directRespond ONLY as Bob.instruction identifying the responder. The workaround is less explicit, and it doesn't fix existing presets, card fields, examples, or lorebook entries that already use{{char}}.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 (May 17, 2026):
Thank you for the PR, merged!