feat: system-level Memory updated notification (ARM-54) - #69
Conversation
Adds harness-level detection of brain file writes so users always see when the agent updates memory — regardless of whether the LLM mentions it. Slack gets a Block Kit context pill (like ChatGPT's "Memory updated"); Linear gets a non-ephemeral thought activity before the response. Closes ARM-54
ARM-54 Memory updates are not obvious
Research ReportSummaryMemory updates in Vera are invisible to users — when the agent edits Key Findings
Codebase Context
Sources
Recommendations1. Harness-level detection via tool event subscriber (highest priority, cleanest path) Add a detection layer in the Slack handler's session subscriber (and Linear runtime's subscriber) that checks
This is the least invasive approach — no tool changes needed, just a subscriber filter. Implementation sketch: // In Slack handler's session subscriber
case "tool_execution_end": {
if (!ev.isError && isBrainFileEdit(ev.toolName, ev.args)) {
pendingMemoryNotifications.push(extractMemorySummary(ev));
}
break;
}2. Directive-based notification (medium priority, LLM-cooperative) Extend the existing Pros: Agent controls the summary text (more human-readable than a raw diff). Cons: Still depends on LLM compliance — same failure mode as the soul clause. Best as a belt-and-suspenders addition to approach #1. 3. Dedicated Register a tool in update_memory({ file: "memory.md", key: "schedule", value: "Works 7 days/week", summary: "Learned work schedule" })The tool handler writes the file and returns structured result data that the harness can render. The tool's existence in the agent's tool list also serves as a stronger prompt signal than a soul clause. Most robust approach but requires the most changes: new tool definition, agent prompt updates, and the agent must learn to prefer it over raw 4. Leverage the existing Tigris
Downside: 5. Memory management surface (lower priority, future) A Open Questions
|
Summary
contextblock (:brain: *Memory updated*) after the response — subtle, pill-like treatment matching the ChatGPT gold standardthoughtactivity before the responseChanges
src/brain-notify.ts(new) —BrainEditTrackerthat hooks intotool_execution_start/endevents, detects writes to{stateDir}/brain/, deduplicates by filename, and flushes per turnsrc/slack/client.ts—postContextInThread()for Block Kit context blockssrc/slack/handler.ts— wires tracker into all session paths (new thread, follow-up, snapshot restart, /workflow, crash recovery)src/linear/runtime.ts— wires tracker intoattachProgressStreamingandrunTurnTest plan
Closes ARM-54
🤖 Generated with Claude Code