Troubleshooting
What each common refusal means, how to get past it, and how to recover from a bad state.
Start here, always
Run tasks validate before hand-repairing anything. It reports malformed
manifests, broken or cyclic references, containment that disagrees with its
parent, orphaned claims and a stale index.md — and changes nothing unless
you pass --fix, which only regenerates index.md.
Every refusal below exits with a code and, under --json, carries error.details —
usually with a kind — so a script can tell them apart without reading the message.
Common refusals
The tree predates v2: its config.yml is missing, has no version, or says
version: 1. Every command that opens it refuses it (skill install and hooks install only
write beside it); migrate upgrades it. Upgrade it once — see
migrating from v1:
tasks migrateA listed project in that state is left out of overviews and blocks references into it
with unsupported-version; tasks migrate <alias> upgrades it from here.
Nothing in this directory or any parent has a .tasks/ — nor, from a git worktree, in the
main checkout. Either you are in the wrong place — a sibling repository — or the project is
not set up. Point the CLI at the right checkout with -C <dir>, or create a tree:
tasks initCreating .tasks/ is a project-level decision: an agent asks before running init.
pause and handoff need a resume point — this refusal is what guarantees the next
session finds one (details.kind: missing-state). Write it, then pause:
tasks state token-schema < state.md
tasks pause token-schema -m "…"If the claim produced nothing at all, release it instead.
release is for a claim that produced nothing, and a state.md is the evidence that it
did (present-state). Pause the task with a message instead; the resume point stays
for whoever continues.
Someone else is working on it right now: another agent, another session, a person at a
terminal. details carries claimed_by, claimed_session and liveness. Pick another
task from tasks ready — tasks claim --next does this for you. Do not reach for
--force: it would take the task from under live work.
If the claim is your own older session's, it becomes orphaned once that session ends
(tasks session-end) or stays silent past session_timeout_minutes; then an ordinary
claim takes it over.
Its claimant's session ended or went silent, so the claim protects nothing. The actor's next session takes it over with an ordinary claim, which records the superseded session and when it was last seen:
tasks resume wire-refresh
tasks claim wire-refresh✓ claim auth-rework/wire-refresh: IN_PROGRESS → IN_PROGRESS
superseded agent s:s1 on auth-rework/wire-refresh (orphaned, last seen 2026-10-26T02:36:33Z)Another actor's orphaned claim is taken over only when a person says so. Should the
superseded session come back, its next transition or state write is refused — it reads
claimed by agent in session s2 (live); only its claimant may … — and it stops instead
of overwriting the new claimant's work.
The claim's liveness is unknown: it was taken without a session — by a person at a
terminal, or migrated from v1 — or its session's heartbeat never reached this machine.
Nobody can take it over without --force. Ask the person. The claimant can still state,
pause, release or done it: the same actor and, for a claim that has a session, in
that session.
An ancestor is claimed or assigned (held): its plan is being written or awaits
approval, and executing it early would build on a plan nobody confirmed. It ends when the
ancestor is neither claimed nor assigned — usually the approver's
tasks unassign <epic> -m "APPLY". --force overrides the hold, on a person's say-so.
Nothing beneath an unscheduled task can be scheduled or claimed (backlog-ancestor).
Schedule the ancestor the error names; its cascade brings this task back with it:
tasks schedule searchNothing overrides this: the remedy is one command.
The finish gate (finish-gate): every live child, and every finishes_after task, must
be DONE or CANCELLED first. details.open_children and details.finishes_after
list what is open. Finish or cancel each child — finishing an epic is one decision per
child — or cancel the parent, which cancels its open children with it. Nothing forces
the finish gate.
A depends_on reference is not DONE (start-gate, with details.blocked_by).
tasks dep list <task> explains each one. Finish the dependency, remove it if it no
longer applies (tasks dep rm), or — only when a person has said it does not apply —
tasks claim <task> --force.
A reference shown as blocked by X (cancelled) is stranded: waiting cannot open it.
Cancel the dependent too, remove the reference, or point it at whatever now does the
work; see gates.
A suffix matched several tasks; details.candidates lists them. Use a longer suffix or
the full path:
tasks show search/testsAnother command holds .tasks/.locks/tree.lock. Writes are short, and every command waits
up to two seconds before reporting this, so it usually means a burst of agents — retry.
A holder touches its lock while it works, so a long write is never mistaken for a dead
one; a lock older than ten seconds belongs to a dead process and is reclaimed
automatically. A write into a listed tree whose own lock was free succeeds even while
this tree's lock is busy: it then warns that index.md was not refreshed.
If it persists, check for a hung tasks process; only when none runs is deleting the
file safe — .locks/ holds no state.
An archived task keeps its path, so a new task there cannot silently inherit the old
one's references (reserved). Choose another path, bring the old task back with
tasks restore <path>, or release the path for good with tasks purge <path> — which
names the live tasks whose references a new task there would then satisfy.
Archived tasks are excluded from every query and every command but restore and purge,
which take the full path under .archive/.
The manifest does not parse, so no command can safely act on the task, and it blocks
everything that references it. This is the one time to edit the frontmatter by hand:
compare it with the file format — usually an
unquoted timestamp, a stray tab, an unclosed ---, or a v1 field left behind — then run
tasks validate.
config.yml accepts version, scope, session_timeout_minutes,
archive_resolved_after_days, actors, docs and projects only.
active_phase is scope in v2; statuses, roles and transitions are gone because
the lifecycle is fixed. A key from a newer revision of the convention means this CLI is
older than the tree: upgrade it.
A diagnostic, not an error: your git name has a space, which an actor cannot, so the CLI
fell back to user.email or the operating-system user. Set the name you want explicitly:
export TASKS_ACTOR=aliceheartbeat and session-end act for a session and refuse without one. Pass
--session <token> or set TASKS_SESSION; a harness hook passes the session_id of its
input.
ready shows only what you may take now. A task is absent when it is:
- outside the configured
scope— retry with--all; - assigned to someone else, or held by a claimed or assigned ancestor;
- a parent whose children are still open — its work is theirs until they close;
- blocked by a dependency,
BACKLOG, or already claimed; - archived — excluded from every query.
tasks list --all shows every open task with its situation, which says which of these
applies. --done, --cancelled and --resolved select closed tasks instead of the open
set; situation flags combine with OR.
Reading validate findings
tasks validate --json | jq -e .okErrors exit 4, so CI can gate on them; warnings do not. Every finding, what it means and
how to fix it is on the validation page.
Recovering from a bad state
An interrupted cascade. defer, schedule and cancel write the descendants first
and the named task last, so repeating the command completes it: what is already in place
is skipped. Until then, validate may report backlog-invariant after an interrupted
schedule; the other cascades leave no invariant broken, since the descendants are written
first.
An interrupted move across filesystems. The move copies first and removes the
source last, leaving a .moving marker in the destination meanwhile. validate reports
the task as present twice (duplicate-id), and moving the marked copy again is refused
(interrupted-move): keep one copy, then delete the marker.
A merge that touched .tasks/. Task state belongs on one branch, but when it merges
anyway: log.md conflicts are resolved by keeping both entries in time order; which
status survives in a task.md is a person's decision. tasks validate names both: a
task.md still holding conflict markers is malformed with the merge named and its line,
a log.md is log-conflict-markers. Run it afterwards too.
A stale index.md. It is derived and never read, so it is cosmetic — but committed.
tasks reindex or tasks validate --fix regenerates it.
Anything else. .tasks/ is committed, so the ordinary answer applies:
git diff .tasks
git checkout -- .tasksThat is the real reason task state lives in the repository: recovery is the same recovery you already know.