Problem
The Memory Core stores 7,789+ episodic memories and 740+ session summaries, but no agent is mandated to query its own failure history before starting work on a ticket. Memory exists as a passive archive, not an active learning signal.
This means agents routinely repeat mistakes that were already encountered and solved in prior sessions. The memory system has the data — it's just not being consumed at the point where it matters most: task initialization.
Proposal
Add a mandatory Pre-Task Retrospective Query to the agent startup sequence. When an agent picks up a ticket (via AGENTS_STARTUP.md or the future Dispatcher), it MUST:
- Extract the ticket's semantic context (title, labels, related graph nodes)
- Execute
query_raw_memories with that context to surface past failures, approaches, and decisions
- Execute
query_summaries to find related session arcs
- Synthesize a "lessons learned" brief before writing any code
Implementation Options
Option A (Prompt-Level): Add a mandatory step to AGENTS_STARTUP.md that instructs frontier models (Gemini/Claude) to query memory before beginning implementation. Zero code change required, but relies on model compliance.
Option B (MCP-Level): Create a pre_task_brief MCP tool in the memory-core server that accepts a ticket number/description and automatically returns:
- Top 3 relevant past failures from
query_raw_memories
- Top 2 related session summaries from
query_summaries
- Any
[KB_GAP] or [TOOLING_GAP] tags from prior PR reviews
Option B is preferable — it's deterministic, token-efficient (single tool call vs. multiple), and works for both frontier models and sub-agents.
Expected Impact
- Reduced repeat failures across sessions
- Faster ramp-up time for agents picking up tickets
- First genuine "learning from experience" behavior in the feedback loop
A2A Context
Origin Session ID: fff6dc5b-ca7f-4c9b-8eca-41bd8a97ad5d
Problem
The Memory Core stores 7,789+ episodic memories and 740+ session summaries, but no agent is mandated to query its own failure history before starting work on a ticket. Memory exists as a passive archive, not an active learning signal.
This means agents routinely repeat mistakes that were already encountered and solved in prior sessions. The memory system has the data — it's just not being consumed at the point where it matters most: task initialization.
Proposal
Add a mandatory Pre-Task Retrospective Query to the agent startup sequence. When an agent picks up a ticket (via
AGENTS_STARTUP.mdor the future Dispatcher), it MUST:query_raw_memorieswith that context to surface past failures, approaches, and decisionsquery_summariesto find related session arcsImplementation Options
Option A (Prompt-Level): Add a mandatory step to
AGENTS_STARTUP.mdthat instructs frontier models (Gemini/Claude) to query memory before beginning implementation. Zero code change required, but relies on model compliance.Option B (MCP-Level): Create a
pre_task_briefMCP tool in the memory-core server that accepts a ticket number/description and automatically returns:query_raw_memoriesquery_summaries[KB_GAP]or[TOOLING_GAP]tags from prior PR reviewsOption B is preferable — it's deterministic, token-efficient (single tool call vs. multiple), and works for both frontier models and sub-agents.
Expected Impact
A2A Context
Origin Session ID:
fff6dc5b-ca7f-4c9b-8eca-41bd8a97ad5d