Taskmaster is a completion guard for coding agents.
It addresses a common failure mode: the agent makes partial progress, writes a summary, and stops before the user goal is actually finished.
Taskmaster is built around one idea: progress is not completion.
- Evidence over narrative: The agent should not be allowed to stop based on a convincing summary alone. Completion must be explicit and machine-checkable.
- Same-session recovery: When a turn is incomplete, the right move is to continue in the same running session, not restart from scratch.
- Goal re-anchoring: Compliance prompts force the model back to the user's actual request, not its own local notion of "good enough".
- Automation-safe signaling: A deterministic done token makes completion parseable for wrappers and CI-style flows.
A run is complete only when the assistant emits:
TASKMASTER_DONE::<session_id>
If that token is missing at stop time, Taskmaster blocks stop and pushes the current turn to continue.
Taskmaster uses one shared compliance prompt for all agents.
The prompt lives in taskmaster-compliance-prompt.sh and enforces:
- Goal confrontation — write out the user's stated goal verbatim, answer yes/no on whether it's achieved
- Re-read original messages — list every discrete request
- Check task plan — walk through each step including verification steps
- Check for errors or incomplete work — fix everything that failed
- Check for loose ends — TODOs, placeholder code, missing tests
- Never declare a blocker and stop — try different approaches
- DO NOT NARRATE — EXECUTE — if work remains, just do it
When AND ONLY when everything is genuinely 100% done (or explicitly deprioritized by the user), include:
TASKMASTER_DONE::<session_id>
Adapter implementations for different coding agents:
| Adapter | Status | Description |
|---|---|---|
| codex | Complete | expect PTY bridge + session log polling |
| claude | Complete | Stop hook integration (via check-completion.sh) |
| opencode | WIP | Wrapper script with subprocess timeout and output scanning |
TASKMASTER_MAX(default0): Max number of blocks before allowing stop.0= infinite.