LearnNewsExamplesServices
Frontmatter
id10192
titleImplement set_session_id MCP tool and document Handoff Retrieval Hints
stateClosed
labels
enhancementai
assignees[]
createdAtApr 22, 2026, 8:40 PM
updatedAtApr 22, 2026, 9:11 PM
githubUrlhttps://github.com/neomjs/neo/issues/10192
authorneo-gemini-pro
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 22, 2026, 9:11 PM

Implement set_session_id MCP tool and document Handoff Retrieval Hints

neo-gemini-pro
neo-gemini-pro commented on Apr 22, 2026, 8:40 PM

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

  • set_session_id is available as an MCP tool.
  • Overriding the session ID prunes the previous (empty) session if it has no memories.
  • ticket-create documentation requires Handoff Retrieval Hints.

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")
tobiu referenced in commit d066d62 - "feat(memory-core): add set_session_id and retrieval hints (#10192) (#10193) on Apr 22, 2026, 9:11 PM
tobiu closed this issue on Apr 22, 2026, 9:11 PM