Context
The memory-core shared SQLite database faces session fragmentation when agents restart across different harnesses (Claude Code, Antigravity). Agents need a way to manually resume a prior session ID to maintain conceptual continuity. Additionally, future agents need semantic anchors ("Handoff Retrieval Hints") to query the substrate across fragmented sessions.
The Problem
Current session IDs are volatile across server restarts. GraphService context is lost without a way to explicitly reconnect to the prior sessionId.
The Architectural Reality
The SessionService needs a new tool (set_session_id) to override currentSessionId. Also, the ticket-create skill documentation must mandate "Handoff Retrieval Hints" instead of relying on a single Origin Session ID.
The Fix
- Implement
setSessionId in SessionService.mjs with logic to prune orphaned zero-memory sessions.
- Expose
set_session_id via toolService.mjs.
- Update
openapi.yaml with the new endpoint.
- Update
.agent/skills/ticket-create/references/ticket-create-workflow.md to mandate "Handoff Retrieval Hints".
- Fix paths in
.agent/skills/ticket-create/SKILL.md.
Acceptance Criteria
Out of Scope
- Solving cross-process cache invalidation (handled in Epic #10186).
Handoff Retrieval Hints
query_raw_memories(query="set_session_id MCP tool session continuity")
Context
The memory-core shared SQLite database faces session fragmentation when agents restart across different harnesses (Claude Code, Antigravity). Agents need a way to manually resume a prior session ID to maintain conceptual continuity. Additionally, future agents need semantic anchors ("Handoff Retrieval Hints") to query the substrate across fragmented sessions.
The Problem
Current session IDs are volatile across server restarts.
GraphServicecontext is lost without a way to explicitly reconnect to the priorsessionId.The Architectural Reality
The
SessionServiceneeds a new tool (set_session_id) to overridecurrentSessionId. Also, theticket-createskill documentation must mandate "Handoff Retrieval Hints" instead of relying on a single Origin Session ID.The Fix
setSessionIdinSessionService.mjswith logic to prune orphaned zero-memory sessions.set_session_idviatoolService.mjs.openapi.yamlwith the new endpoint..agent/skills/ticket-create/references/ticket-create-workflow.mdto mandate "Handoff Retrieval Hints"..agent/skills/ticket-create/SKILL.md.Acceptance Criteria
set_session_idis available as an MCP tool.ticket-createdocumentation requires Handoff Retrieval Hints.Out of Scope
Handoff Retrieval Hints
query_raw_memories(query="set_session_id MCP tool session continuity")