mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 23:57:11 -04:00
[GH-ISSUE #48] [Bug]: Stop Button Does Not Interrupt Flow During LLM Conversation #27
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @VictoryLN on GitHub (Jun 30, 2025).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/48
Originally assigned to: @asdek on GitHub.
Affected Component
Other (please specify in the description)
Describe the bug
Clicking the "Stop" button in the PentAGI frontend does not actually interrupt the flow. Based on my testing, when the flow reaches a step involving an LLM conversation (such as custom-generation-ex, though I am not completely sure), the stop action does not take effect. The flow continues to wait for the LLM response and cannot be interrupted or redirected to user input.
Steps to Reproduce
System Configuration
PentAGI Version:
vxcontrol/pentagi:0.3.0
Deployment Type:
Environment:
Enabled Features:
Active Integrations:
ENV
Logs and Artifacts
Pentagi logs
Grafana dashboard
Screenshots or Recordings
Verification
@asdek commented on GitHub (Jul 1, 2025):
Hey @VictoryLN
Thanks for such a detailed bug report!
Here's what I can see:
Your flow reached the Refine step where the "refiner" agent was planning new subtasks and closing unused ones.
While this was happening, you tried to stop execution, and it was correctly handled in the backend with the error message
context canceled:This happened here and this context was returned without an error...
This is a corner case with undefined behavior because we don't know whether the refiner completed its work or not:
https://github.com/vxcontrol/pentagi/blob/master/backend/pkg/controller/task.go#L304
For regular cases, this is handled by this code:
I've made some small changes to address this case, but it might break after popping the subtask in the next iteration:
https://github.com/vxcontrol/pentagi/commit/e88b9235554c05f7ac4739aec69980f6901265b4
Please let me know if this doesn't completely solve your situation. I'm keeping this issue open while you check the results.