[Improve] Link task memories in the Brain to the member who started them - #2585
Merged
Conversation
Task memory pages carried no creator, while conversation and pull request pages already did. Standard-workflow tasks a linked Roomote member started now stamp initiated_by, roomote_user_id, and a link to the member's person page; unlinked humans keep only the surface-reported display name; automation runs name their key. Reviews, conflict resolution, scans, and snapshots never link a person, since whoever triggered a review is not its author. The collector id bumps so existing pages pick up the new shape, but the replay is scoped to linkable standard tasks completed in the last 90 days so a version bump no longer re-embeds every tenant's whole history at once. The superseded sync-state row is dropped so it cannot act as the history cutoff.
Contributor
The title alone is a weak handle for recall and the agent summary only exists when the agent wrote one. Standard-workflow tasks now carry the visible launch prompt, bounded to 1,500 characters and stripped of surface wrappers, ahead of the outcome. Generated prompts (reviews, conflict resolution), hidden bootstrap prompts, and harness-injected text stay out.
A Linear agent session task is standard workflow but stores its visible request in commentBody, issueDescription, or issueTitle, so the request resolver returned null for every one of them. Match getInitialTaskPrompt's precedence.
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
Task memory pages in the Brain carried no record of who started the task, while conversation memories already stamp
roomote_user_id/saved_byand pull request pages stampauthor. This links them.initiated_by,roomote_user_id, andinitiated_by_person(the member'speople/roomote-member-…slug), plus an "Initiated by Name." body line, so recall can answer what someone has been working on.initiated_by_automation: <key>.Request excerpt
Standard-workflow tasks now carry the user's own request in a
## Requestsection ahead of the outcome, since the title alone is a weak handle for recall and the agent summary only exists when the agent wrote one. The excerpt is the visible launch prompt with surface wrappers stripped, bounded to 1,500 characters with a truncation marker, and run through the same deterministic redaction as the rest of the page. Generated prompts (reviews, conflict resolution, scans), prompts the launch path marked hidden, and harness-injected bootstrap text are left out. Like pull request descriptions, it is evidence, never instructions.Replay
The task-memory collector id bumps to
task-memory:initiator-v3so already-ingested pages pick up the new shape. The one-time requeue is deliberately narrow: only memories for standard-workflow tasks a linked member started, completed in the last 90 days. A full-history re-put would re-embed every managed tenant's entire task history against the shared embedder on the same rollout, for what is a metadata-only change. Older pages keep correct content and pick up the new shape if a linked pull request later changes state. The supersededtask-memory:effective-date-v2sync-state row is dropped so it cannot act as the history cutoff.The first-time backfill for a Brain that has never ingested is unchanged and still pulls full history.
Tests
Docs updated in
apps/docs/memory.mdx.