mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1054] [Feature]: Review custom agent prompt template ordering #516
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#516
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cha1latte on GitHub (May 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1054
What problem does this solve?
Custom agent prompt template instructions currently appear in the middle of the assembled agent prompt, after the generic role/lore sections and before the chat summary. A Discord reporter found this while investigating custom agent failures and expected the agent-specific instructions to appear at the start or end where they are less likely to be diluted by surrounding context.
The reporter observed a custom pacing-suggestion agent sometimes working correctly, but also producing failures such as:
They also saw one response where the agent ignored the custom instructions and continued roleplaying in the agent response instead of producing the requested suggestion format.
Proposed solution
Review the custom agent prompt assembly order and adjust it if needed so the prompt template text from the custom agent UI has stronger placement/priority. The likely goal is to keep the agent-specific task and output-format rules near the beginning or end of the assembled prompt, or otherwise protect them from being buried by long summaries.
At minimum, decide whether the current ordering is intentional and safe. If it is safe, document the reasoning. If it is not safe, update the prompt structure for custom agents so template instructions remain authoritative even when lore and chat summary content are large.
Alternatives considered
Leave the current prompt order unchanged if prompt-quality testing shows that template-in-the-middle does not materially hurt agent output.
Another option is to clarify custom agent authoring guidance so users know that long chat summaries may follow their template instructions and should design their templates accordingly. This would not solve the observed empty/roleplay-style failures if ordering is the cause.
Additional context
Source: Discord report from WozzaRole.
Reported current prompt structure from logs:
Reporter example custom agent prompt template:
Examples of expected/correct output from the same agent:
The reporter noted one specific prompt had about 350 words before the custom template and about 1600 words of chat summary after it.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (May 20, 2026):
Triage note: labeling this as
scope-riskbecause it is strongly aligned with custom agent reliability, but it touches agent prompt assembly and needs a prompt-quality decision before changing ordering that may affect built-in and custom agents.Least risky next step is to reproduce the bad outputs with a captured prompt, then compare the current order against a small reordered prompt assembly before changing the default structure.
@SpicyMarinara commented on GitHub (May 23, 2026):
This is the correct placement, we want the instructions at the end of the system prompt, after the context has been gathered.