fix(mind): stop opening every wake with a recap, and show the mind its own task queue - #6245
Merged
Merged
Conversation
…s own task queue Two things made the Persistent Mind's wakes noisy and repetitive. The trajectory rollup (`mind.summary`) — the internal summary that compacts older history into context — was rendered as a Chief of Staff chat bubble, so each wake opened with a long first-person recap of everything the mind already remembered. It now sits with the other bookkeeping events behind the Activity toggle, leaving the conversation to working notes and replies. The turn prompt also asks for what is new this turn rather than a restatement of prior context. The mind could also see its own trajectory but not the CoS queue, so it re-derived ideas it had already shipped and queued the same work again. `addTask` already refuses a duplicate of an open task; the missing half was completed work. The task-capability prompt now carries a bounded, newest-first view of the recent internal queue — id, status, queue label, app — and tells the mind to check it before requesting a task.
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 free
to 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
Two things made the Persistent Mind's wakes noisy and repetitive.
Every wake opened with a recap.
mind.summaryis the trajectory rollup — the internal summary that compacts older history so it fits in the context window. It was rendered as a Chief of Staff chat bubble, so each wake led with a long first-person restatement of everything the mind already remembered. It now sits with the other bookkeeping events (mind.wake,mind.model.request,mind.model.result,mind.turn.completed) behind the Activity toggle, leaving the conversation to working notes and replies — thinking and new decisions. It remains fully readable under Activity and in the event detail panel; nothing is dropped from the trajectory. The turn prompt's response contract now also asks for what is new this turn rather than a restatement of prior context, which reaches every install regardless of a user-edited operating prompt.The mind re-queued work it had already done. It could see its own trajectory but not the CoS queue its task requests land in.
addTaskalready refuses a duplicate of an open task (same first line + same app); the half it cannot cover is work that already completed — so a later wake re-derived a shipped idea and queued it again.buildPersistentMindTaskCapabilityPromptnow carries a bounded, newest-first view of the recent internal queue (id, status, queue label, app, and whether the mind queued it), ordered bymetadata.updatedAt, and the instruction tells the mind to check it before requesting a task.Scoping notes: the inventory reads
getCosTasks()— the internal queue only, so the user's own task list never enters the prompt — capped at 25 entries, 160 chars per label, and 4 000 characters of serialized JSON, the same bounding discipline the app/provider catalog beside it uses.Changes
client/src/components/cos/tabs/MindTab.jsx—mind.summaryjoinsACTIVITY_KINDSserver/services/persistentMindTaskCapability.js—readPersistentMindTaskInventory(), its prompt bounding, and the queue section + dedup instructionserver/services/persistentMindAdapter.js— reads the inventory alongside the catalog (onePromise.all, only when task access is on) and adds the no-recap clause to the response contractTest plan
client/src/components/cos/tabs/MindTab.test.jsx— amind.summaryevent stays out of the conversation by default and appears once Activity is toggled on (verified failing before the fix)server/services/persistentMindTaskCapability.test.js— inventory ordering/shape including a completed entry, its appearance in the prompt, and the char-budget bound on a 200-entry queueagy(Gemini 3.8 Flash, medium): NO FINDINGS