Skip to content

feat(recall): expose session resume as the recall_resume MCP tool - #1010

Merged
laynepenney merged 1 commit into
devfrom
feat/recall-resume-mcp
Aug 26, 2026
Merged

feat(recall): expose session resume as the recall_resume MCP tool#1010
laynepenney merged 1 commit into
devfrom
feat/recall-resume-mcp

Conversation

@laynepenney

Copy link
Copy Markdown
Member

Summary

Exposes the existing synapt resume surface as an MCP tool, recall_resume.

synapt resume answers "where did we leave off" by position (the last N turns of a session), pairs that tail with the journal entry the session wrote, and labels the index-freshness verdict. It was CLI-only, so an agent starting inside an MCP runtime could read the journal but not the tail. The two diverge whenever work continued after the journal was written, and the journal then presents stale next steps as current.

What changed

  • recall_resume(session_id=None, turns=10) in server.py, wrapping the same build_resume_view / format_resume path the CLI uses.
  • Uses the bounded resume index (load_resume_index), never the full index, and closes the DB it opens.
  • Freshness is attached after the view is built, matching the CLI contract: it can only change what the reader is told, never what is shown. A freshness failure renders as NOT CHECKED, not as fresh.
  • Empty-index and unresolved-session outcomes remain distinguishable.
  • Registered with the directive check next to recall_sessions; listed in the Codex skill's tool inventory.

Verification

  • tests/recall/test_server_resume.py: missing index, honest empty, unresolved session, argument pass-through with freshness failure, and registration. 5 tests.
  • Focused run over test_server_resume.py, test_server_sessions.py, and the resume module tests: 91 passed.
  • Ruff on the touched files: the new test file is clean; server.py carries the same five pre-existing findings as origin/dev (four E402 import placement, one F541 f-string without placeholders), measured with ruff check --statistics on both, none introduced here.
  • Live in-process call against a real store rendered the same output as synapt resume.

Premium boundary: recall is OSS (session-tail retrieval over the local transcript index; no identity or org semantics).

The `synapt resume` CLI answers "where did we leave off" by position (the
last N turns of a session) rather than by relevance, pairs the tail with
the journal that session wrote, and labels index freshness. Until now it
was reachable only from a shell, so an agent starting from inside an MCP
runtime had the journal but not the tail, and the two diverge whenever
work continued after the journal was written.

recall_resume wraps the same build_resume_view / format_resume path the
CLI uses, on the bounded resume index (never the full index), and closes
the DB it opens. Freshness is attached after the view is built and can
only change what the reader is told, never what is shown; a freshness
failure renders as NOT CHECKED rather than as fresh. The empty-index and
unresolved-session outcomes stay distinguishable, as in the CLI.

Registered with the directive check alongside recall_sessions. Tests
cover the missing-index, honest-empty, unresolved-session, argument
pass-through, freshness-failure, and registration paths.

Co-Authored-By: Claude <noreply@anthropic.com>
@laynepenney
laynepenney merged commit 2352b7f into dev Aug 26, 2026
@laynepenney
laynepenney deleted the feat/recall-resume-mcp branch August 26, 2026 16:04
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant