You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
memory: create_relations returns an empty list for an existing relation with no notice, unlike create_entities' skipped #5654
For comparison, create_entities{"entities":[{"name":"A","entityType":"t","observations":[]}]}
Expected behavior
Step 3 says the relation was skipped because it already exists, the same way create_entities does: a skipped field in structuredContent and a text notice. The create_entities handler adds that notice because "otherwise an agent reads the response as its observations having been stored"; a relation the agent asked for and did not get has the same problem.
Actual behavior
Step 3 returns [] as text and {"relations": []} as structuredContent, with no notice.
Step 4 returns {"entities": [], "skipped": ["A"]} plus the text Skipped 1 entity that already exists: A. ....
The graph is correct (no duplicate is stored); only the result is silent. From the result alone an agent cannot tell "already there" from "nothing happened". A repro test (Python MCP client) is in https://github.com/za69956/mcp-memory-server-qa-audit (test_F2_...).
Logs or error output
Already prototyped a fix?
No response
Before you submit
I searched existing issues and this is not a duplicate.
This is not a security vulnerability report (those go through the private advisory form).
This is a critical observation for autonomous agent reliability @za69956.
Why Silent Idempotency Breaks Agent Reasoning
In LLM-driven agent loops (Claude, Cursor, Cline), tool calls are evaluated deterministically against expected state transitions. When an agent calls create_relations and receives:
{
"relations": []
}
with no text notice or skipped metadata, the agent cannot disambiguate between:
Benign idempotency: The relation is already stored and active in the graph.
Silent dropped execution: The server failed to parse the arguments or silently dropped the mutation.
In practice, agents often treat "relations": [] as an unfulfilled task and either re-attempt the tool call repeatedly or hallucinate that the relationship was rejected.
This issue closely mirrors the observation asymmetry reported in #5653:
add_observations enforces set deduplication on insertion.
create_entities bypasses deduplication on creation, accepting duplicate observations (["x", "x"]).
When an agent later calls delete_observations for ["x"], the deletion counter decrements both instances and reports Deleted 2 of 1, further desynchronizing the agent's internal world model.
(Disclosure: As maintainers of the open-source MCP Production Kit, we have integrated this explicit skipped-relation feedback and observation parity guard into our production hardening test suite).
Activity
A7mdMe commentedon Nov 24, 2026
This is a critical observation for autonomous agent reliability @za69956.
Why Silent Idempotency Breaks Agent Reasoning
In LLM-driven agent loops (Claude, Cursor, Cline), tool calls are evaluated deterministically against expected state transitions. When an agent calls
create_relationsand receives:{ "relations": [] }with no text notice or
skippedmetadata, the agent cannot disambiguate between:In practice, agents often treat
"relations": []as an unfulfilled task and either re-attempt the tool call repeatedly or hallucinate that the relationship was rejected.Observation & Deletion Invariant Discrepancies (#5653, #5655)
This issue closely mirrors the observation asymmetry reported in #5653:
add_observationsenforces set deduplication on insertion.create_entitiesbypasses deduplication on creation, accepting duplicate observations (["x", "x"]).delete_observationsfor["x"], the deletion counter decrements both instances and reportsDeleted 2 of 1, further desynchronizing the agent's internal world model.Architectural Solution: Explicit Structured Feedback
To preserve agent determinism while maintaining idempotent graph writes,
create_relationsshould return structured parity withcreate_entities:(Disclosure: As maintainers of the open-source MCP Production Kit, we have integrated this explicit skipped-relation feedback and observation parity guard into our production hardening test suite).
cliffhall commentedon Nov 30, 2026
Triage: Priority Low (total 5)
buglabelBoard: Servers V2 (#43), Status
Incoming, awaiting maintainer review (no milestone yet).test(memory): assert the created relations without pinning create_rel…