Taskgerts
A Taskgert is a batch of tasks of a project with a target: a final objective that is checked once every task is done. It is the unit an agent is asked to run: "run TGT-G1" means plan the batch, work its tasks in order, then prove the target.
Lifecycle
| Status | Meaning |
|---|---|
DRAFT | Tasks are being gathered. Anyone with taskgert.manage can add or remove tasks. |
PLANNED | The order and the target are agreed (it needs both a target and at least one task). |
RUNNING | Started: the clock runs. Phase tasks until every task is done, then phase target. |
DONE | The target was carried out, with a verdict — PASSED or FAILED — and a report. |
CANCELLED | Abandoned. Its tasks are left as they are. |
Rules worth knowing:
- A task belongs to one Taskgert at a time. Deleting a Taskgert frees its tasks.
- A Taskgert cannot finish while any of its tasks is open: the target always comes last.
- While it runs, tasks already completed stay in it — the work delivered belongs to the run.
- Each Taskgert has a key: the project key,
Gand a number —TGT-G1,TGT-G2… — never confused with task keys (TGT-1).
The plan
The plan is the tasks in the order to run them, each with an optional complexity in Fibonacci points
(1, 2, 3, 5, 8, 13), plus the reasoning (plan, Markdown). Agents propose it — dependencies first, then risk
and value, priority breaking ties — and wait for a person to approve it before recording it with
plan_taskgert. The tasks can be given one by one or as whole epics (TGT-E1). The order should follow the
tasks' dependencies (link_tasks). Either way the run enforces them: a task is not handed out while what it
depends on is open, and an Idea is not handed out until it has been refined into a TASK. If no target was chosen, the agent proposes one too; a target written through a bot token is
marked as written by an agent.
The Taskgert page
One column, top to bottom: the header (key, status, phase and actions); the target, in full (collapsible when long); the progress line (tasks delivered and points, with a bar); Now, a strip with who works on what (agent or session, task, column, model, since when; one empty state); four tiles; then the tabs Plan, Sessions and agents, Timeline, Activity and Evidence.
The tiles hold real numbers, and a tile with no data says "—" and why, never a fake 0:
- Delivered: tasks and points done.
- Time: elapsed, and the time worked.
- Usage: tokens with the cache share, and the estimated cost, summed over the sessions, subagents and runner
jobs that worked the run's tasks (
get_taskgert→usage.run, fromusage.totalsof the metrics). - Agents: now / maximum, and how many took part.
The Sessions and agents tab lists every session and runner job that worked a task of the run: who and the client,
the task, the model, the duration, the tokens and cost over the run's tasks, and its subagents (count by model,
expandable). A runner job links to its console. It is the sessions list of Agents, filtered by the Taskgert
(GET /api/v1/workspaces/{id}/agent-sessions?taskgertId=), visible to whoever can read the Taskgert. Each Plan
row keeps its status, points, worked and cycle times, and adds the agent or session on it and the task's usage.
Parallel runs
A Taskgert can let several agents work at once. Its run settings, given on create_taskgert or
plan_taskgert (autonomy also on start_taskgert):
| Setting | Meaning |
|---|---|
maxAgents | How many agents may hold a task at the same time (1–8). 1, the default, runs one at a time. |
evidence | Proof of the target to attach at the end: NONE, SCREENSHOT (one change), VIDEO (several). |
tokenBudget | Tokens the agents may use in all. Once spent, no new task can be claimed. |
autoMove | Claims and DONE releases move the task across the board (default on). Off: people move cards. |
autonomy | How far its agent jobs go alone: supervised (default), staging or full (see below). |
Autonomy. A Taskgert's own agent job (started with it, or by a run asked from Telegram) takes its level unless
it says otherwise; a job started directly on one of its tasks is supervised unless it asks for more. Starting,
re-planning or re-targeting a Taskgert above supervised needs agent.autonomy, and a job goes supervised when
whoever asked for it no longer holds that permission when it reaches its runner. The levels: supervised leaves releasing
and deploying to a person; staging merges, releases and deploys up to staging alone (production still asks);
full goes through every environment of the project's contract, production included. The project's
agent.autonomy in taskgert.yml is the ceiling (see Project contract), a level above supervised needs a
project admin, and one above the ceiling is refused (422 autonomy-above-ceiling) with what to change.
Each task of the plan can name the areas of the code it touches — contract, migrations, api:files,
web:board, mcp, docs… Areas decide what may run together:
- two tasks that share an area never run at once;
contractandmigrationsrun alone: nothing else runs beside them;- a task with no areas also runs alone, since nobody knows what it touches.
Agents coordinate through claims:
claim_next_task(with the agent's label, e.g.worker-2) gives the first task of the plan that is open, held by no one, and shares no area with the work in progress. If nothing can be taken now, it says why; wait and ask again. Asking again with the same label answers the claim already held. WithautoMoveon, a task still in the first column moves into the first active column, so its worked time starts now.- A claim is a lease (10 minutes by default):
heartbeat_claimextends it while the agent works. A lease that lapses frees its task for another agent, and the late heartbeat is refused. release_taskends it —DONEonce delivered, orABANDONEDto hand it back — with the tokens and the time used. Without tokens, they are taken from the task's session marks since the claim. WithautoMoveon,DONEmoves the task into its done column, completing it; an abandoned task stays where it is for the next agent.
Claims are decided one at a time on the server, so two agents asking at the same instant never get the same task. The dashboard shows who works on what, live, and the metrics add a usage section: tokens in and out, agent time, per agent, and parallelism — agent time per elapsed time (2 means two agents busy all along).
Running a Taskgert in parallel
With an agent such as Claude Code, one agent leads and launches workers: one sub-agent per slot
(maxAgents), each in its own git worktree. Every worker loops — claim the next task, work it on its branch,
keep the lease alive, release it with its usage — until nothing is left. The lead merges the finished branches
into the main line one at a time and runs the checks after each, so two changes never land together; a
conflict becomes a fix on that task. Workers only get their task's context, which keeps tokens down; the token
budget stops new claims once spent.
The tasks stay up to date live while it runs: each phase is ticked by whoever ran its check, as soon as it passes, in order, with its proof in a comment. A worker ticks Plan, Contract, Code and Lint & test on its task; the lead ticks E2E and Merge right after merging that branch; Release, Deploy and Verify are ticked when the run's one release is made and deployed. Anyone watching the board or the task page sees each tick as it happens.
The taskgert-run procedure does all of this when maxAgents is above 1: ask your agent to "run TGT-G1" and
approve the plan, with its waves.
Evidence
With evidence set, the target ends with proof that anyone can watch: a screenshot for a single change, a
video for several. It is recorded in a real browser running in Docker (the official Playwright image), so it
looks the same on every machine, and attached to the Taskgert, where the dashboard shows it.
The agent writes a scenario from the target — the steps a person would take to see it met:
{
"signIn": { "email": "[email protected]" },
"steps": [
{ "caption": "Two agents worked at once" },
{ "goto": "/dashboard" },
{ "click": { "role": "link", "name": "Taskgert launch" } },
{ "click": { "role": "link", "name": "Taskgerts" } },
{ "waitFor": "Target met" },
{ "pause": 2000 }
]
}
| Step | Does |
|---|---|
goto | Opens a path of the app (or a full URL). |
click | Clicks visible text, or an element by role and name (button, link, tab, radio, …). |
fill | Types into the field with that label. |
press | Presses a key, such as Enter. |
waitFor | Waits for a text to appear (15 s at most): the proof that something happened. |
pause | Lets the viewer look, up to 10 s. |
caption | Shows a caption over the page — it stays across pages until changed; "" hides it. |
scroll | Scrolls to the top, the bottom, or a pixel offset. |
signIn uses the development login, so it works on a local stack. baseUrl points the scenario elsewhere
(the local web app, http://localhost:3100, by default); viewport changes the size (1280×720 by default).
Then, from the repository:
TASKGERT_MCP_TOKEN=… pnpm evidence TGT-G1 scenario.json # the Taskgert's own setting
TASKGERT_MCP_TOKEN=… pnpm evidence TGT-G1 scenario.json --mode video --out evidence --no-upload
It starts the browser container (bound to this machine only; pages on localhost reach the stack running
here), signs in, follows the steps, records, uploads the file with attach_taskgert_evidence, and stops the
container. If a step fails it stops there, says which step and why, and saves what the page looked like
(failure.png). Docker must be running.
Inside taskgert-agent there is no Docker socket to start that container with, so the script launches the
Chromium bundled with the image instead (it does so whenever TG_AGENT=1; elsewhere, --local-browser asks for
it). There localhost is the agent's own container — apps the agent started there. To record a stack running on
the agent's host, set EVIDENCE_LOCALHOST=host.docker.internal: every localhost the pages use, their API
included, then goes to the host.
attach_taskgert_evidence also takes any screenshot or recording (PNG, JPEG, WebP, WebM, MP4) made another way.
Time metrics
Every column change of a task is recorded with the stage it entered: QUEUED (the board's first column),
ACTIVE (any other column that is not done) or DONE. The stage is judged when the task moves, so reordering
or renaming columns later never rewrites history. From that history:
| Metric | Definition |
|---|---|
| Started | The first move out of the first column (or the creation, if created past it). |
| Worked | Time spent in active columns, every visit added up; the current visit counts up to now. |
| Lead time | Creation to completion. |
| Cycle time | Started to completion. |
| Changes | Column changes after the creation. |
And for a Taskgert:
| Metric | Definition |
|---|---|
| Elapsed | From its start to its finish — or to now while it runs. |
| Delivered | Tasks and points completed, out of the total. |
| Worked | The worked time of all its tasks. |
| Mean / median | Worked time per completed task. |
| Mean cycle | Cycle time per completed task. |
| Points per hour | Points delivered per hour elapsed. |
| Slowest | The completed task with the most worked time. |
| In progress | Tasks in an active column right now. |
Because worked time comes from the board, it is only as true as the board: move a task into an active column
when work starts and out of it when it stops. In a run with autoMove (the default), claims and releases do
this on their own; otherwise agents move the cards as part of running a Taskgert.
Session usage
What agents use on a task is recorded as session marks: a person's Claude Code or OpenCode session, or a
runner job, tells the task what its counters say at moments that matter. Each mark carries the session's id, its
client (claude-code, opencode, runner), the model in use, the context used (percent), and its cumulative
tokens and cost — numbers, ids and model names, never prompts, text or paths.
| Mark | When |
|---|---|
start | The session takes the task (claims it, or moves it into an active column), with the context already loaded. |
end | It finishes it (moves it to done, or releases its claim), or the session closes. |
compact | Its context was compacted, with how full it was just before. |
restart | A session took over the open task (/clear, a restart, a resume). |
checkpoint | The counters so far. Still accepted, no longer sent by the kit: the start and the end are enough. |
subagent | One subagent the session launched (the Agent tool), with its own type, model, tokens and time. |
The task's usage is the growth of the counters between its marks, per session (nothing accrues after an end
until the session takes the task again; a counter that went back down started again). Tokens are told per
model and per client — a model switched mid-session, or a runner on Sonnet beside a live session on Opus, shows
both — with the context peak, compactions, restarts and the subagents by type and model. Subagents' tokens count
once, in the totals too; a subagent mark with no tokens and no type is left out.
Real numbers (TSKGT-187). inputTokens is all of the input: fresh, cache writes and cache reads, with
cacheReadTokens and cacheWriteTokens (optional on report_session_usage) as the parts that went to or came from
the prompt cache, so a long session no longer looks small. A mark without a costUsd is priced by its model from a
price table (packages/domain-types/src/model-prices.ts, shared by the API and the kit); the status line's own cost
wins where it exists. Every subagent is counted with its type, model, background or not, isolation, time, tokens and
cost, the background ones too: the kit reads their transcript when they stop, or when the session ends.
One total for a runner job (TSKGT-197). The runner reads the Agent SDK's cumulative modelUsage and
total_cost_usd of each turn instead of adding the turns up: "tokens in" is the fresh input plus the cache writes
plus the cache reads of every model the job used, subagents and helper calls included, so it is far larger than "out"
(most of it is cached context read again on every turn); the cost is the last cumulative figure. The job's header,
its phases (each shows the tokens of its own turns, which add up to the job's total) and the task's Sessions card all
show that same total for a finished job, and the card says how much of it was cached. A job resumed on another
runner starts the SDK's counters again: the new figures are added to the earlier total.
The Sessions tab. Agents → Live sessions (/agents?tab=sessions) lists the workspace's sessions, not its
bots: who ran each (person and client), the tasks, the start and the end or Live, the duration, the main model, the
tokens with the cache share, the cost, the context peak, compactions and restarts, and its subagents by model
(3 · Sonnet 5.5 ×2, Haiku 5.5 ×1), which expand into a table. Filter by live or ended (?status=live|ended, where
the dashboard's All live sessions lands), person and project. A session is live while its last mark is not an
end and it was heard from in the last 3 hours. Owners see every session of the workspace, anyone else their own
(GET /api/v1/workspaces/{id}/agent-sessions). The bots and their tokens are below, under Bots and tokens.
It reads like this: Started with 41% context (410k) · Opus 5.5 — task used 180k tokens ($2.10) — ended at 63% — 2 subagents (general-purpose ×2, 120k) — 1 compaction. Models with no tokens, and those no client named, are not listed.
The task page shows it in its Sessions block, live; get_task and get_taskgert include it; and a Taskgert's
usage adds its tasks' sessions. A run's totals count a task's marks only when no claim of it reported tokens, so
work told both ways (a runner releases its claim with its usage and marks its task) is never counted twice.
Marks come from report_session_usage (any agent can send them), from the kit's Claude Code status line and hooks
and its OpenCode plugin (tg usage mark, see the kit),
and from the runner, at a job's open, each phase passed and its close.
Running one with an agent
Ask your agent to run it — for example "Run TGT-G1". With the taskgert-run procedure it:
- reads the Taskgert (
get_taskgert) and its tasks; - proposes the order, the complexities and, if missing, the target — and waits for your approval;
- records the plan (
plan_taskgert) and starts it (start_taskgert); - works each task in order, moving it across the board as it goes — or, in a parallel run, has each agent claim, work and release tasks until none is left;
- once all are done, carries out the target, attaches the evidence if asked for, and closes the Taskgert
(
finish_taskgert) with the verdict and a report, after consolidating the learnings of the run: the report carries the line "memory: N saved, M updated", and the agent suggests a memory review when many memories are unverified or the run changed a lot (it does not start one without a person); - sums up the metrics.
On a runner, as one lead with subagents
Run with agent on a Taskgert's page (or start_agent_job with taskgert) hands the run to a
taskgert-agent runner in one of two modes (mode). With the claude engine the default is
LEAD: the runner opens one lead session that launches up to Agents (maxAgents) subagents, each in its
own worktree, claiming a task as claim_next_task does (dependencies, decisions and areas respected) and working it
on agent/<TASK KEY> up to Lint & test. The runner makes the integration branch taskgert/<TASKGERT KEY> from
develop. When the lead hands a task over (TASK MERGE: <KEY>), the runner merges its branch into the integration
branch with --no-ff, runs tg lint and tg test on the result, ticks the task's Lint & test and Merge with that
run as proof, and pushes; a conflict or a red gate goes back to the lead and nothing lands. When every task is
merged (LEAD DONE) the runner runs the target once on the integration branch (full gate, one batch E2E), ticks
E2E on every merged task, and lands the branch in develop as far as the job's autonomy and agent.merge allow
(supervised: it stays pushed for a person to merge). If the lead or the runner stops, the lead's session resumes in
the same worktree; a task released ABANDONED pauses the run. The page's Agent run section shows the lead, the
subagents (one per live claim) and the integration branch; get_taskgert lists them as agentRun.
On a runner, task by task
mode: PER_TASK (the default for other engines than claude) keeps the older run. Its Taskgert job runs no
session of its own: it starts the Taskgert if it is a draft or planned, then runs its tasks one by one, in plan order, each as its own phased task job on
the runner and engine you chose — the same job as Run with agent on a task, with its phases, checks, claim and
pull request (or merge, release and deploy, when autonomous).
- Up to Agents (
maxAgents) at once, picked asclaim_next_taskpicks them: what a task depends on comes first, a task waiting for a decision waits, and tasks that share an area (or declare none) never run side by side. A task already done is skipped. - Each task's job takes the Taskgert job's autonomy and extra instructions. A level above supervised needs who started the run to hold that right, checked again when each job reaches the runner (supervised otherwise).
- When a task's job ends done, the next task goes. When one fails (or is cancelled), the run pauses: its
Taskgert job is failed, and whoever started it is told. Retry that task's job (
retry_agent_job) to go on from there, or take the task out of the Taskgert (remove_from_taskgert). - Once every task is done, the Taskgert job ends done and its starter is told to attach the target's evidence and finish the Taskgert: finishing stays a person's (or an agent's) step.
- The page's Agent run section shows it live: the Taskgert job's status (and why it is paused or waiting), the
tasks at work with what they do now and their phases, and one row per task with its status, console and pull
request.
get_taskgertlists the same asagentRun. Cancelling the Taskgert job stops its tasks' jobs too.
Asking for a run from Telegram
Linked to the Taskgert Telegram bot, you can ask from your phone: /run, optionally with a note ("/run the
Telegram ones first"). The request waits until an agent session picks it up (list_run_requests). The agent:
- groups the project's open tasks into one or more Taskgerts;
- plans them;
- proposes them (
propose_run), with a short summary of why they are grouped so.
The proposal reaches you on Telegram with Approve and Reject. When you approve, each Taskgert starts on a runner of yours and runs task by task (above); when you reject, the proposed Taskgerts are cancelled.
Asking for a run from the web
New Taskgert on the Taskgerts tab (the usual way to create one) and Run with agent on the project's board (select tasks, Ideas included) open the plan dialog. On the tab every refined open task is chosen at first, sorted by title (numbers by value: "Task 2" before "Task 10"): untick what should wait, use Select all / none, or turn on Include Ideas. Tasks already in another unfinished Taskgert are left out (a task belongs to one at a time), and Create by hand leads to the manual form (name, target, tasks). The dialog also asks for the runner (online runners with a free slot first, offline ones disabled, the first available preselected), the autonomy for the approved run (within the project's ceiling) and an optional note. Every web run goes through a proposal; nothing starts before you approve it.
- The request is created and a supervised agent job starts on the chosen runner (its console is linked from the
Taskgerts tab). The agent reads the request (
list_run_requests, originWEB,taskIds,runnerId). - It refines the Ideas among your tasks, groups only those tasks into Taskgerts, creates and plans them and proposes
them (
propose_run). - The request card shows the proposal live: per Taskgert the order, what runs in parallel, blockers, why the tasks are grouped so, the Ideas it refined and the tasks that remain Ideas, with Approve and Reject.
- Approving starts each Taskgert as a job on the chosen runner, at the chosen autonomy; rejecting cancels the proposed Taskgerts. The person who asked, or a project admin, decides.
The project's Taskgerts tab shows all of this live. A Taskgert's page has:
- one main action for where the run stands (Start, Finish), with the rest in its … menu;
- a Now strip while it runs: the task being worked, who holds it, for how long and how far its checklist is, and the last change;
- four key figures: tasks delivered, elapsed, worked and points per hour;
- the run in tabs: Plan (a table of the tasks; a task opens in a side sheet), Timeline (every task over time) and Activity (the changes since you opened the page);
- the target, its result and the evidence beside them (or below them on a narrow screen).
Monitor turns the page into a full-screen view for a second screen.