taskrunner

A command that runs pending tasks from a queue in separate headless Claude Code sessions. It can preview work, limit the number of tasks, or keep polling for new tasks.

In plain words
What is it for?
Use it to inspect the queue, run selected tasks, perform a dry run, process at most a chosen number, or run continuously in polling mode.
Why use it?
It automates queued coding work while checking prerequisites and reporting which tasks succeeded or failed. Branch isolation and pull-request creation help keep task changes separate.

Command

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/stackbilt-dev/cc-taskrunner/taskrunner
Clone the repo
git clone --depth 1 https://github.com/Stackbilt-dev/cc-taskrunner
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00017 $0.00585
Opus 5 $0.00009 $0.00293
Sonnet 5 $0.00003 $0.00117
Haiku 4.5 $0.00002 $0.00059

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

Security

Grade A, and why

taskrunner 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.

plugin/commands/taskrunner.md · 71 lines

How it starts

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

cc-taskrunner — Run Task Queue

Execute pending tasks from the queue using headless Claude Code sessions with safety hooks, branch isolation, and automatic PR creation.

Behavior

If $ARGUMENTS is empty or contains only flags: Run the taskrunner with the provided flags (or defaults).

If $ARGUMENTS contains "--dry-run": Preview what would run without executing.

If $ARGUMENTS contains "--max N": Run at most N tasks.

If $ARGUMENTS contains "--loop": Run in polling mode (check queue every 60s).

Steps

  1. Verify prerequisites exist:

    command -v claude && command -v jq && command -v python3
    

    If any are missing, tell the user what to install.

  2. Check that the taskrunner script exists:

    ls ${CLAUDE_PLUGIN_ROOT}/taskrunner.sh
    
  3. Check current queue status first:

    bash ${CLAUDE_PLUGIN_ROOT}/taskrunner.sh list
    
  4. If queue is empty and no --loop flag, inform user and suggest /taskrunner-add to queue tasks.

  5. If queue has pending tasks, execute:

    bash ${CLAUDE_PLUGIN_ROOT}/taskrunner.sh $ARGUMENTS
    
  6. After execution completes, show a summary:

    • Number of tasks completed vs failed
    • Links to any PRs created
    • Any tasks that reported TASK_BLOCKED

Important Notes

  • Tasks run in headless Claude Code sessions — safety hooks block interactive questions, destructive operations, and production deploys
  • Each task gets its own git branch (auto/{task-id}) unless it has operator authority
  • Uncommitted work in the repo is automatically stashed and restored
  • Tasks that produce commits get automatic PRs via gh CLI
  • The --dry-run flag previews tasks without executing them

Environment Variables

Variable Default Description
CC_QUEUE_FILE ./queue.json Path to the task queue
CC_POLL_INTERVAL 60 Seconds between polls in loop mode
CC_MAX_TASKS 0 Max tasks per run (0 = unlimited)
CC_MAX_TURNS 25 Default Claude Code turns per task

Read the full file on GitHub · 71 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 · 71 lines · 17 tokens per session scan A 1eef5380c2ab

Subscribe to this mod's changes

taskrunner is a command published in the GitHub repository Stackbilt-dev/cc-taskrunner (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 17 tokens to every session and 585 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.