{"record":{"id":"9aabf4c4509d500c","repo":"iflytek/astron-agent","slug":"end-node-schema-error","errorCode":"END_NODE_SCHEMA_ERROR","errorMessage":"Node {dep_msg_node} not found in node_run_status","messagePattern":"Node (.+?) not found in node_run_status","errorType":"error_code","errorClass":"CustomException","httpStatus":null,"severity":"error","filePath":"core/workflow/engine/nodes/end/end_node.py","lineNumber":105,"sourceCode":"\n            # Process output in prompt mode if configured\n            if self.outputMode == EndNodeOutputModeEnum.PROMPT_MODE.value:\n                output_node_frame_data = await self.deal_output_stream_msg(\n                    variable_pool=variable_pool,\n                    template=self.template,\n                    reasoning_template=self.reasoningTemplate,\n                    callbacks=callbacks,\n                    node_run_status=node_run_status,\n                    span=span,\n                )\n                if output_node_frame_data:\n                    content = output_node_frame_data.content\n                    reasoning_content = output_node_frame_data.reasoning_content\n\n            # Wait for all dependent message nodes to complete\n            for dep_msg_node in msg_or_end_node_deps[self.node_id].data_dep:\n                if dep_msg_node not in node_run_status:\n                    raise CustomException(\n                        err_code=CodeEnum.END_NODE_SCHEMA_ERROR,\n                        cause_error=f\"Node {dep_msg_node} not found in node_run_status\",\n                    )\n                await node_run_status[dep_msg_node].complete.wait()\n\n            # Collect output variables from the variable pool\n            for end_input in self.input_identifier:\n                outputs.update(\n                    {\n                        end_input: variable_pool.get_variable(\n                            node_id=self.node_id, key_name=end_input, span=span\n                        )\n                    }\n                )\n\n            # Process templates for prompt mode output\n            reasoning_template = \"\"\n            if self.outputMode == EndNodeOutputModeEnum.PROMPT_MODE.value:","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/core/workflow/engine/nodes/end/end_node.py#L87-L123","documentation":"END_NODE_SCHEMA_ERROR from end_node.async_execute: while waiting on the completion events of dependent message nodes, the end node found a dependency id in msg_or_end_node_deps[self.node_id].data_dep that has no entry in node_run_status. This means the workflow's dependency graph and the runtime status registry are inconsistent — a declared data dependency was never scheduled or its status event was never registered.","triggerScenarios":"An End node (or message-branch collection path) whose data_dep lists a message/output node id that never ran: the node was skipped by a branch condition, deleted/renamed in the workflow definition while the end node still references it, or the graph parser emitted a stale dependency.","commonSituations":"Editing a workflow to remove/rename a message node without updating the End node's inputs; conditional branches where the End node depends on a node inside a branch that didn't execute; imported/older workflow versions with dangling references.","solutions":["Open the End node's input/output variable configuration and remove or fix references to the missing node id (its name appears in the message).","Ensure the referenced message node still exists in the canvas and is on an execution path that always runs, or make the dependency conditional.","Re-save/publish the workflow so the dependency graph is rebuilt and node_run_status entries are registered for all deps.","If importing old versions, validate the workflow schema for dangling node references before running."],"exampleFix":"// before: End node references deleted node\n{\"deps\": [\"msg_node_1\", \"msg_node_deleted\"]}\n// after: remove the dangling reference\n{\"deps\": [\"msg_node_1\"]}","handlingStrategy":"validation","validationCode":"# before running, verify all end-node deps exist in the graph\ndangling = set(end_node.data_dep) - set(graph.node_ids)\nif dangling:\n    raise ValueError(f\"End node references missing nodes: {dangling}\")","typeGuard":"def deps_exist(data_dep: list[str], node_run_status: dict) -> bool:\n    return all(dep in node_run_status for dep in data_dep)","tryCatchPattern":"try:\n    await end_node.async_execute(...)\nexcept CustomException as e:\n    if e.err_code == CodeEnum.END_NODE_SCHEMA_ERROR.code:\n        logger.error(\"workflow schema issue: %s — re-save workflow and fix End node inputs\", e.cause_error)","preventionTips":["Remove/rename message nodes via the canvas so dependent End-node references update automatically","Validate workflow graphs for dangling references before publish","Make End-node inputs conditional when they depend on branch-internal nodes"],"tags":["workflow","schema","graph","missing-node"],"backgroundTag":"entity-not-found","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}