[GH-ISSUE #4351] [Issue]: Custom trackers lose responder identity in multi-character scenes #2360

Closed
opened 2026-10-21 05:47:36 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4351

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Post-processing agents cannot reliably identify which character generated the current response in group or multi-character roleplay scenes. This causes custom trackers to misattribute or omit state changes.

Expected behavior

When Name Prefix is enabled, the responding character's identity should be preserved for post-processing agents, either in context.mainResponse or through a responder field or macro.

Actual behavior

context.mainResponse is placed in <assistant_response> without the speaker name. The char macro resolves to the entire roster, and AgentContext does not expose a responderName or speaker field, so first-person responses can be attributed to the wrong character or ignored.

Steps to reproduce

  1. Create a group or multi-character scene in Roleplay mode.
  2. Enable Name Prefix.
  3. Configure a custom tracker or other post-processing agent that reads context.mainResponse.
  4. Generate a first-person response from one character.
  5. Observe that the tracker receives the response without a reliable indication of which character produced it.

Environment

  • Marinara Engine version: v2.3.4 (build dc0b392)
  • Install type: installer
  • OS + version: Windows 11 Home
  • Browser or app shell: Not provided

Logs, screenshots, or video

Not provided in the Discord context.

Additional context

Mode: Roleplay. History messages reportedly include a ${speaker}: label, while context.mainResponse does not. A suggested fix was to carry the responding character's name into AgentContext and either prefix mainResponse with it or expose a {{responder}} macro. Marinara confirmed that Name Prefix should be respected when enabled.

Discord thread: Custom trackers misattribute actions in group / multi-character scenes
Discord thread link: https://discord.com/channels/1417099416812392641/1532728050008195354
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-07-31T12:34:03.832Z] уααααѕѕ: [full transparency - claude wrote this message for me and convinced me to post it]

- OS: Windows 11 Home
- Install method: Windows installer
- Marinara Engine version: v2.3.4 (build dc0b392)
- Mode: Roleplay

In group / multi-character scenes, post-processing agents (custom trackers) don't seem to get told which character produced the current turn's response. context.mainResponse goes into <assistant_response> with the speaker name stripped, and no agent macro exposes the responder — char resolves to the whole roster, and there's no responderName/speaker field on AgentContext. So with first-person narration and multiple characters, the tracker can't tell whose "I" it's reading, and attributes state changes to the wrong character (or doesn't update).

For whatever it's worth, Claude's guess at a fix: carry the responding character's name into AgentContext and either prefix mainResponse with it (the way history messages already get a ${speaker}: label) or expose a {{responder}} macro.

Not asking for anything — just putting it on the radar in case it's a real gap and not already known. Could easily have missed an existing mechanism.
[Discord message: https://discord.com/channels/1417099416812392641/1532728050008195354/1532728050008195354]

[2026-07-31T13:18:35.840Z] Marinara: Oh, yeah, if we have Name Prefix on, it should be respected.
[Discord message: https://discord.com/channels/1417099416812392641/1532728050008195354/1532739257222041701]

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @SpicyMarinara on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4351 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Post-processing agents cannot reliably identify which character generated the current response in group or multi-character roleplay scenes. This causes custom trackers to misattribute or omit state changes. ## Expected behavior When Name Prefix is enabled, the responding character's identity should be preserved for post-processing agents, either in context.mainResponse or through a responder field or macro. ## Actual behavior context.mainResponse is placed in <assistant_response> without the speaker name. The char macro resolves to the entire roster, and AgentContext does not expose a responderName or speaker field, so first-person responses can be attributed to the wrong character or ignored. ## Steps to reproduce 1. Create a group or multi-character scene in Roleplay mode. 2. Enable Name Prefix. 3. Configure a custom tracker or other post-processing agent that reads context.mainResponse. 4. Generate a first-person response from one character. 5. Observe that the tracker receives the response without a reliable indication of which character produced it. ## Environment - Marinara Engine version: v2.3.4 (build dc0b392) - Install type: installer - OS + version: Windows 11 Home - Browser or app shell: Not provided ## Logs, screenshots, or video Not provided in the Discord context. ## Additional context Mode: Roleplay. History messages reportedly include a ${speaker}: label, while context.mainResponse does not. A suggested fix was to carry the responding character's name into AgentContext and either prefix mainResponse with it or expose a {{responder}} macro. Marinara confirmed that Name Prefix should be respected when enabled. Discord thread: Custom trackers misattribute actions in group / multi-character scenes Discord thread link: https://discord.com/channels/1417099416812392641/1532728050008195354 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-07-31T12:34:03.832Z] уααααѕѕ: [full transparency - claude wrote this message for me and convinced me to post it] - OS: Windows 11 Home - Install method: Windows installer - Marinara Engine version: v2.3.4 (build dc0b392) - Mode: Roleplay In group / multi-character scenes, post-processing agents (custom trackers) don't seem to get told which character produced the current turn's response. context.mainResponse goes into <assistant_response> with the speaker name stripped, and no agent macro exposes the responder — char resolves to the whole roster, and there's no responderName/speaker field on AgentContext. So with first-person narration and multiple characters, the tracker can't tell whose "I" it's reading, and attributes state changes to the wrong character (or doesn't update). For whatever it's worth, Claude's guess at a fix: carry the responding character's name into AgentContext and either prefix mainResponse with it (the way history messages already get a ${speaker}: label) or expose a {{responder}} macro. Not asking for anything — just putting it on the radar in case it's a real gap and not already known. Could easily have missed an existing mechanism. [Discord message: https://discord.com/channels/1417099416812392641/1532728050008195354/1532728050008195354] [2026-07-31T13:18:35.840Z] Marinara: Oh, yeah, if we have Name Prefix on, it should be respected. [Discord message: https://discord.com/channels/1417099416812392641/1532728050008195354/1532739257222041701] ``` </details> ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:47:36 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 31, 2026):

SpicyMarinara is taking this in agent/issue-sweep-4350-4361. Work is tracked in draft PR #4362.

<!-- gh-comment-id:5145469215 --> @SpicyMarinara commented on GitHub (Jul 31, 2026): SpicyMarinara is taking this in `agent/issue-sweep-4350-4361`. Work is tracked in draft PR #4362.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2360
No description provided.