[GH-ISSUE #153] MCP resource-list change notifications are missing after evidence/unknown mutations in session tools #101

Closed
opened 2026-10-15 18:21:11 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/153

Problem

MCP clients can register for resource list updates, but some session tools mutate evidence/unknown state without notifying the MCP server that resource lists changed.

Confirmed observations

  • In src/server/registerSessionTools.ts, the importContract handler imports bundle records via session.importEvidenceBundle(...) and returns the result without calling server.sendResourceListChanged().
  • In the same file, registerUnknownTools handlers for recordContract and updateContract call session.recordUnknown(...) and session.updateUnknown(...) directly with no resource-list change signal.
  • The server exposes resource collections that depend on those registries (session-evidence, active-residual-unknowns, workspace revisions, snapshots), so clients can retain stale resource sets.

Impact

  • MCP clients can observe stale list_resources state after operations like import_evidence, record_unknown, or update_unknown.
  • Clients that rely on incremental updates may miss new/removed resource rows until reconnect.

Suggested behavior

  • Emit server.sendResourceListChanged() when session.importEvidenceBundle(...) succeeds.
  • Emit server.sendResourceListChanged() after successful session.recordUnknown(...) and session.updateUnknown(...) mutations.
  • Prefer success-only signaling to avoid false-positive change events.

Reproduction

  1. Start an MCP session and read/list MCP resources.
  2. Run import_evidence or record_unknown / update_unknown through the session.
  3. Call list_resources again without reconnecting and compare with what changed; no resource-list changed event is currently sent in the current flow.
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/153 ## Problem MCP clients can register for resource list updates, but some session tools mutate evidence/unknown state without notifying the MCP server that resource lists changed. ## Confirmed observations - In `src/server/registerSessionTools.ts`, the `importContract` handler imports bundle records via `session.importEvidenceBundle(...)` and returns the result without calling `server.sendResourceListChanged()`. - In the same file, `registerUnknownTools` handlers for `recordContract` and `updateContract` call `session.recordUnknown(...)` and `session.updateUnknown(...)` directly with no resource-list change signal. - The server exposes resource collections that depend on those registries (`session-evidence`, `active-residual-unknowns`, workspace revisions, snapshots), so clients can retain stale resource sets. ## Impact - MCP clients can observe stale `list_resources` state after operations like `import_evidence`, `record_unknown`, or `update_unknown`. - Clients that rely on incremental updates may miss new/removed resource rows until reconnect. ## Suggested behavior - Emit `server.sendResourceListChanged()` when `session.importEvidenceBundle(...)` succeeds. - Emit `server.sendResourceListChanged()` after successful `session.recordUnknown(...)` and `session.updateUnknown(...)` mutations. - Prefer success-only signaling to avoid false-positive change events. ## Reproduction 1. Start an MCP session and read/list MCP resources. 2. Run `import_evidence` or `record_unknown` / `update_unknown` through the session. 3. Call `list_resources` again without reconnecting and compare with what changed; no resource-list changed event is currently sent in the current flow.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#101
No description provided.