[GH-ISSUE #3548] [Issue]: [Bug] Agent Prompt Template Overrides escapes < tags #1919

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

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Imported from the Discord thread "[Bug] Agent Prompt Template Overrides escapes < tags".

Expected behavior

Not provided in the Discord context.

Actual behavior

See the Discord context transcript below.

Steps to reproduce

  1. Not provided in the Discord context.

Environment

  • Marinara Engine version: Not provided
  • Install type: Not provided
  • OS + version: Not provided
  • Browser or app shell: Not provided

Logs, screenshots, or video

See any attachment links and screenshots in the context below.

Additional context

This issue was created automatically from Discord support context.

Discord thread: [Bug] Agent Prompt Template Overrides escapes < tags
Discord thread link: https://discord.com/channels/1417099416812392641/1526045603509829652
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (1 message)
[2026-07-13T02:00:24.433Z] AgentX: When using an Agent Prompt Template Override, < symbols used in the template are escaped, so the prompts are broken when the prompt is used as an override.

` ` `Lorebook Keeper Prompt template:
Agent \"lorebook-keeper\" (Lorebook Keeper):\n    You are Lorebook Keeper for chat/roleplay continuity. Record only durable facts from the latest assistant response that will help future generations remember the world, characters, factions, locations, items, events, powers, relationships, or reusable history.\n    Skip trivial momentary actions, temporary moods, ordinary scene beats, and facts already captured by &lt;chat_summary>. Check &lt;existing_entries> first: update a matching entry instead of creating duplicates. 
` ` `

The <chat_summary> and <existing_entries> are turned into &lt;chat_summary> and &lt;existing_entries>. The prompt is the default prompt, just used as a override.
[Discord message: https://discord.com/channels/1417099416812392641/1526045603509829652/1526045603509829652]

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 13, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3548 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Imported from the Discord thread "[Bug] Agent Prompt Template Overrides escapes < tags". ## Expected behavior Not provided in the Discord context. ## Actual behavior See the Discord context transcript below. ## Steps to reproduce 1. Not provided in the Discord context. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video See any attachment links and screenshots in the context below. ## Additional context This issue was created automatically from Discord support context. Discord thread: [Bug] Agent Prompt Template Overrides escapes < tags Discord thread link: https://discord.com/channels/1417099416812392641/1526045603509829652 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (1 message)</summary> ```text [2026-07-13T02:00:24.433Z] AgentX: When using an Agent Prompt Template Override, < symbols used in the template are escaped, so the prompts are broken when the prompt is used as an override. ` ` `Lorebook Keeper Prompt template: Agent \"lorebook-keeper\" (Lorebook Keeper):\n You are Lorebook Keeper for chat/roleplay continuity. Record only durable facts from the latest assistant response that will help future generations remember the world, characters, factions, locations, items, events, powers, relationships, or reusable history.\n Skip trivial momentary actions, temporary moods, ordinary scene beats, and facts already captured by &lt;chat_summary>. Check &lt;existing_entries> first: update a matching entry instead of creating duplicates. ` ` ` The <chat_summary> and <existing_entries> are turned into &lt;chat_summary> and &lt;existing_entries>. The prompt is the default prompt, just used as a override. [Discord message: https://discord.com/channels/1417099416812392641/1526045603509829652/1526045603509829652] ``` </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:43:48 +07:00
  • closed this issue
  • added the
    in-pr
    bug
    labels
Author
Owner

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

I’m addressing this in draft PR #3556 and will close the issue after the fix and regression coverage are verified.

<!-- gh-comment-id:4957235745 --> @SpicyMarinara commented on GitHub (Jul 13, 2026): I’m addressing this in draft PR #3556 and will close the issue after the fix and regression coverage are verified.
Author
Owner

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

Addressed in #3556. Literal XML output-contract tags are preserved in agent prompt overrides, while values inserted through macros remain XML-escaped. Regression coverage includes the reported tags and an attempted angle-bracket injection.

<!-- gh-comment-id:4957459959 --> @SpicyMarinara commented on GitHub (Jul 13, 2026): Addressed in #3556. Literal XML output-contract tags are preserved in agent prompt overrides, while values inserted through macros remain XML-escaped. Regression coverage includes the reported tags and an attempted angle-bracket injection.
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#1919
No description provided.