# TaskStop Tool

> The tool that stops a running background task by its id.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** TaskStop, Stop a background task

## Think of it like

It is like hitting stop on a clock that is still going.

## Definition

The TaskStop tool stops a background task that is still running, using its id. That can be a command, a teammate in an agent team or a named helper running in the background. If no task has that id, the error lists the helpers that are running, so Claude can pick the right one. You can stop the same tasks yourself from the /tasks list.

## Example

Jack started a dev server in the background and no longer needs it. Claude stops it with TaskStop, and the port is free again.

## Why it matters

A job in the background keeps going until something stops it. All that time, it uses your computer.

## Common mistake

Thinking a background command ends when the chat moves on. It keeps running until it finishes or is stopped.

## Three principles

- **Stops by id.** One task.
- **Many kinds.** Commands, helpers, teammates.
- **Also in /tasks.** You can stop it too.

## Related terms

- [Bash Tool](https://learn.benibix.com/term/ai/bash-tool)
- [Agent Tool](https://learn.benibix.com/term/ai/agent-tool)
- [Monitor Tool](https://learn.benibix.com/term/ai/monitor-tool)

## Taught in

- [Claude Code Subagents](https://learn.benibix.com/learn/ai-claude-code/claude-code-subagents): Claude Code, 15/16

![The main session starts subagents with the Agent tool, messages other sessions, and stops background work.](https://learn.benibix.com/diagrams/ct-agent-tools.svg)

---

Source: https://learn.benibix.com/term/ai/task-stop-tool
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
