[GH-ISSUE #3094] [Issue]: Immersive HTML agent appears to inject preset text into chat history instead of acting as post-processing #1655

Closed
opened 2026-10-21 05:41:21 +07:00 by bsakaguchi · 4 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The immersive HTML agent appears to be implemented as copied preset text appended into chat history, rather than as a visual post-processing layer. This means the main model may see the immersive instructions instead of only a separate rendering agent.

Expected behavior

Immersive HTML should behave as a post-processing effect: read recent messages, render/decorate the chat with HTML/CSS, and not affect the main model’s input context.

Actual behavior

The immersive HTML agent looks like it is just a Marinara preset block injected into the end of chat history as instruction text, similar to a preset on/off toggle, rather than a separate rendering layer.

Steps to reproduce

  1. Enable or inspect the immersive HTML agent/preset behavior in Marinara Engine.
  2. Observe how the feature is represented in the chat/preset configuration and how it is applied to conversation 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

Attached screenshot in Discord: image.png.

Additional context

Reporter suggests the feature should be split into two models/roles: model A for RP generation and model B for visual HTML/CSS decoration, with model A not seeing the immersive instructions.

Discord message: Discord message from Loinne
Discord message link: https://discord.com/channels/1417099416812392641/1495493775617687775/1521516010858086511
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord message transcript (1 message)
[2026-06-30T14:01:25.389Z] Loinne: I just noticed that "immersive HTML" agent looks like this:

So it's just copy from a Marinara Preset block from long ago - just injecting into the end of chat history as instruction? Usually people have something like that as `on/off` in the preset already.
I wish it was a `post-processing` effect, which reads X amount of messages in context and decorates the chat (limited by chat i-frame maybe), and the assistant text with  HTML and CSS, but without actually affecting input context of main model. So main model A handles RP as-is, plain text or however it's configured by preset, and "Immersive Agent" model B decorates it visually, without model A seeing it

[attached image 1: https://cdn.discordapp.com/attachments/1495493775617687775/1521516010455175378/image.png?ex=6a451db5&is=6a43cc35&hm=36c75056ed266f04bfafdb65898bc7394b3c4c40007041574d3aaca4a319a4fe&]
[Discord message: https://discord.com/channels/1417099416812392641/1495493775617687775/1521516010858086511]

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 30, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3094 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The immersive HTML agent appears to be implemented as copied preset text appended into chat history, rather than as a visual post-processing layer. This means the main model may see the immersive instructions instead of only a separate rendering agent. ## Expected behavior Immersive HTML should behave as a post-processing effect: read recent messages, render/decorate the chat with HTML/CSS, and not affect the main model’s input context. ## Actual behavior The immersive HTML agent looks like it is just a Marinara preset block injected into the end of chat history as instruction text, similar to a preset on/off toggle, rather than a separate rendering layer. ## Steps to reproduce 1. Enable or inspect the immersive HTML agent/preset behavior in Marinara Engine. 2. Observe how the feature is represented in the chat/preset configuration and how it is applied to conversation 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 Attached screenshot in Discord: image.png. ## Additional context Reporter suggests the feature should be split into two models/roles: model A for RP generation and model B for visual HTML/CSS decoration, with model A not seeing the immersive instructions. Discord message: Discord message from Loinne Discord message link: https://discord.com/channels/1417099416812392641/1495493775617687775/1521516010858086511 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord message transcript (1 message)</summary> ```text [2026-06-30T14:01:25.389Z] Loinne: I just noticed that "immersive HTML" agent looks like this: So it's just copy from a Marinara Preset block from long ago - just injecting into the end of chat history as instruction? Usually people have something like that as `on/off` in the preset already. I wish it was a `post-processing` effect, which reads X amount of messages in context and decorates the chat (limited by chat i-frame maybe), and the assistant text with HTML and CSS, but without actually affecting input context of main model. So main model A handles RP as-is, plain text or however it's configured by preset, and "Immersive Agent" model B decorates it visually, without model A seeing it [attached image 1: https://cdn.discordapp.com/attachments/1495493775617687775/1521516010455175378/image.png?ex=6a451db5&is=6a43cc35&hm=36c75056ed266f04bfafdb65898bc7394b3c4c40007041574d3aaca4a319a4fe&] [Discord message: https://discord.com/channels/1417099416812392641/1495493775617687775/1521516010858086511] ``` </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.
Author
Owner

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

It's not really a bug, rather a cool idea to rework the agent.

Change processing to post-processing. It should have the same ability to edit the output, aka work the same way as Prose Guardian and Continuity Checker do. It should analyze the output and based on it, either decide not to create any immersive HTML elements (if the scene doesn't allow for them, e.g.,: during a dialogue) or create them. For example, if the narration mentions the protagonist looking at a poster, it can create a poster. If they're reading a letter, the agent can generate it with CSS/HTML. It's crucial that this agent does not change the meaning of the output, only enhance it visually; so perhaps, if a character is reading a letter, it should be formatted like an actual letter.

We could even expand it to more advanced visual effects, maybe the entire box of the message being changed or a screen going dark. Anyway, yeah, agent rework.

<!-- gh-comment-id:4844438194 --> @SpicyMarinara commented on GitHub (Jun 30, 2026): It's not really a bug, rather a cool idea to rework the agent. Change processing to post-processing. It should have the same ability to edit the output, aka work the same way as Prose Guardian and Continuity Checker do. It should analyze the output and based on it, either decide not to create any immersive HTML elements (if the scene doesn't allow for them, e.g.,: during a dialogue) or create them. For example, if the narration mentions the protagonist looking at a poster, it can create a poster. If they're reading a letter, the agent can generate it with CSS/HTML. It's crucial that this agent does not change the meaning of the output, only enhance it visually; so perhaps, if a character is reading a letter, it should be formatted like an actual letter. We could even expand it to more advanced visual effects, maybe the entire box of the message being changed or a screen going dark. Anyway, yeah, agent rework.
Author
Owner

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

Confirmed the report: Immersive HTML is currently a static pre-generation prompt injection, not a runtime post-processing agent. I did not convert it in the v2.0.9 lag hotfix because the requested behavior is a feature rework: it should become a post-processing visual enhancer with text-rewrite style review/edit safety, and it must avoid changing the story meaning.\n\nLeaving this open as enhancement/scope-risk so it can be designed and tested separately instead of being slipped into the emergency agent/lag patch.

<!-- gh-comment-id:4844738433 --> @SpicyMarinara commented on GitHub (Jun 30, 2026): Confirmed the report: Immersive HTML is currently a static pre-generation prompt injection, not a runtime post-processing agent. I did not convert it in the v2.0.9 lag hotfix because the requested behavior is a feature rework: it should become a post-processing visual enhancer with text-rewrite style review/edit safety, and it must avoid changing the story meaning.\n\nLeaving this open as enhancement/scope-risk so it can be designed and tested separately instead of being slipped into the emergency agent/lag patch.
Author
Owner

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

We can do it, pookie.

<!-- gh-comment-id:4845792135 --> @SpicyMarinara commented on GitHub (Jun 30, 2026): We can do it, pookie.
Author
Owner

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

Addressed in draft PR #3109. Immersive HTML is now a post-processing text_rewrite visual enhancer instead of a static main-prompt injection, with regression coverage keeping it out of pre-generation runtime sections.

<!-- gh-comment-id:4846158351 --> @SpicyMarinara commented on GitHub (Jun 30, 2026): Addressed in draft PR #3109. Immersive HTML is now a post-processing `text_rewrite` visual enhancer instead of a static main-prompt injection, with regression coverage keeping it out of pre-generation runtime sections.
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#1655
No description provided.