Nairinairi
Back to changelog

Stop a Running Task

Once an agent picked up a task, you had to let it finish, even when you could see in the first minute that it had misread the request. Now you can stop it and redirect.

From Slack

There are two ways, and they do the same thing:

  • Slack's own Stop control under the thread, labelled with the agent's name.
  • The ⏹ Stop button at the bottom of the live checklist. After a press it changes to "Stopping… · asked by Ben" so nobody presses it twice.

When the agent confirms, the checklist ends as "Stopped after 4 steps", the thread gets a ✋, and a reply says "Stopped by Ben. Reply in this thread to continue." Anyone who can see the thread can press Stop.

From the dashboard

For tasks you started in the dashboard chat, a strip above the message box shows "Agent is working · 6 steps so far" with a Stop button. The message box locks until the stop goes through, then the chat reads "Stopped by Ben. Send a message to continue."

From the API

POST /api/public/v1/conversations/{jobId}/stop stops the turn an API conversation is running. It needs the conversations:write scope, and the conversation records which API key stopped it.

What happens to the work

  • The agent stops within seconds and keeps its session, so your next message picks up with the full context of what it was doing.
  • If the agent had already changed code, those changes are committed to the task's branch as WIP: turn stopped and pushed. The next turn starts from there. A stopped turn doesn't open a pull request.
  • Messages you sent while the agent was working are dropped along with the stopped turn. Send them again once it has stopped.
  • If the agent doesn't confirm within a minute (it lost its connection, say), the thread tells you so.

Reacting with ✅ works as before: it closes the task and does not stop a turn in progress. Self-hosted agents need nairid 0.0.123 or later to be stopped.