Menu

#15 Add ability to kill running execute_prompt and execute_command

closed
nobody
None
2026-04-05
2026-03-24
Anonymous
No

Originally created by: kumaakh

Problem

When a wrong prompt or command is dispatched to a member via execute_prompt or execute_command, there is no way to kill/cancel the running operation. The member continues burning tokens on a bad prompt until it completes or times out.

Expected Behavior

  • PM should be able to kill a running execute_prompt or execute_command mid-execution
  • Token spend stops immediately on kill
  • Member returns to idle state after kill

Use Cases

  • Wrong prompt dispatched — kill before it burns through max_turns
  • Command hanging or running longer than expected — kill and retry
  • Investigation dispatched with stale context — kill and re-dispatch with updated info

Acceptance Criteria

  • [ ] New kill_task or cancel_execution tool available to PM
  • [ ] Works for both execute_prompt (kills the claude -p session) and execute_command (kills the shell process)
  • [ ] Member returns to idle state after cancellation
  • [ ] Partial output from the killed execution is still retrievable
  • [ ] Works for both local and remote (SSH) members

Related

Tickets: #76

Discussion

  • Anonymous

    Anonymous - 2026-04-05

    Ticket changed by: kumaakh

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2026-04-05

    Originally posted by: kumaakh

    user can acieve this by using the background task managerment interface, by using x to kill the task.
    This issue only applies when the task is run in foreground by mistake

     

Log in to post a comment.

MongoDB Logo MongoDB