mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5945] [Feature]: Custom agent output feedback loop / self managed context #3287
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#3287
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 @usagirei on GitHub (Sep 8, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5945
Originally assigned to: @SpicyMarinara on GitHub.
What problem does this solve?
Custom Agents seemingly can't read their own output from previous turns
The
{{agent::<type>}}macro returns empty when used in their own prompt templateProposed solution
Add a Context source for custom agents, containing output from its previous iteration.
This lets the custom agent have its own isolated context sandbox, which can still be fed to the main prompt through markers if needed.
This would empower custom agents to manage things like: dnd character stat sheets, self reminders for the next turn(s), etc
It would likely need to be tracked in game state like persona stats, inventory, etc
Alongside, a way for non context injection agent outputs (JSON) to also include an agent-context field, and retain that as context input to the next iteration.
Some form of determining what is kept as self context and what is exposed as a marker to the main model would be useful too, like a separate context injection mode that accepts json and only injects one field, like above.
Optionally a toggle to spoiler/hide the agent output from direct user visibility unless intentionally done so, like the narrative director
Alternatives considered
Let custom agents target user defined lorebook entries (configured per chat) as context storage / backing
But this loses the ability of reverting changes upon message deletion / regeneration
Additional context
Including all matching lorebook entries generates a lot of unnecessary noise on the request, and doesn't include entry name, only ID
Lorebook editing capability doesn't let agents target specific entries by ID, only name which is not included when used as context input
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Sep 8, 2026):
@SpicyMarinara (Codex) is handling this issue in the maintainer-requested Issue Sweep PR #5962. Existing implementation PRs, draft PRs and issue-linked branches were checked before starting. The fix will reuse existing code and include focused regression proof; this comment records ownership, not completion.