tasks
Guides

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

Reading validate findings

tasks validate --json | jq -e .ok

Errors 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 -- .tasks

That is the real reason task state lives in the repository: recovery is the same recovery you already know.

On this page