mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1188] Imported chats: agents run and yield results but tracker panel + agent activity stay empty #586
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#586
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 @Romuromylus on GitHub (May 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1188
Originally assigned to: @Romuromylus on GitHub.
Symptom
After importing a pre-refactor profile zip via Settings -> Import Profile, opening an imported roleplay chat (with
chat.metadata.activeAgentIds: ["world-state", "quest", "character-tracker", "persona-stats"]) and sending a new message: the model reply arrives normally, but the tracker panel stays on "No tracker data yet" and the agent activity panel stays on "No agent activity yet". Same chat, same provider, same model on a freshly-created refactor chat does populate both panels.What I confirmed
I instrumented
src/engine/generation/start-generation.tsandsrc/engine/generation/agent-runner.tswithconsole.logtraces and sent a message in an imported roleplay chat. From the DevTools console:So for this imported chat:
chatAgentsEnabledreturnstrue(chat metadata parses correctly from its TEXT form).resolveAgentsresolves the expected 4 trackers.runtime.runPost(content)returns 4 post-gen results.agent_resultevents are pushed intoagentEventsand yielded fromstartGeneration.Despite that, the agent activity panel (
RoleplayHUDActionsMenu->useAgentStore.thoughtBubbles) and the tracker panel both remain on their empty-state messages. So the gap is downstream of the agent-result yield - somewhere inapplyAgentResultEffects, the per-result handlers (applyTrackerResultToGameState,agentStore.addThoughtBubble, etc.), the tracker snapshot persistence (persistTrackerSnapshotSafely), or the panel's React Query subscription - not in agent resolution or execution.Likely areas to inspect
Just hypotheses, didn't dig further:
src/features/runtime/generation/hooks/use-generate.ts:660applyAgentResultEffects- the per-result handlers may be silently dropping the imported chat's results (e.g.result.success === falsefor an unrelated reason, or the result shape differs).src/engine/generation/tracker-snapshots.tspersistTrackerSnapshotSafely/commitTrackerSnapshotForTarget- the imported chat may have agameStateshape that the tracker writer can't update against.enabledAgentTypesderived from chat-meta in a way that drops imported-chat thought bubbles before they render, despite the underlyinguseAgentStore.thoughtBubblesbeing populated.Repro
pnpm tauri dev, fresh data dir.Out of scope
I originally suspected
chat.metadata.activeAgentIdswas empty post-import and that no agents fire at all. After live verification that's incorrect - they fire and yield results. The actual bug is downstream of agent yield. The defensive-improvement PR I already filed (#1187: NaN guard + helper unit tests) is unrelated to this and does not fix this; this bug stays open.If anyone is starting on this, the debug traces in
agent-runner.ts:578(resolveAgents) andstart-generation.ts:606(post-gen results) are the fastest way to confirm where in the pipeline the divergence happens. Worth noting that the same 4 agents on a fresh chat populate both panels correctly, so the divergence is data-shape-dependent on the imported chat row, not on the agents themselves.