[GH-ISSUE #2927] [Issue]: Macros not evaluating inside <memories> and <agents> blocks #1504

Closed
opened 2026-10-21 05:37:13 +07:00 by bsakaguchi · 2 comments
Owner

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

Summary

In Marinara Engine v2.0.6, the {{char}} and {{user}} macros are not being evaluated when they appear inside <memories> or <agents> blocks in request payloads. The user reports this based on logs and provided examples.

Expected behavior

Macros such as {{char}} and {{user}} should be evaluated consistently inside <memories> and <agents> blocks the same way they are elsewhere in the request.

Actual behavior

{{char}} and {{user}} remain unevaluated inside <memories> and <agents> blocks.

Steps to reproduce

  1. Use Marinara Engine v2.0.6.
  2. Send a request containing {{char}} and {{user}} macros inside <memories> and/or <agents> blocks.
  3. Inspect the resulting request/logs and observe that the macros are not evaluated.

Environment

  • Marinara Engine version: 2.0.6
  • Install type: Not provided
  • OS + version: Not provided in the Discord context.
  • Browser or app shell: Not provided in the Discord context.

Logs, screenshots, or video

User reports this was observed in logs. Example blocks were provided in the Discord message, but no screenshots or video were attached.

Additional context

The issue was reported with examples showing {{char}} and {{user}} inside <memories> and <agents> content. No further reproduction details were provided.

Discord thread: [Bug] Macros not evaluating in or
Discord thread link: https://discord.com/channels/1417099416812392641/1520872026380697781
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-06-28T19:22:27.525Z] AgentX: v 2.0.6

Looking through the logs, I found that {{char}} and {{user}} macros aren't being evaluated within the <memories> or <agents> blocks of the requests.

` ` `
<memories>\nThe following are recalled fragments from earlier in this conversation. Use them to maintain continuity, remember past events, and stay in character — but do not explicitly reference \"remembering\" unless it's natural.\n--- Memory 1 ---\nNarrator: ... {{char}} ... {{user}}"\n</memories>"

<agents>\nFulfill the requested task here and return the output in the format specified:\nTrack NPCs and party members currently present in the scene after the latest assistant message. Do NOT include the player's {{user}}; ... </agents>
` ` `
[Discord message: https://discord.com/channels/1417099416812392641/1520872026380697781/1520872026380697781]

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 (Jun 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2927 ## Summary In Marinara Engine v2.0.6, the `{{char}}` and `{{user}}` macros are not being evaluated when they appear inside `<memories>` or `<agents>` blocks in request payloads. The user reports this based on logs and provided examples. ## Expected behavior Macros such as `{{char}}` and `{{user}}` should be evaluated consistently inside `<memories>` and `<agents>` blocks the same way they are elsewhere in the request. ## Actual behavior `{{char}}` and `{{user}}` remain unevaluated inside `<memories>` and `<agents>` blocks. ## Steps to reproduce 1. Use Marinara Engine v2.0.6. 2. Send a request containing `{{char}}` and `{{user}}` macros inside `<memories>` and/or `<agents>` blocks. 3. Inspect the resulting request/logs and observe that the macros are not evaluated. ## Environment - Marinara Engine version: 2.0.6 - Install type: Not provided - OS + version: Not provided in the Discord context. - Browser or app shell: Not provided in the Discord context. ## Logs, screenshots, or video User reports this was observed in logs. Example blocks were provided in the Discord message, but no screenshots or video were attached. ## Additional context The issue was reported with examples showing `{{char}}` and `{{user}}` inside `<memories>` and `<agents>` content. No further reproduction details were provided. Discord thread: [Bug] Macros not evaluating in <memories> or <agents> Discord thread link: https://discord.com/channels/1417099416812392641/1520872026380697781 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-06-28T19:22:27.525Z] AgentX: v 2.0.6 Looking through the logs, I found that {{char}} and {{user}} macros aren't being evaluated within the <memories> or <agents> blocks of the requests. ` ` ` <memories>\nThe following are recalled fragments from earlier in this conversation. Use them to maintain continuity, remember past events, and stay in character — but do not explicitly reference \"remembering\" unless it's natural.\n--- Memory 1 ---\nNarrator: ... {{char}} ... {{user}}"\n</memories>" <agents>\nFulfill the requested task here and return the output in the format specified:\nTrack NPCs and party members currently present in the scene after the latest assistant message. Do NOT include the player's {{user}}; ... </agents> ` ` ` [Discord message: https://discord.com/channels/1417099416812392641/1520872026380697781/1520872026380697781] ``` </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:37:13 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jun 28, 2026):

This might have already been addressed, but checking just for sure.

<!-- gh-comment-id:4827185810 --> @SpicyMarinara commented on GitHub (Jun 28, 2026): This might have already been addressed, but checking just for sure.
Author
Owner

@SpicyMarinara commented on GitHub (Jun 28, 2026):

Fixed in the staging workspace. Memory-recall lines are now resolved through the prompt macro resolver before they enter the block, and agent prompt templates now resolve standard prompt macros like {{char}}/{{user}} after agent setting macros before being wrapped in . Added prompt regression coverage for both paths.\n\nVerified with:\n- pnpm regression:prompt\n- pnpm check

<!-- gh-comment-id:4827289132 --> @SpicyMarinara commented on GitHub (Jun 28, 2026): Fixed in the staging workspace. Memory-recall lines are now resolved through the prompt macro resolver before they enter the <memories> block, and agent prompt templates now resolve standard prompt macros like {{char}}/{{user}} after agent setting macros before being wrapped in <agents>. Added prompt regression coverage for both paths.\n\nVerified with:\n- pnpm regression:prompt\n- pnpm check
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#1504
No description provided.