emrg: fix vibe-check done-frame content loss + evidence-driven prompt template - #860
Merged
Merged
Conversation
… template Root cause (rant 2026-08-19T07:10:40): the normal-completion done frame broadcast "content": "" — the agent's full final reply was persisted to session but dropped from the done frame, so the scheduler's completion_summary was empty and the memoryless vibe-check LLM judged meaningful=false with an empty done, producing machine fallback strings in the GUI. - daemon.py: done frame now carries full_content or "" (normal completion) - _task_vibe_check: rewritten evidence-driven, rendered from new prompts/vibe_check.j2 (same live-reload jinja2 mechanism as system.j2) - scheduler: removed completion-first-line summary fallback; status() empty summary -> None (no impact machine fallback) - GUI dialogs.js: empty done shows "-" (no impact fallback) - tests updated to assert the no-fallback contract
argszero
commented
Aug 18, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle
Re-verified from PR head (b4a997d):
- done frame now carries
full_content or ""on the normal-completion path (root cause of the empty completion_summary) — matches the tool-call completion path _task_vibe_checkrewritten evidence-driven, rendered from the newprompts/vibe_check.j2(same FileSystemLoader live-reload as system.j2)- scheduler: completion-first-line fallback removed;
status()empty summary →None - GUI dialogs.js: empty done renders "-"
- CI: test + test-windows both PASS (run 32196407799)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the vibe-check misjudgment chain (host rants 2026-08-19T07:05:03 / 07:06:45 / 07:10:40): a task that actually executed 44 tool calls was judged "empty" because the normal-completion done frame broadcast
"content": ""— the agent's full final reply was persisted to the session but dropped from the done frame, so the scheduler'scompletion_summarywas empty and the memoryless vibe-check LLM had no evidence →meaningful=false, emptydone, machine fallback strings (cycle-...-complete, tools-executed=44) in the GUI, and spurious slowdown votes.Changes
emrg/server/daemon.py): the normal-completion done broadcast now carries"content": full_content or ""(the agent's complete final reply), matching the tool-call completion path. Cancel/error done frames stay empty. The scheduler'scompletion_summarynow receives real content.emrg/server/prompts/vibe_check.j2, new): system + user extracted into a standalone Jinja2 template rendered via the existing_get_jinja_env()(FileSystemLoader — edits take effect without a daemon restart, same mechanism assystem.j2). The prompt judges from the real inputs (task name, task requirement, agent's final reply summary): tool execution / analysis / memory writes are actual work; only a genuinely empty reply counts as idle.donemust be extracted from the final reply.scheduler.py_record_evolution: removed the completion-first-line summary fallback — summary uses only the vibe checkdonefield; empty stays empty.scheduler.pystatus(): empty summary →None(no impact-tag join).emrg/gui/renderer/js/dialogs.js: empty done renders"-"(no impact join).Tests
tests/test_scheduler.py: updated to assert the no-fallback contract (empty summary stays empty whendoneis missing or vibe check is unavailable;status().last_cycle_summary→Noneon empty summary).emrg/gui/test/renderer.smoke.test.js: updated to assert"-"for runs without a summary.