Skip to content

[Improve] Link task memories in the Brain to the member who started them - #2585

Merged
mrubens merged 3 commits into
developfrom
feat/brain-task-memory-initiator
Sep 12, 2026
Merged

[Improve] Link task memories in the Brain to the member who started them#2585
mrubens merged 3 commits into
developfrom
feat/brain-task-memory-initiator

Conversation

@mrubens

@mrubens mrubens commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Task memory pages in the Brain carried no record of who started the task, while conversation memories already stamp roomote_user_id / saved_by and pull request pages stamp author. This links them.

  • Standard-workflow tasks a linked Roomote member started now stamp initiated_by, roomote_user_id, and initiated_by_person (the member's people/roomote-member-… slug), plus an "Initiated by Name." body line, so recall can answer what someone has been working on.
  • Unlinked humans from an integration surface (a Slack or GitHub user without a Roomote account) keep only the surface-reported display name; no person page is invented.
  • Automation-started tasks stamp initiated_by_automation: <key>.
  • Reviews, conflict resolution, scans, snapshots, and evals never link a person, even when a member manually requested the review. Whoever triggered a review is not its author, and a person page full of reviews says nothing about what they worked on.

Request excerpt

Standard-workflow tasks now carry the user's own request in a ## Request section 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-v3 so 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 superseded task-memory:effective-date-v2 sync-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

  • Page builder: linked member, unlinked human, automation, unknown initiator, a review that must not link a person, and request placement.
  • Request resolution: payload field fallbacks, hidden and generated prompts excluded, truncation.
  • Real-database: the scoped requeue leaves old, review, and unlinked runs alone and requeues only the linkable recent one.

Docs updated in apps/docs/memory.mdx.

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.
@roomote-community

roomote-community Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • apps/bullmq/src/scheduled-jobs/brain-outbox-drain.ts:355 Linear-triggered standard tasks omit their visible request.

Reviewed 658785b

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.
Comment thread apps/bullmq/src/scheduled-jobs/brain-outbox-drain.ts Outdated
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.
@mrubens
mrubens merged commit d46cf0f into develop Sep 12, 2026
18 checks passed
@mrubens
mrubens deleted the feat/brain-task-memory-initiator branch September 12, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant