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
Cognee MCP recall can return multiple graph-completion branches for one request. One branch can report that no relevant memory exists while another branch returns the correct stored fact. The MCP formatter then joins both branches, producing a contradictory response for the client.
Observed output:
[graph] Cognee has no relevant memory about whether natural-language Cognee memory requires technical parameters.
[graph] No — the stored memory says natural-language Cognee memory operates without requiring a technical dataset or any search parameters.
Observe that the result can contain both an empty-memory statement and the correct answer as separate graph branches.
This reproduced with GRAPH_COMPLETION and FEELING_LUCKY.
Expected behavior
The MCP response should be internally consistent. If any branch contains relevant memory, empty or no-result branches should not be presented alongside it.
Actual behavior
The current format_recall_results path in src/server_utils.py formats each result independently and joins all formatted lines. It does not normalize contradictory branches or suppress an empty branch when another branch is relevant.
Impact
Generic MCP clients can tell users both that no memory was found and that the requested memory was found. This makes otherwise correct recall look unreliable and forces users to issue overly specific prompts.
Local workaround
We use a deterministic no-memory sentinel in the graph-completion system prompt, then filter sentinel-bearing branches only when at least one non-sentinel branch exists. If every branch is empty, the formatter returns one plain no-relevant-memory response. This changes presentation only; it does not alter stored data or retrieval.
Related reports
Issues #3420 and #3520 appear related to merged or multiple recall results, but I did not find a report for this exact contradictory-branch behavior.
Would the maintainers prefer this to be promoted to an issue, and would filtering empty branches at the MCP formatting boundary be an acceptable upstream fix?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Cognee MCP recall can return multiple graph-completion branches for one request. One branch can report that no relevant memory exists while another branch returns the correct stored fact. The MCP formatter then joins both branches, producing a contradictory response for the client.
Observed output:
Environment
Reproduction
This reproduced with GRAPH_COMPLETION and FEELING_LUCKY.
Expected behavior
The MCP response should be internally consistent. If any branch contains relevant memory, empty or no-result branches should not be presented alongside it.
Actual behavior
The current format_recall_results path in src/server_utils.py formats each result independently and joins all formatted lines. It does not normalize contradictory branches or suppress an empty branch when another branch is relevant.
Impact
Generic MCP clients can tell users both that no memory was found and that the requested memory was found. This makes otherwise correct recall look unreliable and forces users to issue overly specific prompts.
Local workaround
We use a deterministic no-memory sentinel in the graph-completion system prompt, then filter sentinel-bearing branches only when at least one non-sentinel branch exists. If every branch is empty, the formatter returns one plain no-relevant-memory response. This changes presentation only; it does not alter stored data or retrieval.
Related reports
Issues #3420 and #3520 appear related to merged or multiple recall results, but I did not find a report for this exact contradictory-branch behavior.
Would the maintainers prefer this to be promoted to an issue, and would filtering empty branches at the MCP formatting boundary be an acceptable upstream fix?
All reactions