Skip to content

Feature Request: Cancel job on user request in interactive mode #360

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

Open
drinkredwine opened this issue Mar 22, 2025 · 3 comments · May be fixed by #367
Open

Feature Request: Cancel job on user request in interactive mode #360

drinkredwine opened this issue Mar 22, 2025 · 3 comments · May be fixed by #367

Comments

@drinkredwine
Copy link

In the interactive mode, I would like to cancel execution when it's going south and enter new instructions.

@bhouston
Copy link
Member

This is a good idea. I've noticed that as well. I started on that, I will finish it early this week.

@bhouston
Copy link
Member

/mycoder, can you have a look at this feature request? I thought that maybe an attempt was made to enable this via Ctrl-M or Cmd-M (on MacOS), but it doesn't seem to work. I think the goal would be to just stop processing on the main agent and allow the user to enter in new instructions, and then have it resume. The main agent should be able to communicate with its sub-agents using existing mechanisms to switch their priorities or to get them to stop (can the main agent force a stop in a sub-agent? If not we should add that? Like if a sub-agent was doing a research task, we can just get it to immediate halt and return.)

@bhouston
Copy link
Member

I've implemented the feature to cancel a job in interactive mode.

This implementation adds:

  • A new keyboard shortcut (Ctrl+X) to cancel the current job
  • A confirmation prompt to avoid accidental cancellations
  • Ability to provide new instructions after cancellation
  • Updated documentation for the new functionality

The PR is available at: #367

When using interactive mode, you can now:

  • Press Ctrl+M to send corrections (existing functionality)
  • Press Ctrl+X to cancel the current job and provide new instructions (new functionality)

The implementation clears the conversation history when a cancellation is requested, ensuring the agent stops the current task and focuses entirely on the new instructions.

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 a pull request may close this issue.

2 participants