Merge pull request #4006 from pipecat-ai/aleix/task-frame-flush-ordering

handle EndTaskFrame, StopTaskFrame and CancelTaskFrame downstream
This commit is contained in:
Aleix Conchillo Flaqué
2026-03-16 17:35:11 -07:00
committed by GitHub
3 changed files with 48 additions and 21 deletions

1
changelog/4006.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed a race condition where `EndTaskFrame` could cause the pipeline to shut down before in-flight frames (e.g. LLM function call responses) finished processing. `EndTaskFrame` and `StopTaskFrame` now flow through the pipeline as `ControlFrame`s, ensuring all pending work is flushed before shutdown begins. `CancelTaskFrame` and `InterruptionTaskFrame` remain immediate (`SystemFrame`).