mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #436] [Issue]: Expression Engine prompt bloat exceeds context window for single-character scenes #189
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#189
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 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/436
Summary
Expression Engine fails in a single-character scene because the agent request grows to thousands of tokens and exceeds the available context window.
Increasing the Expression Engine context cap does not resolve the issue; the request size appears to grow proportionally with the configured cap, suggesting runaway context bloat in the agent prompt construction.
Discord thread
Expected behavior
A single-character scene should not require anywhere near 7,000-10,000+ tokens for expression assignment.
Expression Engine should respect the configured agent context settings and only include the necessary recent chat/context and sprite/expression data needed to choose an expression.
Actual behavior
Expression Engine fails with an OpenAI API context error, even when only one character is active in the scene.
Reported error:
Increasing the cap does not fix the problem. Instead, the request grows to match the new cap:
The user also set agents to read only 5 messages, and then tried 1 message, but the error persisted.
Steps to reproduce
v1.5.8build3281d01.12000.12000.Environment
v1.5.8build3281d01Logs, screenshots, or video
Reported error:
Reported behavior when changing the cap:
Additional context
The issue appears unresolved after increasing context size caps. The user reports that increasing the cap only allows the prompt bloat to grow larger.
This suggests the problem may not be only a hard context ceiling. There may be runaway or repeated context accumulation in the Expression Engine agent prompt pipeline.
The user also noted that the affected chat could not be salvaged even after reimporting JSON while the error was active.
Temporary workaround: the user is using a designated fallback API, which is currently working.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked: