subtask CLAUDE.md

A guide for Subtask, a system that lets a lead AI coding agent send separate tasks to worker agents in isolated Git worktrees. A worktree is an independent working copy of the same repository.

In plain words
What is it for?
Breaking large coding jobs into parallel tasks, assigning work to agents, preserving task context, reviewing results, and merging completed work.
Why use it?
It reduces the manual effort of managing several coding sessions, tracking their progress, and combining their results.

Instructions file

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 instructions/zippoxer/subtask/claude-md
Clone the repo
git clone --depth 1 https://github.com/zippoxer/subtask
Per session 2,209 This file is loaded in full into every session.
When invoked 2,209 The same file — it is already loaded in full.
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.02209 $0.02209
Opus 5 $0.01104 $0.01104
Sonnet 5 $0.00442 $0.00442
Haiku 4.5 $0.00221 $0.00221

Measured 2d ago against content hash 6dc5c6b7b4cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

subtask CLAUDE.md 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 2d ago.

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.

CLAUDE.md · 242 lines

How it starts

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

Subtask

Parallel task management and orchestration for AI coding agents.

A lead agent dispatches work to parallel workers in isolated git worktrees, with context preservation and progress tracking.


Philosophy

The Problem

Without Subtask, a user managing multiple AI coding sessions must:

  • Open multiple terminal tabs, each running Claude Code or Codex
  • Mentally track what each session is working on
  • Juggle progress, blockers, and dependencies in their head
  • Re-explain context when sessions crash or expire
  • Be the project manager while also trying to get work done

This cognitive load is exhausting. The user becomes a human orchestrator for AI workers.

The Solution

Subtask shifts the cognitive burden from user to lead agent.

Three roles:

  • User: Gives direction, makes decisions, approves work
  • Lead (e.g., Claude Code): Orchestrates everything in between
  • Workers: Execute tasks in parallel, isolated in git worktrees

The user provides direction. The lead handles everything else: understanding requirements, breaking work into tasks, dispatching to workers, tracking progress, reviewing output, iterating until it's right, merging when ready.

The lead is not a task dispatcher. The lead is a technical lead / project manager. We're building tools that enable this.

Design Goals

Every feature should ask:

  1. Does this reduce cognitive load on the user?
  2. Is this simple for the lead to use and understand?

If a feature adds complexity for the user, it's probably wrong. If it confuses the lead, it's also wrong. Internal complexity is fine if the interface stays simple.


Design Decisions

  1. Task-centric — Task name is the primary identifier. Everything flows from it.
  2. Git-native — Branches for isolation, worktrees for parallelism, standard merge workflow.
  3. File-based collaboration — Task folder shared between lead and worker. PLAN.md for plans, PROGRESS.json for tracking. Files persist; sessions don't.
  4. Workspace opacity — Lead never picks workspaces. Subtask assigns them.
  5. Context preservation — Task folders are the portable, syncable unit. history.jsonl and --follow-up ensure nothing is lost when sessions crash. Copy anywhere, full context. Internal state and caches are local and rebuildable.
  6. Progress visibility — Tool counts, timing, and PROGRESS.json let lead track workers without interrupting them.
  7. Guardrails over escape hatches — Prevent footguns. Errors guide the lead on what to do next, not just fail. Dangerous operations require explicit intent.
  8. Local-first — Operations use local git state. Lead controls when to sync with remote. No stale remote ref surprises.
  9. Event sourcinghistory.jsonl is the append-only source of truth. SQLite index is a derived projection for fast queries. If they diverge, history wins.

Read the full file on GitHub · 242 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. 2d ago First seen · 242 lines · 2,209 tokens per session scan A 6dc5c6b7b4cf

Subscribe to this mod's changes

subtask CLAUDE.md is an instructions file published in the GitHub repository zippoxer/subtask (340 stars, last pushed 4mo ago), licensed MIT. It adds 2,209 tokens to every session, about $0.0110 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-30.

Related

Other instructions, from other repositories

map-framework CLAUDE.md

Instructions for azalio/map-framework, covering map framework (mapify-cli) — agent instructions, what this repo is, critical invariant: template single-source render, skill catalog invariant and how to work in this repo.

azalio/map-framework · 1,601 tokens

crewplane AGENTS.md

Instructions for crewplaneai/crewplane, covering agents.md, repo facts, read first, repo map and project heuristics.

crewplaneai/crewplane · 2,548 tokens

AI-Rig CLAUDE.md

Instructions for Borda/AI-Rig, covering instruction layering, edit scope — hard constraint, lint/format — use pre-commit hooks, not direct tools, test workflow and markdown policy.

Borda/AI-Rig · 1,952 tokens

domain-experts CLAUDE.md

Instructions for wonsukchoi/domain-experts, covering domain experts — session bootstrap, non-negotiables when adding or editing roles, dual-graph context policy, mandatory: always follow this order and token usage.

wonsukchoi/domain-experts · 1,300 tokens

FigCC AGENTS.md

Instructions for madebypan/FigCC, covering agents.md, project identity, runtime architecture, security invariants and compatibility and storage.

madebypan/FigCC · 1,670 tokens

crewplane CLAUDE.md

Instructions for crewplaneai/crewplane, a project described as: Run reviewable, resumable coding-agent workflows across Claude Code, Codex, Gemini, GitHub Copilot CLI, or any CLI. You define the stages in Markdown; Crewplane runs the workflow, agents do the work, and every handoff stays on disk.

crewplaneai/crewplane · 66 tokens