agent_crew icon indicating copy to clipboard operation
agent_crew copied to clipboard

feat: Add a "Stop" button to the chat interface to interrupt Agentcrew

Open crstian19 opened this issue 8 months ago • 0 comments

Summary

Add a "Stop" button to the chat interface to allow users to manually halt Agentcrew executions.

Details

The chat interface currently lacks a way to stop Agentcrew once it starts generating a response. A manual stop action should be added for users who need to interrupt the process if the agent begins to hallucinate, goes off-topic, or gets stuck.

Requirements

  • Add a visual "Stop" button to the chat UI that appears during generation.
  • Implement backend logic to intercept the stop request and halt the active Agentcrew execution.
  • Handle the termination of the headless background process safely.
  • Implement a system kill fallback if a graceful shutdown of the background process is not possible.

Context

As discussed with Pau and Cristian Córdova, this is a highly requested quality-of-life feature to better control the agent. Because Agentcrew is currently invoked in headless mode, it runs as a background process. Stopping it will require investigating the best way to terminate the process (as a last resort, executing a system kill).

Acceptance Criteria

  • [ ] A "Stop" button is visible in the chat UI while the agent is running.
  • [ ] Clicking the "Stop" button successfully halts the Agentcrew process.
  • [ ] The backend properly terminates the background process (either gracefully or via system kill) without leaving orphaned processes.
  • [ ] The chat UI updates to reflect that the execution was manually stopped.

crstian19 avatar Mar 13 '26 12:03 crstian19