claude_task_status
Query Claude task status, live activity, recent tools, changed files, and full final results with exit code, duration, and cost; cancel running tasks while preserving session_id and checkpoint.
Instructions
查询后台或历史 Claude 任务状态、实时活动、最近工具/改动文件,以及完成后的完整未截断回复、退出码、耗时与费用;也可传 action="cancel" 主动安全暂停(终止进程树)指定或全部运行中任务并保留 session_id 与断点以便随时续跑。
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "claude_task_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | 当 action="cancel" 时设为 true 可一键暂停所有(或指定 cwd 下全部)运行中后台任务。 | |
| cwd | No | 可选工作目录过滤(与 action="cancel" 配合时可限定只暂停当前项目内的任务)。 | |
| action | No | 可选动作:status(默认,查询状态或拉取结果)或 cancel(主动安全暂停运行中任务并终止进程树止血)。 | |
| reason | No | 可选暂停说明(如"用户要求先调整需求再继续"),会写入任务断点与看板流水。 | |
| task_id | No | 由 claude_run / claude_resume 转后台返回的 task_id(查询时与 session_id 至少填一个)。 | |
| wait_ms | No | 可选等待时长(毫秒,0~150000,默认 0 立即返回)。若任务仍在运行且 wait_ms > 0,最多等待该时长直到完成或返回最新进度。 | |
| role_name | No | 可选按成员职能名过滤(如"前端开发"),配合 action="cancel" 精准暂停指定成员。 | |
| session_id | No | 可选按 Claude session_id 查询或暂停该会话最近一次任务。 |