[GH-ISSUE #5023] [Issue]: Hide agent marker section when no output is produced #2777

Closed
opened 2026-10-21 05:55:18 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

When an agent does not run or produces no output, the {{agent::id}} marker resolves to nothing but surrounding additional instructions remain in the prompt. The entire agent marker section should be omitted or disabled when no agent output is available.

Expected behavior

If the agent does not trigger or produces no output, the marker and its surrounding additional instructions should not be appended to the prompt, or should be hideable through an explicit setting.

Actual behavior

The {{agent::id}} marker resolves to an empty value, but the additional instructions around it remain in the prompt as abandoned text.

Steps to reproduce

  1. Place an agent marker in a prompt with additional instructions around the marker.
  2. Configure or use a cadence or activation condition under which the agent does not run or produces no output.
  3. Generate the prompt and observe that the marker is empty while the surrounding instructions remain.

Environment

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

Logs, screenshots, or video

Screenshot attached: https://cdn.discordapp.com/attachments/1537825449504415894/1537825450020184165/Screenshot_20260814_155933_Samsung_Browser.jpg?ex=6a80730e&is=6a7f218e&hm=5ee2541b034912c6e81855040b850fd7c9ba6e34e90c871796ae1813d210b5f5

Additional context

The reporter tried using {{#if}} to hide the instructions, but agent macros appear to resolve later than the conditional expressions. The behavior may waste tokens or cause minor model confusion. A separate toggle beneath the initial 'Add as prompt section' toggle was suggested if omission is not the intended default behavior.

Discord thread: [FR] Hide Agent Output Marker Section if Agent produced no output/didn't run
Discord thread link: https://discord.com/channels/1417099416812392641/1537825449504415894
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-08-14T14:09:18.577Z] ylliselmanii: Hello!

I love the fact that you can place an agent's marker wherever you want. And the fact that 'You can add additional instructions around it' as stated right there in the little information part? Chef's kiss. Amazing work, no complaints.

But, I have a tiny, tiny problem. If the agent produces no output, or even doesn't run at all, depending on cadence or activation keywords, the {{agent::id}} resolves to nothing, but the additional instructions just.. stay there. Abandonded. Instructions for no one, and nothing at all.

I tried to hide them with some form of {{#if}} but since agent macros resolve on the last step, way later than these ifs, it doesn't work. Well, at least I couldn't figure it out.

Now, it might be no big problem, a few wasted tokens, a tiny bit of model confusion at worst, but maybe it could be changed so that if the macro resolves to nothing, the whole section gets hidden/disabled? Maybe even place it as an additional toggle beneath the initial 'Add as prompt section' toggle, if the current behaviour is intended?

Thank you

[attached image 1: https://cdn.discordapp.com/attachments/1537825449504415894/1537825450020184165/Screenshot_20260814_155933_Samsung_Browser.jpg?ex=6a80730e&is=6a7f218e&hm=5ee2541b034912c6e81855040b850fd7c9ba6e34e90c871796ae1813d210b5f5&]
[Discord message: https://discord.com/channels/1417099416812392641/1537825449504415894/1537825449504415894]

[2026-08-14T14:37:02.169Z] Marinara: I think if the agent doesn't produce an output nor triggers, then that part of the prompt shouldn't be appended.
[Discord message: https://discord.com/channels/1417099416812392641/1537825449504415894/1537832427114733618]

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 (Aug 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5023 Originally assigned to: @SpicyMarinara on GitHub. ## Summary When an agent does not run or produces no output, the {{agent::id}} marker resolves to nothing but surrounding additional instructions remain in the prompt. The entire agent marker section should be omitted or disabled when no agent output is available. ## Expected behavior If the agent does not trigger or produces no output, the marker and its surrounding additional instructions should not be appended to the prompt, or should be hideable through an explicit setting. ## Actual behavior The {{agent::id}} marker resolves to an empty value, but the additional instructions around it remain in the prompt as abandoned text. ## Steps to reproduce 1. Place an agent marker in a prompt with additional instructions around the marker. 2. Configure or use a cadence or activation condition under which the agent does not run or produces no output. 3. Generate the prompt and observe that the marker is empty while the surrounding instructions remain. ## Environment - Marinara Engine version: Not provided - Install type: Not provided - OS + version: Not provided - Browser or app shell: Not provided ## Logs, screenshots, or video Screenshot attached: https://cdn.discordapp.com/attachments/1537825449504415894/1537825450020184165/Screenshot_20260814_155933_Samsung_Browser.jpg?ex=6a80730e&is=6a7f218e&hm=5ee2541b034912c6e81855040b850fd7c9ba6e34e90c871796ae1813d210b5f5 ## Additional context The reporter tried using {{#if}} to hide the instructions, but agent macros appear to resolve later than the conditional expressions. The behavior may waste tokens or cause minor model confusion. A separate toggle beneath the initial 'Add as prompt section' toggle was suggested if omission is not the intended default behavior. Discord thread: [FR] Hide Agent Output Marker Section if Agent produced no output/didn't run Discord thread link: https://discord.com/channels/1417099416812392641/1537825449504415894 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-08-14T14:09:18.577Z] ylliselmanii: Hello! I love the fact that you can place an agent's marker wherever you want. And the fact that 'You can add additional instructions around it' as stated right there in the little information part? Chef's kiss. Amazing work, no complaints. But, I have a tiny, tiny problem. If the agent produces no output, or even doesn't run at all, depending on cadence or activation keywords, the {{agent::id}} resolves to nothing, but the additional instructions just.. stay there. Abandonded. Instructions for no one, and nothing at all. I tried to hide them with some form of {{#if}} but since agent macros resolve on the last step, way later than these ifs, it doesn't work. Well, at least I couldn't figure it out. Now, it might be no big problem, a few wasted tokens, a tiny bit of model confusion at worst, but maybe it could be changed so that if the macro resolves to nothing, the whole section gets hidden/disabled? Maybe even place it as an additional toggle beneath the initial 'Add as prompt section' toggle, if the current behaviour is intended? Thank you [attached image 1: https://cdn.discordapp.com/attachments/1537825449504415894/1537825450020184165/Screenshot_20260814_155933_Samsung_Browser.jpg?ex=6a80730e&is=6a7f218e&hm=5ee2541b034912c6e81855040b850fd7c9ba6e34e90c871796ae1813d210b5f5&] [Discord message: https://discord.com/channels/1417099416812392641/1537825449504415894/1537825449504415894] [2026-08-14T14:37:02.169Z] Marinara: I think if the agent doesn't produce an output nor triggers, then that part of the prompt shouldn't be appended. [Discord message: https://discord.com/channels/1417099416812392641/1537825449504415894/1537832427114733618] ``` </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:55:18 +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#2777
No description provided.