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
Agent: create_relationship fails when linking nodes to newly-created schema instances #1077
When the agent creates a node of a user-defined schema type and then tries to link other nodes to it via create_relationship, the operation fails with a "target node ID not found" error.
Observed in the following sequence:
Agent creates a project schema (via create_schema)
Agent creates a project node (via create_node)
Agent creates several task nodes
Agent calls create_relationship to link each task to the project — fails: target node ID not found
The project node was just created successfully (agent references its nodespace:// URI in the response), so the issue is likely in how create_relationship resolves node IDs for schema-typed nodes, or the node is not yet visible to the relationship handler (possible eventual consistency / indexing lag).
Steps to Reproduce
Ask the agent: "Create a 'Project' node type with a has_task relationship"
Ask: "Create a sample project entry"
Ask: "Create a few tasks and assign them to the project"
Agent reports relationship creation failed: target node ID not found
Expected Behavior
create_relationship should successfully link nodes regardless of whether the source/target is a core type (task) or a user-defined schema type (project).
Investigation Areas
Does create_relationship MCP handler look up nodes differently for schema-typed nodes vs core types?
Is there a timing/indexing issue — node is written but not yet readable by ID when relationship creation runs?
Does the relationship handler validate that both node IDs exist before creating the edge, and if so, is that query path correct for all node types?
Verify end-to-end: create_node with a schema type → immediately query by returned ID → create_relationship using that ID
Context
Agent successfully creates the schema and instance nodes
Relationship name (has_task) matches the schema definition
Error occurs on the create_relationship tool call, not on node creation
May be related to how schema-typed node IDs are stored/indexed vs queried
Activity