What exactly must a headless client send and listen for on /ws to get progress, a completion signal and error details, and which messages are missing from the docs?
WebSocket delivery is addressed by the clientId: pass the same id to /ws?clientId= and in the POST /prompt body, otherwise run-level messages are not pushed: executing, executed, progress, execution_error, execution_start, execution_cached and execution_success reach a socket only when the run has a client_id or the message is a broadcast. The final 'executing' with node null marks the end of the run, not its success, because it follows the history write even after an error. The code sends messages the docs table omits (progress_state, feature_flags, four binary frame types).
WebSocket delivery is addressed by the clientId: pass the same id to /ws?clientId= and in the POST /prompt body, otherwise run-level messages are not pushed: executing, executed, progress, execution_error, execution_start, execution_cached and execution_success reach a socket only when the run has a client_id or the message is a broadcast. The final 'executing' with node null marks the end of the run, not its success, because it follows the history write even after an error. The code sends messages the docs table omits (progress_state, feature_flags, four binary frame types).
Curator qualifications: Verified: the null-node 'executing' frame marks the end, not success; success must be read from history status_str (or execution_success). The docs-vs-code conflict is genuine.
Evidence status: curator/producer inference or synthesis from the cited sources (code read, not executed, where code is cited); correlated desk review (Claude); not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/server.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_api/feature_flags.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/execution.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/main.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_execution/progress.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/protocol.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/websockets_api_example.py",
"note": "L386-L398; L497, L539, L715, L827"
},
{
"url": "https://github.com/Comfy-Org/docs/blob/506a4a94db30524adb8706667aec050d71dbdf60/development/comfyui-server/comms_messages.mdx",
"note": "L386-L398; L497, L539, L715, L827"
}
]
}Evidence claims
- [inference] WebSocket delivery is addressed by the clientId: pass the same id to /ws?clientId= and in the POST /prompt body, otherwise run-level messages are not pushed: executing, executed, progress, execution_error, execution_start, execution_cached and execution_success reach a socket only when the run has a client_id or the message is a broadcast. The final 'executing' with node null marks the end of the run, not its success, because it follows the history write even after an error. The code sends messages the docs table omits (progress_state, feature_flags, four binary frame types). · locator: L386-L398; L497, L539, L715, L827 source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_api/feature_flags.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/comfy_execution/progress.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/execution.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/main.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/protocol.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/script_examples/websockets_api_example.py
- cites → https://github.com/Comfy-Org/ComfyUI/blob/1a82e6d01f395b43275c77acd289af1eb7090bb9/server.py
- cites → https://github.com/Comfy-Org/docs/blob/506a4a94db30524adb8706667aec050d71dbdf60/development/comfyui-server/comms_messages.mdx