docs · one topic per page
v0.9.0

tasks one prompt, one agent, one machine

A task sends one prompt to one agent. pastor picks a machine with room, starts the agent there in a herdr pane, and tracks it until it finishes or needs you. It is the unit everything else is built on: a job makes tasks, and an orchestrator runs them.

run one #

$ pastor task run "Fix the flaky test in ci.yml" --repo '~/src/app' --worktree

Quote the ~: --repo is a path on the machine that runs the agent, not on yours. --worktree gives the agent its own git worktree, on a branch pastor/t-N, so two agents never edit the same checkout. A task with no repo starts in ~/pastor-tasks on its machine.

flagdoes
--repothe repo, as a path on the machine that runs the task
--worktreea git worktree of its own, branched from --repo
--flockonly this flock’s machines take it
--machinerun it on this machine instead of any with room
--prioritylow, normal, high or critical; see queue

The agent, its model and its permission profile come from the machine, the flock or [defaults] unless you pass --agent, --model or --profile: the agent from the machine first, the model and profile from the flock first (see agents and models and profiles and trust). Every flag is in the cli reference.

herdr’s sidebar shows the task’s workspace as default/t-12, its flock and then the task, so tasks of many projects on one machine are easy to tell apart. --label changes that name.

states #

statemeans
queuedwaiting for a machine with room; see queue
startingpastor is opening the pane and starting the agent
runningthe agent is working
blockedthe agent waits for you: a permission prompt, a question, or folder trust
donethe agent stopped after working, or said it was done
staleit ran past its timeout (2h by default), or its pull machine was lost; the agent is left running
failedit could not start, or the agent exited before it was done
pauseda critical task took its slot; it resumes its session when there is room
waitingits agent stopped on a usage limit; it resumes its session when the limit resets, or when pastor limit clear clears it
closedfinished for good; its pane is gone

done means the agent stopped, not that the work is right. Read what it did.

follow it #

$ pastor task list             # live tasks: queued, starting, running, blocked, paused, waiting
$ pastor task list --all       # finished ones too
$ pastor task list --wide      # adds how each ended (RESULT) and its description
$ pastor task describe t-12    # one task in full: agent, model, profile and where each came from
$ pastor task read t-12        # the last lines of its pane
$ pastor events --follow       # every change, as it happens
$ pastor watch                 # one line per thing to act on

answer it #

A blocked agent is waiting for you. Read what it asked, then answer it, or attach to its pane and take over.

$ pastor task read t-12
$ pastor task send t-12 "yes, push it"
$ pastor task send t-12 --trust  # accept its folder-trust prompt
$ pastor task attach t-12        # ctrl+b q to leave

task send also works on a done task whose pane is still open. It goes back to running, with its context, so an agent that stopped too early can be told to finish.

how it ended #

An agent says how its work went as it finishes. The first line of its summary is the outcome: done, partial, blocked or nothing to do.

$ pastor task done --summary "done: pushed pastor/t-12, PR #42"
$ pastor task done --summary-file notes.md  # - reads stdin

pastor asks for it: each prompt it sends ends with a line asking the agent to run pastor task done --summary-file -. Each round of a task (the prompt, or a task send that reopened it) keeps one summary. A round that ends without one keeps the last lines of the pane instead. pastor task describe shows the last round’s, --all-summaries every round’s. The same summary reaches task list --wide, the task.done and task.failed events, pastor watch and a connector’s finish command.

The summary setting, per task (--summary), job, flock or [defaults], says how hard pastor asks:

valuedoes
askthe default: the line is added to the prompt
requirethe line is added, and the task fails if its agent stops without a summary
offnothing is added and nothing required

end it #

pastor closes a done task’s pane after 5 seconds (close_done_after in pastor.toml), and removes its worktree if it is clean: no uncommitted changes and no unpushed commits. A failed or stale task, or an orphan, loses its pane 5 seconds after its agent stops (close_failed_after), but stays failed for pastor task retry, its worktree kept. Nothing else closes on its own. A task run with --keep-pane (or keep_pane = true in its job, flock or [defaults]) keeps its pane and worktree whatever it ends in, until pastor task close, so you can go on talking to its agent; while it is done it holds no slot.

$ pastor task close t-12 --remove-worktree  # close it now, worktree too
$ pastor task retry t-14                    # a failed or stale task, again as a new task
$ pastor task prune --done --older-than 3d  # delete old finished rows; their items stay seen

A done task holds its machine’s slot until its pane closes, and a stale one until you close it. A failed task holds none. A closed Claude task can still be reopened: pastor task attach resumes its session in a new pane.

Read on: PR fix round runs and follows a task end to end; every flag is in the cli reference.

leave pastor?

Open in a new tab?

h/l choose · enter confirm · esc stay