[GH-ISSUE #851] [Issue]: Built-in agent prompt sections do not insert agent output #411

Closed
opened 2026-10-20 17:28:34 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @cha1latte on GitHub (May 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/851

Originally assigned to: @Promansis on GitHub.

Summary

Adding the Knowledge Retrieval agent section to a prompt preset does not insert that agent's output into the prompt. A follow-up report indicates Prose Guardian has the same behavior, while custom agents do insert correctly.

Source: Discord report from Danshi with follow-up testing from Wozza. https://discord.com/channels/1417099416812392641/1504437914468225224

Expected behavior

When "Add as Prompt Section" is enabled for a built-in agent and that agent section is added to a prompt preset, the agent output should be inserted at the configured section location in the prompt.

Actual behavior

The Knowledge Retrieval agent section in the prompt preset is ignored, so its output is not inserted into the prompt at the configured place. Activating Knowledge Retrieval in chat settings appends its output to the end of the prompt, which shows the agent itself works. Custom agent sections insert at the expected location.

A follow-up tester reported the same end-of-prompt behavior for Prose Guardian and also observed that once an agent starts adding content to a prompt, it may keep doing so even after the prompt injection option is turned off on the agent.

Steps to reproduce

  1. Run Marinara Engine 1.5.9.
  2. Use RP chat.
  3. Enable "Add as Prompt Section" in the Knowledge Retrieval agent tab.
  4. Add the Knowledge Retrieval agent section to a prompt preset.
  5. Use that prompt preset in RP mode.
  6. Inspect the prompt sent to the model.
  7. Observe that the Knowledge Retrieval agent output is not inserted at the preset section.
  8. Activate Knowledge Retrieval in chat settings.
  9. Observe that the agent output appends to the end of the prompt instead.
  10. Add a custom agent section to the prompt preset.
  11. Observe that the custom agent output inserts at the correct place.

Marinara Engine version

1.5.9

Install type

Installer

OS + version

Windows 11. Reporter installed 1.5.2 via clean installer and auto-updated to 1.5.9.

Browser or app shell

Not specified.

Screenshots or video

Discord report referenced three attached screenshots:

  1. Agent sections in prompt preset.
  2. Prompt sent to model, where Knowledge Retrieval is missing but a custom agent is inserted.
  3. Agents activated in chat settings, where both agents append at the end.

No uploadable image files were provided to Codex, so they are not attached here. See source Discord thread.

Logs

No logs included.

Additional context

Mode: RP chat.

Agent: Knowledge Retrieval and possibly other built-in agents. Follow-up explicitly mentions Prose Guardian.

Preflight note: draft PR #838, "Fix Knowledge Retrieval prompt preset sections", appears likely related to this report.

Additional suggestion from reporter: add a sanity check for duplicate agent insertions from prompt preset and chat settings, so agent output is inserted only once even if activated in both places.

Follow-up tester suggested the long-term intended behavior may be that all agent output is added through explicit prompt sections such as {{agent::knowledge-router}}, and that automatic end-of-prompt appending should stop once section insertion works.

Template check

  • I provided the required summary, behavior, reproduction, and environment details.
  • If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
Originally created by @cha1latte on GitHub (May 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/851 Originally assigned to: @Promansis on GitHub. ### Summary Adding the Knowledge Retrieval agent section to a prompt preset does not insert that agent's output into the prompt. A follow-up report indicates Prose Guardian has the same behavior, while custom agents do insert correctly. Source: Discord report from Danshi with follow-up testing from Wozza. https://discord.com/channels/1417099416812392641/1504437914468225224 ### Expected behavior When "Add as Prompt Section" is enabled for a built-in agent and that agent section is added to a prompt preset, the agent output should be inserted at the configured section location in the prompt. ### Actual behavior The Knowledge Retrieval agent section in the prompt preset is ignored, so its output is not inserted into the prompt at the configured place. Activating Knowledge Retrieval in chat settings appends its output to the end of the prompt, which shows the agent itself works. Custom agent sections insert at the expected location. A follow-up tester reported the same end-of-prompt behavior for Prose Guardian and also observed that once an agent starts adding content to a prompt, it may keep doing so even after the prompt injection option is turned off on the agent. ### Steps to reproduce 1. Run Marinara Engine 1.5.9. 2. Use RP chat. 3. Enable "Add as Prompt Section" in the Knowledge Retrieval agent tab. 4. Add the Knowledge Retrieval agent section to a prompt preset. 5. Use that prompt preset in RP mode. 6. Inspect the prompt sent to the model. 7. Observe that the Knowledge Retrieval agent output is not inserted at the preset section. 8. Activate Knowledge Retrieval in chat settings. 9. Observe that the agent output appends to the end of the prompt instead. 10. Add a custom agent section to the prompt preset. 11. Observe that the custom agent output inserts at the correct place. ### Marinara Engine version 1.5.9 ### Install type Installer ### OS + version Windows 11. Reporter installed 1.5.2 via clean installer and auto-updated to 1.5.9. ### Browser or app shell Not specified. ### Screenshots or video Discord report referenced three attached screenshots: 1. Agent sections in prompt preset. 2. Prompt sent to model, where Knowledge Retrieval is missing but a custom agent is inserted. 3. Agents activated in chat settings, where both agents append at the end. No uploadable image files were provided to Codex, so they are not attached here. See source Discord thread. ### Logs No logs included. ### Additional context Mode: RP chat. Agent: Knowledge Retrieval and possibly other built-in agents. Follow-up explicitly mentions Prose Guardian. Preflight note: draft PR #838, "Fix Knowledge Retrieval prompt preset sections", appears likely related to this report. Additional suggestion from reporter: add a sanity check for duplicate agent insertions from prompt preset and chat settings, so agent output is inserted only once even if activated in both places. Follow-up tester suggested the long-term intended behavior may be that all agent output is added through explicit prompt sections such as `{{agent::knowledge-router}}`, and that automatic end-of-prompt appending should stop once section insertion works. ### Template check - [ ] I provided the required summary, behavior, reproduction, and environment details. - [ ] If this is a visual/UI bug, blank screen, layout issue, mobile/responsive issue, incorrect image or sprite, broken animation, or unexpected error state, I attached screenshots or video.
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#411
No description provided.