remove-task

A command for permanently deleting a project task by its ID while checking related tasks, dependencies, subtasks, status, and completed work. Dependencies are links where one task relies on another.

In plain words
What is it for?
Use it to remove a task, review its relationships and removal impact, receive warnings about risky deletions, and optionally confirm with the -y flag.
Why use it?
It shows the likely impact before deletion, such as other tasks becoming blocked or subtasks being lost.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/snarktank/code-editing-agent/remove-task
Clone the repo
git clone --depth 1 https://github.com/snarktank/code-editing-agent

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 554 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00554
Opus 5 $0.00000 $0.00277
Sonnet 5 $0.00000 $0.00111
Haiku 4.5 $0.00000 $0.00055

Measured yesterday against content hash de8d3cb67a15, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

remove-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to remove-task — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/tm/remove-task/remove-task.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Remove a task permanently from the project.

Arguments: $ARGUMENTS (task ID)

Delete a task and handle all its relationships properly.

Task Removal

Permanently removes a task while maintaining project integrity.

Argument Parsing

  • "remove task 5"
  • "delete 5"
  • "5" → remove task 5
  • Can include "-y" for auto-confirm

Execution

task-master remove-task --id=<id> [-y]

Pre-Removal Analysis

  1. Task Details

    • Current status
    • Work completed
    • Time invested
    • Associated data
  2. Relationship Check

    • Tasks that depend on this
    • Dependencies this task has
    • Subtasks that will be removed
    • Blocking implications
  3. Impact Assessment

    Task Removal Impact
    ━━━━━━━━━━━━━━━━━━
    Task: #5 "Implement authentication" (in-progress)
    Status: 60% complete (~8 hours work)
    
    Will affect:
    - 3 tasks depend on this (will be blocked)
    - Has 4 subtasks (will be deleted)
    - Part of critical path
    
    ⚠️  This action cannot be undone
    

Smart Warnings

  • Warn if task is in-progress
  • Show dependent tasks that will be blocked
  • Highlight if part of critical path
  • Note any completed work being lost

Removal Process

  1. Show comprehensive impact
  2. Require confirmation (unless -y)
  3. Update dependent task references
  4. Remove task and subtasks
  5. Clean up orphaned dependencies
  6. Log removal with timestamp

Alternative Actions

Suggest before deletion:

  • Mark as cancelled instead
  • Convert to documentation
  • Archive task data
  • Transfer work to another task

Post-Removal

  • List affected tasks
  • Show broken dependencies
  • Update project statistics
  • Suggest dependency fixes
  • Recalculate timeline

Example Flows

/project:tm/remove-task 5
→ Task #5 is in-progress with 8 hours logged
→ 3 other tasks depend on this
→ Suggestion: Mark as cancelled instead?
Remove anyway? (y/n)

/project:tm/remove-task 5 -y
→ Removed: Task #5 and 4 subtasks
→ Updated: 3 task dependencies
→ Warning: Tasks #7, #8, #9 now have missing dependency
→ Run /project:tm/fix-dependencies to resolve

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 107 lines · 0 tokens per session scan A de8d3cb67a15

Subscribe to this mod's changes

remove-task is a command published in the GitHub repository snarktank/code-editing-agent (24 stars, last pushed 1y ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 554 tokens. A static security scan graded it A with 0 findings. It is 100% identical to remove-task, differing in 0 lines, and is treated as a copy.