mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3783] [Issue]: Tracker-agent retries split same-connection agents into separate model requests #2040
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#2040
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 @SpicyMarinara on GitHub (Jul 18, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3783
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Retrying tracker agents that share the same connection, model, phase, and standard batch lane can send separate LLM requests instead of one combined tracker batch. Expression Engine is also hard-coded to run outside otherwise compatible agent batches.
Expected behavior
With
Max Parallel Agent Jobsset to1, compatible tracker agents such as Expression Engine, World State, and Background should share one provider request when they use the same connection, model, phase, context, and batch lane.Agent debug output should show one
Agent Batch (3) (__batch__)request and response, followed by individual logical agent results.Actual behavior
The retry resolver creates a new provider wrapper for each saved agent configuration. Retry grouping keys providers by object identity, so separately wrapped instances of the same stored connection cannot be grouped.
Additionally,
shouldRunAgentIndividuallyexplicitly isolates theexpressionagent type.The observed retry emitted three provider request/response debug pairs with separate usage and duration totals:
Steps to reproduce
Max Parallel Agent Jobsset to1.[Marinara Agent Debug] requestevents instead of oneAgent Batch (3) (__batch__)request.Environment
origin/stagingLogs, screenshots, or video
The browser debug output showed all three requests beginning at the same timestamp, followed by distinct response timings and usage totals. All agent results succeeded, confirming this is request grouping behavior rather than a parse-fallback retry.
Relevant implementation paths:
packages/server/src/routes/generate/retry-agents-route.tspackages/server/src/services/agents/agent-executor.tspackages/server/src/services/agents/agent-pipeline.tsAdditional context
Normal generation caches resolved providers by connection ID, but retry resolution does not. The narrow fix is to reuse retry connection resolutions and allow Expression Engine to participate in compatible batches. Existing provider/model/phase/lane and
Max Parallel Agent Jobsboundaries should remain intact.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 (Jul 18, 2026):
Addressed by #3784. The PR is ready for review, CodeRabbit follow-up produced no actionable comments, and both pnpm validation and container build checks pass.