Skip to content

Fix flow not terminating on CTRL+C (#2611) #2612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fix flow not terminating on CTRL+C

Fixes #2611

Description

This PR fixes an issue where flows don't properly terminate when CTRL+C is pressed. The process continues streaming to stdout after the interrupt attempt, unlike crew-only projects which terminate properly.

Changes

  • Added proper handling of KeyboardInterrupt in the Flow.kickoff() method
  • Added a test to verify the fix

How to test

  1. Create a simple flow with multiple steps
  2. Run the flow
  3. Press CTRL+C during execution
  4. Verify that the process terminates properly

Link to Devin run

https://app.devin.ai/sessions/cf7e0f348cd3478983b4118ed08c1b75

Requested by: Joe Moura (joao@crewai.com)

Co-Authored-By: Joe Moura <joao@crewai.com>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@fmatray
Copy link

fmatray commented Apr 15, 2025

@joaomdmoura This modification only doesn't remove the bug.
The CTRL+C still doesn't work.

Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cannot properly kill a flow
1 participant