[GH-ISSUE #6924] [Issue]: Unresolved Character-Id macro for active chat characters #3884

Closed
opened 2026-10-21 06:08:26 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @argxentakato on GitHub (Oct 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6924

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The {{21-character-card-ID}} macro appears not to resolve when it references a character who is already participating in the current chat. Instead of replacing the macro with that character's name, the literal {{21-character-card-ID}} text remains in the prompt content.

This appears to contradict the documentation. The documentation describes {{21-character-card-ID}} as:

Name of another character, pulls the card into the context; referenced by its exact 21-character ID

While it is certainly desirable to avoid duplicating the active character's card content in the referenced-character context block, this macro should still be replaced with that character's name regardless of whether the character is already active in the chat.

Expected behavior

When {{21-character-card-ID}} references a character who is already an active participant in the chat, the macro should still resolve to that character's name in the output, even though the full card context does not need to be duplicated.

Actual behavior

When {{21-character-card-ID}} references a character who is already an active participant in the chat, the macro is left unresolved (the literal {{21-character-card-ID}} text remains in the prompt) instead of being replaced with that character's name.

Steps to reproduce

  1. Create a chat and add a character to it as a participant.
  2. Put that character's ID in chat text or an activated character's card fields (e.g. description) as {{21-character-card-ID}}.
  3. Generate a response and inspect the resolved prompt/context.
  4. Observe that the macro does not resolve to the character's name and the literal macro text remains, whereas referencing a non-active character's ID the same way correctly resolves to that character's name.

Environment

  • Marinara Engine version: v2.4.6
  • Install type: installer
  • OS + version: Windows 11 25H2
  • Browser or app shell: Firefox 157.0

Logs, screenshots, or video

No logs or media provided.

Additional context

As part of the current implementation specifications, macro-context.ts excludes the active character before replacing {{21-character-card-ID}} with the character's name:

github.com/Pasta-Devs/Marinara-Engine@12a0acd5b7/packages/server/src/services/prompt/macro-context.ts (L431-L433)

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 @argxentakato on GitHub (Oct 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6924 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The `{{21-character-card-ID}}` macro appears not to resolve when it references a character who is already participating in the current chat. Instead of replacing the macro with that character's name, the literal `{{21-character-card-ID}}` text remains in the prompt content. This appears to contradict the documentation. The documentation describes `{{21-character-card-ID}}` as: > Name of another character, pulls the card into the context; referenced by its exact 21-character ID While it is certainly desirable to avoid duplicating the active character's card content in the referenced-character context block, this macro should still be replaced with that character's name regardless of whether the character is already active in the chat. ## Expected behavior When `{{21-character-card-ID}}` references a character who is already an active participant in the chat, the macro should still resolve to that character's name in the output, even though the full card context does not need to be duplicated. ## Actual behavior When `{{21-character-card-ID}}` references a character who is already an active participant in the chat, the macro is left unresolved (the literal `{{21-character-card-ID}}` text remains in the prompt) instead of being replaced with that character's name. ## Steps to reproduce 1. Create a chat and add a character to it as a participant. 2. Put that character's ID in chat text or an activated character's card fields (e.g. description) as `{{21-character-card-ID}}`. 3. Generate a response and inspect the resolved prompt/context. 4. Observe that the macro does not resolve to the character's name and the literal macro text remains, whereas referencing a non-active character's ID the same way correctly resolves to that character's name. ## Environment - Marinara Engine version: v2.4.6 - Install type: installer - OS + version: Windows 11 25H2 - Browser or app shell: Firefox 157.0 ## Logs, screenshots, or video No logs or media provided. ## Additional context As part of the current implementation specifications, `macro-context.ts` excludes the active character before replacing `{{21-character-card-ID}}` with the character's name: https://github.com/Pasta-Devs/Marinara-Engine/blob/12a0acd5b7823abeaf3e05ad39a3a07d957e9ffc/packages/server/src/services/prompt/macro-context.ts#L431-L433 ## 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 06:08:26 +07:00
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#3884
No description provided.