Reference
Running
What assay does today: one step of a feature turned at a time, by agents or a command, each session in a throwaway container on a clone of the project's repo.
Turns one step of a feature at a time, when the person says. A step is run by agents from several vendors, each in a throwaway container on a clone of the project's git repo with its harness's own CLI and sign-in, or by a command in the same kind of container. This is the part of the design that is built.
just install # or: go build -o assay .
assay build # the project's image, and the harnesses its flow uses installed
assay new notes "a notes tool" -F idea.md # makes the feature 001-notes, with its request
assay turn 1 # its first turn, at the config's start
assay turn 1 # the step that follows
assay turn 1 build -m "and make rm take several numbers"
assay retry 1 # set the last turn aside and turn its step again
assay status # where every feature stands
assay report 1 # what is to be merged, how it got here and what it took
example/ beside the code is a project's .assay/ folder, to copy or link into a project as its own. An example flow walks through it.
A project's folders
A project is a folder with .assay/config.toml, in a git repo. assay finds it by walking up from the working directory; --config names one outright.
| Path | Holds |
|---|---|
config.toml |
the project's settings |
Dockerfile |
its toolchain, if not the default |
rules.md |
its standing rules, if any |
steps/ |
its flow: a file for each step |
.assay/ is what the project is, and is committed. It may be a link to a folder kept elsewhere. What has happened to the project is beside it in .assay-state/, which holds features/, a folder per feature. git does not see it: assay turn writes a .gitignore inside it that ignores everything there, so nothing of the project's own is changed. Neither folder is given to a session: no session's checkout has .assay/ (below), and .assay-state/ is never committed.
rules.md, when there is one, is the project's standing rules: its text goes into the prompt of every agent's session, under a heading saying they are the project's standing rules, after the step's own text and before the section assay makes. It is read from the working tree each turn, as the flow is. A command is not given it.
Config
start = "spec" # the step a feature with no turns begins at
# account = "work" # the account sessions sign in with
[defaults]
timeout = "20m"
internet = false # only the harness's API hosts; true opens everything
# runs = 1 # sessions of each agent
# parallel = 1 # at most this many sessions at once; all of a step's, unset
[settings] # what a feature may be set to, the first word its own until set
review = ["low", "medium", "high"]
[repo] # the clone sessions work on; all optional
include = ["../cabal", "../deps"]
prepare = "just init && just build-debug"
[harness.grok] # optional: how to launch the CLI, nothing more
# version = "1.0.92" # pin it; otherwise the version kept on this machine
args = [] # escape hatch for anything without a key
# hosts = ["extra.x.ai"] # added to the allowlist when internet is off
[price."sonnet"] # optional: in place of the kept price, dollars per million tokens
in = 2
out = 10
cached = 0.1
written = 2.5
Any other key is an error. A step's agent may name any harness assay drives, which assay harness lists, and needs no [harness.<name>] for it. A section is optional and carries only a pinned version, extra args and extra hosts; one naming a harness assay does not drive is an error. assay build installs, ahead of a turn, every harness the flow's steps name, whatever settings their agents run at. [price."<model>"] stands in for the kept price of a model, by the name a step's agent gives in model, and every session of it is costed from its tokens at that price: in for input tokens, out for output, thinking included, cached for those read from the cache, each needed, and written for those written to the cache, which are priced as input without it; none below 0. start must name a step in the flow. [settings] declares a feature's settings: each a name and the words it may take, at least one, none of them empty, starting with @ or holding whitespace, =, /, ? or :. args is the escape hatch for per-CLI knobs with no key of their own; the command line is built in the CLI's driver in harness/, because it encodes each CLI's headless quirks.
Step files
A step is .assay/steps/<step>.md: TOML between +++ lines, then the step's text, which is what its agents are asked. README.md there is not a step.
+++
agents = [{ harness = "claude", model = "sonnet", effort = "high" }]
in = ["@branch", "spec"]
out = ["@branch"]
next = "test"
+++
| Key | Says |
|---|---|
agents |
who runs it, a session each |
command |
what runs in place of agents |
in |
what else it is handed |
out |
what it hands back beyond out.md |
next |
what follows |
-
An agent is
harness,model,effort, and where wantedrole,context,runs,timeoutandat. An agent with no model leaves the CLI's own default.runsis how many sessions it gets,[defaults] runsotherwise.atis a table from a setting to the words at which the agent runs,at.review = ["medium", "high"]: with it, the agent runs only when the feature's word for every setting it names is one it lists; without it, always. -
The step's text is what every agent is asked, up to the first line that begins
+++. A line+++ <role>begins a part that only the agents of that role are asked as well, after the rest, so one step's reviewers can each have a brief of their own. The line may list several roles,+++ security ui, for a part they share, and a role's parts are joined in the order they come. Two agents may have one role, and each gets its parts. A part for a role that none of the step's agents has is an error. -
innames what a step is handed beyond what every turn is (below). Each name hands one thing:In inHands specout.mdfrom spec's latest finished turnspec:3,spec:allthe same from its last three, or every one spec/notes.mda file spec lists in its out@requestthe feature's request.md@historywhat has happened to the feature @reportits report @settingsits settings, in the prompt @branchthe repo, at the feature's branch @about/<any of these>the same, of the feature the turn is about @about/@folderthat feature's whole folder - A step's name hands one document, what that step produced, from each session of the turn. It hands nothing else of the turn: not what it was handed, its prompt or how it ran.
- A count is oldest first, and there may be none. A
?after a name marks one there may not be. @historyis a line a turn with how it ended, what it set and what each session took and cost, then the turns of each step, how many times the code has been changed and the turns of each lap, as the report counts them, the time, the cost and the tokens, made when the turn starts. The time is from the first turn's start to the last turn's end, split into the turns running and the waiting between them; where an earlier turn did not record when it began and ended, it is the session times added up, and says so. Reverted turns are left out.- What a step is handed of its own earlier turns is said to be its own, an earlier turn of this step, with the feature that turn was about when it was another: a step that looks at a different feature each turn is told which of its reports was of which.
- Everything of the feature a turn is about is under
/in/about/<feature>/, so it cannot be taken for a turn of this feature's, which is under/in/<turn>/. @about/@folderis everything assay keeps of the feature the turn is about, as it is on disk, at/in/about/<feature>/folder/: every turn'sin/andby/, prompts, transcripts and raw event streams included. It is for looking back over a whole run, and is large: megabytes, which cost nothing until a session reads them. A step is never handed its own feature's folder.
-
@about/before any of those but@branchis the same thing of the feature the turn is about, in place of this one:@about/spec,@about/@history,@about/@report,@about/@request,@about/@settings. A turn about no feature skips one marked?or counted, and is refused one that is not.@about/@request?and the like may be marked?, since that feature may have no request, or the turn be about none; they are never counted. -
outnames@branch, for the session's commits to be kept,@settings, for its sessions to change the feature's settings, and files beyondout.md. -
nextis a step,@doneor@person; a table of choices,name = { to, when }, for agents that choose; orpassandfailfor a command, each of which leads to the same. A step with nonextends the flow, as@donedoes.@personstops the flow for you, with the turn's output to read, and you name the step that follows. -
A step also takes
timeout, and a step of agentsinternet,wrap_upandquiet_timeout. A session's wall clock is its agent'stimeout, else the step's, else[defaults]. -
With
wrap_up, a session still going that long before its timeout has its turn cancelled, and is sent a prompt in the same session telling it to stop investigating and write what it has; that turn gets the remaining time.quiet_timeoutis below.
The flow is read from the working tree every time a step is turned, committed or not, so a flow can be adjusted, tried and adjusted again. Every step is checked when the flow is read, and an unknown key, an in naming no step, a next leading nowhere, a ? or a count on @branch, @request, @history, @report or @settings, a count on any of them after @about/, @about/@branch, @settings in a project that declares none, an agent's at naming a setting or a word the project does not declare, a count that is not a number above 0 or all, agents and a command together, a key a command does not take, or @branch in the out of a step with more than one session is an error naming the file and the key. Choosing between several builders is not built.
model, effort and context are checked against what the harness itself says it accepts (below) before a container starts. That matters more than it looks: Claude treats an unknown effort as a warning and falls back to the default, so a typo would otherwise give a session you believed was pinned and wasn't.
Turning a step
assay new <name> [<description>] [--start <step>] [--base <rev> | --follow] [--about <feature>] [--set <name>=<word>]... [-m <request> | -F <file>]
assay turn <feature> [<step>] [--about <feature>] [-m <message> | -F <file>]
assay new makes a feature: a folder, .assay-state/features/<NNN>-<name>/, numbered one past the highest number any feature or assay/* branch of the project has, so two features of one name never clash. Every command takes a feature by its name, 001-notes, or its number alone, 1. Its branch is assay/<feature>. Each turn adds a folder to it, NNN-<step>, numbered in the order turns happen.
The folder holds feature.json, what is true of the whole feature; report.md, its report, once its flow has ended or assay report has made it; and request.md when you say what you want, with -m or with -F and a file, which a step handed @request needs. -m and -F are what you say wherever they are given: to a feature as it is made, its request, which stands for the whole of it; to a turn, a message for that turn.
| Key | Says |
|---|---|
description |
what it is for, in a line |
start |
the step it begins at |
base |
the commit it starts from |
follow |
every turn starts from HEAD |
from |
the file its request was |
about |
the feature it is about |
settings |
what it was set to |
-
startstands in for the config'sstartfor this feature. -
baseis the commit--basenames, or else theHEADits first turn found, which needs a working tree with nothing uncommitted outside.assay/. Every later turn starts from the feature's branch, or from the base until there is one. -
--followis for a feature that makes no branch, such as one that only reads: every turn starts fromHEADas it then is, with no check of the working tree. -
fromis kept when the request's file is in another feature's folder: the turn that wrote it. -
aboutis the feature--aboutnames, by its name or number. With no--baseand no--follow, every turn starts from that feature's branch as it then is, so what is looked over is that feature's work and not the main line; when that feature has no branch, the base is found as for any other. A step that lists@about/specis handedspec's output from that feature, its latest finished turn as within a feature, as/in/about/<feature>/<turn>/<session>/out.md. So a feature that looks over another's work can be handed what that work was meant to be. -
settingsis each--set <name>=<word>, which must be a setting the project declares and one of its words, or nothing is made. -
With no step named, assay turns the one the feature's last turn of a step leads to: its
next, or where the choice it made goes. A turn that asked you leads to its own step again, once answered with-m. A feature with no turns begins at the config'sstart, and without one needs the step named. A turn that failed, whose sessions chose differently, or that led to@person, and the end of the flow, each need the step named, and the refusal says where the feature stands and which file to read. -
-m, or-Fwith a file, is what you say as you turn the step: it is kept in the turn'sin/asmessage.md, and handed to its sessions with the rest. A turn that asked you is refused without it. -
--aboutmakes this one turn about another feature, by its name or number, in place of the onefeature.jsonnames: it is what@about/reads, and where the sessions start, as foraboutabove. It is kept in the turn'sstep.jsonand not infeature.json, so one feature can look at each of several in turn. -
A turn holds a lock on the feature's folder, so a second turn of the feature is refused while one runs. A turn whose
step.jsonstill says running when the lock is free was ended by something other than assay, and is marked failed. -
Before a turn's folder is made, its inputs are found, the agents that run at the feature's settings picked, which is refused when there are none, their models checked, the image built, their harnesses installed and the workspace warmed, so a turn that cannot start leaves nothing.
-
A step of agents runs its sessions together, or at most
[defaults] parallelat a time when that is set. They are named for their agent's role, or for its harness when it has none, and numbered across the step, so two agents on agy areagy-1andagy-2, and one whose role isbreakerisbreaker-1. -
assay prints the turn's line, as
assay statusshows it (below), as warnings its sessions' flags and what they wrote to/outunasked, kept or deleted, and where the feature stands, and exits 1 if the turn failed. When the step that follows cannot be turned, because a step it is handed has no finished turn, that says so.
The COST column is a common measure of how much work a session did, at list price, and not a bill: each harness reports cost on its own basis or not at all, so a session's cost is worked out from its tokens at its model's price, whatever its harness reported, as $0.3314. That price is the project's [price] for the model where it has one, or else the one kept on this machine, which the turn reads once as it starts and never fetches. Where the model has neither the cost is the harness's own figure, which Claude and Grok report and agy does not, marked *, as $0.0924*, and so is every total that includes one, here, in @history and in the report, each of which says once what the mark means; with no figure either it is -. The TOKENS column is every harness's, counted alike, as 54k in, 26k out, 148k cached: input not read from the cache, output with thinking, and cache reads and writes together.
Ctrl-C ends every session with what it left collected, and the turn is failed with each session's error saying it was interrupted. A session cut short is not resumed: its step is turned again, which assay retry does.
Command steps
+++
command = "go build ./... && go test ./..."
in = ["@branch"]
[next]
pass = "review"
fail = "build"
+++
A step with command in place of agents runs it as one session, command-1, in a fresh container with no network and no credentials, as the unprivileged user, from the warm workspace when the project prepares one and else from the project's image.
- With
@branchinin, it runs in the project's folder in a clone at the feature's branch, or at its base before there is one. Nothing it does in the clone is kept. Without@branch, it runs in an empty/work. /inholds what the step is handed, as an agent's does. A command has no/out.- Its
out.mdis everything it printed, which is also shown as it runs. Exit 0 ispass, anything elsefail, and[next]says where each leads; with a singlenext, both go there. - Running out of time, the step's
timeoutor else[defaults], or being interrupted fails the turn, as a failed session does. - It takes
command,in,nextandtimeout;out,internet,wrap_upandquiet_timeoutare errors.
What a turn is handed
A turn is always handed what the step before it produced, and whatever you have said since. In order:
- the outputs of the last turn that did not fail, whatever step it was: each session's
out.md, and itsask.mdwhen that turn asked you. Failed turns are passed over. - each message of yours since that turn, oldest first: what you said to any failed turn after it, and what you say to this one.
- what the step file's
innames:@request,@branch,@history,@report,@settingsand the latest finished output of each step named, of this feature, or after@about/, of the one the turn is about. A step named there whose turn is the one already handed under 1 is handed once.
So a session leaves one document, out.md, and whoever is next is handed it: an arbitrator's decision reaches the builder it sends the work back to, and a failed command's output, everything it printed, reaches the step its fail leads to, with neither named in the receiver's in. A step turned again after it asked you is handed its own output and question and your answer by the same rule. in is only for standing documents from further back, such as the design.
A feature's settings
A feature's settings are worked out each time and not kept: each setting the config declares has its first word, then what the feature was made with, then what each turn set, in the order they happened, counting only the turns that did not fail and are not reverted. So reverting a turn undoes what it set. A setting or a word the config does not declare counts for nothing.
- A step with
@settingsin itsinis told them in the prompt, each with the words it may take, and with@about/@settings, those of the feature the turn is about. - A step with
@settingsin itsoutmay change them: its sessions may leave/out/settings, a line for each setting changed,name = word. Without the file, or with nothing in it, nothing changes. - Which of a step's agents run is decided by their
atfrom the settings as the turn starts. Those that do not run are left out, and those that do are named and numbered among themselves. A step none of whose agents would run is refused, with the settings it was refused at.
What a session is given
Each agent's container gets two folders besides its workspace, made by docker cp and not mounted, so nothing on the host is writable from inside:
/in, owned by root and readable only, which the unprivileged agent cannot change: the turn's inbox, each file under the turn it is from, as that turn's folder is named: a session's files as/in/004-review/grok-1/out.md, with a file from a step'soutbeside it, what you said as you turned this step as/in/message.md, and what you said to an earlier turn of it that failed as/in/<turn>/message.md;request.md, when the step has@request;history.md, when it has@history; andreport.md, when it has@report. What comes from the feature the turn is about is under that feature's name:/in/001-notes/005-arbitrate/claude-1/out.md,/in/001-notes/history.md,/in/001-notes/report.mdand/in/001-notes/request.md./out, the agent's own, empty. When the session ends, finished or not, assay copies it out and takesout.md,tell.md,ask.md,choice,settingswhen the step has@settingsinout, and the files the step lists inout, if each is a plain file. Any other plain file it was not asked for is kept inby/<session>/left/and named as the session'sleftinstep.json; what is not a plain file, a link or a folder, is deleted and named as itsdropped. Either is a warning as the turn ends and in the report. Anask.mdor antell.mdwith nothing but whitespace in it is nothing asked and nothing told, and is not taken./work, where it starts: the clone when the step has@branch, else an empty folder.
The prompt is the step's text, with the part of it that is the agent's own, then the project's standing rules when it has rules.md, then two sections assay makes from the step file and the inbox, what the session is given and what it hands back: what is in /in, each file with what it is, telling apart what the step before produced, what a step named in in produced and what you said; what to write to /out, with out.md and who is handed it next, the step when there is one way on and else whoever is next, tell.md, to tell you something you should know and need not answer, such as what it assumed where it was not told, with the work carrying on, and ask.md, to ask you something, which stops the work until you answer, only when the agent cannot go on without you; that you do not read out.md as it passes, so nothing meant for you goes in it, nor anything of these files, unless the step is the flow's last or leads to you; for a step with @settings in in, each of the feature's settings, its word and the words it may take, and with @about/@settings the same of the feature the turn is about; for a step with @settings in out, settings, to be written only to change one, with each setting's words and its word as it stands; the choices with when to take each, for a step that chooses; for a step with @branch in out, to commit source only, never build output, binaries or secrets, and to see that the repo's ignore rules cover what the build makes; for a step with @branch in in, once the feature's branch has moved from its base, a line giving the base commit and what the branch changes against it, and when this step has run on the feature before, another giving the commit it last ran at and what has changed since, from git: The branch started at 4f1c2aa. Against that it changes 5 files, adding 312 lines and removing 4: git diff 4f1c2aa...HEAD shows it. No session writes JSON.
A session whose turn ends with neither ask.md nor out.md in /out, nor choice at a step that chooses, is sent one more prompt in the same session naming what is missing, since an agent will now and then give its answer as its last message and write nothing; nudged in its meta.json and in step.json says so, and it is a warning as the turn ends and in the report. How a session ended is worked out from what it left: one that errored, timed out or was interrupted failed; else ask.md means it asked you, whatever else it left; else out.md means it finished, and a step that chooses must also have choice holding one of its choices, and each line of a settings it left must name a setting the config declares and one of its words. Anything else failed, with what was wrong in step.json. Any failed session fails the turn; else any that asked, sessions that chose differently, sessions that set one setting differently, or a way on that leads to @person, leave it waiting for you; else it is done, and leads where its step's next or its choice says, and what its sessions set is what the turn set.
Reverting
assay revert <feature> [<turn>] [-y]
Goes back on a feature's last turn, or with a turn named, by its folder's name (006-build) or its number, on that turn and every turn after it: to run a step again on the same inputs with a changed prompt or model, or to undo a run of steps that went the wrong way.
- A reverted turn stays where it is, and its
step.jsonhas the statusreverted. Turn numbers are not reused: the next turn takes the next number. - A reverted turn is passed over as a failed one is, and more: it is never the step before, never a step's latest finished turn, and what you said to it is not handed on. Where the feature stands and what follows are worked out as if it were not there, and
@historyleaves it out, with its time, cost and count.assay statusshows it, markedreverted, and--jsongives it that status. - When a reverted turn moved the branch,
assay/<feature>goes back to where it was before the earliest of them started, which may be the feature's base with no commits of its own. Each session's bundle is still in its folder. It is refused, with nothing changed, while the branch is checked out, or when it is not where the last turn that moved it left it, because something other than assay has moved it. - It takes the feature's lock, so it is refused while a turn runs. A turn that does not exist or is already reverted is refused.
- It shows the turns it will set aside and where the branch goes, and asks.
-yskips the question; with no terminal and no-yit only says what it would do. Afterwards it prints where the feature stands, asassay statusdoes.
Retrying
assay retry <feature> [-m <message> | -F <file>] [-y]
Turns a feature's last turn again: the turn is set aside as reverting it would, the branch going back if it moved it, and its step is turned with what you said to it, about the feature it was about, so the new turn starts where the old one did, on the same inputs. It is for a turn you interrupted or that failed, and for running a step again with a changed prompt or model.
-mor-Fis what you say this time, in place of what you said to the turn set aside.- A turn that failed is set aside without a question. One that did not is asked about first, since its work goes with it;
-yskips the question, and with no terminal and no-yit only says what it would do. - Turning the step again with
assay turnkeeps the failed turn in the feature's history, and the new turn is handed what you said to it as well as what you say now.
The turn's folder
| Path | Holds |
|---|---|
step.json |
the turn's account of itself |
in/ |
/in as handed over |
by/<session>/ |
a session: what it was sent and how it went |
by/<session>/out/ |
what it handed back |
in/ is always kept, and is exactly what a session finds in /in. What was made for this turn is a file there: message.md, what you said as you turned it, history.md, report.md, and request.md, a copy, since the request may change, and the history and request of the feature the turn is about under its name. What comes from another turn is a link to it, relative, so the feature folder can be moved: a finished turn's files do not change. A session is given in/ as /in, each link as the file it leads to. by/<session>/ is everything of one session. Its out/ is what it handed back, and left/, when there is one, what it wrote to /out unasked; beside that it has prompt.md, the prompt as sent, the record of what it was asked, since the flow it was made from may have changed since; transcript.log, what your terminal showed; events.jsonl, the agent's raw stream, thinking included; and meta.json, how it ran: the argv, model, CLI version, image and its digest, the harness's volume, account and method, the internet and allowed hosts, exit, duration, cost, tokens and the workspace. With @branch in out it also has branch.bundle, the session's commits, and changes.txt, what they changed.
A session's out/ is taken, the rest of its folder is complete and its entry is added to step.json, still running, as that session ends, in the order the step lists them; the turn's own outcome and where the branch moved are settled when all have ended. step.json is written when the turn starts, as each session ends and when the turn ends:
| Key | Says |
|---|---|
status |
running, done, waiting, failed or reverted |
started, ended |
when the turn began and finished: UTC, to the second |
about |
the feature it was about |
from |
the commit the clone started at |
in, out |
files by their names in the feature folder |
sessions |
each session's run and ending |
prices |
the kept prices it was costed from |
commit |
where the branch moved |
outcome, next |
how it ended, what follows |
set |
the settings it changed |
why |
why it waits or failed |
An agent's session has its name, harness, model, effort, CLI version, when it started and ended, seconds, cost_usd, as COST above, cost_reported, the harness's own figure when it gave one, cost_unpriced, true when cost_usd is that figure because the model has no price kept or in the project, and tokens (input, output, cache read, cache write and thinking, which is part of output; left out when the harness gave none), its commit and how many commits it made, its flags, what it set, and its outcome: @next when it finished, @ask when it asked you, or the choice it made; or in place of an outcome, the error that failed it. A command's has its name, the command, when it started and ended, seconds, the commit it ran on, its exit and its outcome, pass or fail. A turn waiting because a session asked has the outcome @ask; one waiting because its way on led to you has the next @person.
Where a feature stands
assay status [<feature>] [--json]
With a feature, its settings, as name=word, when the project declares any, then its turns in order, a line for each session: the turn's folder and how it ended (reverted for one set aside) on the first, then the session's name, model, time, cost and tokens, and after a turn of several sessions a line with how long they took in all; then a line of totals, the sessions' time, cost and tokens added up, reverted turns left out; then where it stands, worked out as if reverted turns were not there. Without one, every feature of the project in the order they were made, a line each, with its description, its last turn and where it stands. What a session told you, its tell.md, is named under the table, as it is when its turn ends.
Where a feature stands is one of: new, with the step it starts at; running; ready, with the step that follows and assay turn <feature>; blocked, when that step cannot be turned and why; waiting, with what to read and how to carry on, -m for a question and a named step otherwise; failed, with why; or finished, with the branch to merge, every flag its sessions' commits got, and its report, report.md, to read. The report after assay turn comes from the same code: that turn's line, then where the feature stands. Status takes the feature's lock when it is free, so a turn left marked running by an assay that stopped is marked failed, as a turn would; while a turn runs it reads the feature as it stands.
--json prints the same as one JSON document, the shape a tool reads in place of the files: a feature is feature, what its feature.json holds but with settings the feature's settings as they stand, folder, branch, commit, turns and stands. A turn is turn (its folder's name), step, status (reverted once set aside), said (your message, when the turn has one), outcome, next, why, started, ended, commit, output, set, sessions and prices, the last two as in step.json. stands is state, and as they apply step, read, why, command, merge and flags. Every file named is a name in the feature's folder. With no feature it is project and features, a list of the same.
Prices
assay price # the prices kept: each model's rates and what it matched, the models offered with none, and what the project's [price] stands in for
assay price --refresh # fetch them again from the public list, then show them
Sessions are costed at prices kept on this machine, for every model the harnesses offer, so a model a step starts to use is priced without anything added to the project. --refresh fetches a public list of prices, OpenRouter's, and works out a price for every model each harness offered the account when last asked: the project's account inside a project, else default. It asks no harness anything and starts nothing: it reads only the offers kept, so a harness never asked has no models priced until assay harness --refresh asks it. It is the one thing about prices that asks the network.
A model is looked for by what the harness said it resolves to, so Claude Code's sonnet is found as claude-sonnet-5-5, or else by its id. The list's id is matched after its provider, with . and - alike, so claude-haiku-5-5 is anthropic/claude-haiku-5.5. Each price is kept under the model's id, the name a step gives and a session records, so a model two harnesses offer under one id has one price. written is kept only where the list's rate for writing to the cache is above the input rate.
A set of prices is a file, ~/.local/state/assay/prices/<hash>.json, named for a hash of its models and their rates alone, so the same prices always have the same name. It holds the list it came from, when it was first fetched, and each model's rates with the list's id it matched. prices/current names the current set and when the list was last checked. A refresh that finds the same prices writes no set and moves only that date; one that finds others makes their set current, and the old sets stay. Each turn of agents records the set it was costed from as prices in its step.json, so a cost already recorded does not move when prices do and can be traced to the rates it came from.
assay price shows the current set's hash, when it was first fetched and when the list was last checked, then each model with its rates in dollars a million tokens and the list's id it matched, then by harness the models offered that have no price kept, which the list did not have or which were offered after the last refresh, and inside a project, the models its [price] stands in for. With nothing kept it says so. --refresh first says whether the prices changed, and how many models' rates differ, or are as before.
The report
assay report <feature>
A feature's report is made by assay from its folder and the repo, with no agent: what you read to judge a merge, and what says how the flow did. It says only what assay recorded, never what an agent said of itself. assay report prints it and writes it as report.md at the top of the feature's folder, and a turn that ends the flow writes it too. A step handed @report gets one made as its turn starts, never the stored file. Every file it names is a name in the feature's folder.
A lap is a change to the code and what was said of it before the next: it begins at a turn that moved the branch and runs to the turn before the next that did. The turns before the first are a group of their own, before any code. Reverted turns are in no lap.
It opens with the whole in a few lines: the time from the first turn's start to the last turn's end, split into the turns running and the waiting between them; the sessions' time, cost and tokens added up; and how many turns there were and how often the code was changed. Then, with the figures in tables that line up as plain text:
- What stands out, first, since it is what to look at. What counts is below.
- What you were told: each
tell.mda session left, in its own words, which assay has not checked. Left out when there is none. - What is to be merged: the branch, where it is, how many commits it has on the feature's base and what they change, every flag its sessions' commits got, and each command step that passed on its last commit, with its command. A feature with no branch says so and no more.
- How it got here: a row a turn under its lap, with how it ended and the
out.mdof each of its sessions to read; then what you said and what you were asked, and the turns reverted. - What it took: time, cost and tokens by turn, by step, by harness and model, and by lap, with a sentence on what the costs are and, where one is marked
*, what that means, and one naming the set of kept prices its turns were costed from, with when it was first fetched, or each set when they span more than one. By turn there is a row for each turn in order, and beneath a turn of several sessions a row for each of them, which carry its cost and tokens, so what was dear is plain at a glance and the column adds up; then a row of totals. By turn, by step and by lap the time is how long the turns ran, so sessions that ran together count once; a session's row, and the table by harness and model, has each session's own. Then, for each lap, with each lap's share of the time and the cost. - What each session did: for each agent's session, its recorded stream replayed through its harness's driver into the updates it showed as it ran: how many tool calls it made, of which kinds, how many failed, and the most frequent ways they failed, each with a count. A call failed when its harness said so, or when the command it ran did not exit 0, which Grok and agy report as completed. A command's session has no stream, and one whose stream cannot be read has a line saying so.
- What stands out is, as plain facts: a session that took three times as long, or cost three times as much, as another of the same turn; a step turned more than twice; a turn that failed; a turn whose sessions chose or set differently; a turn that sent the work back to a step already turned in its lap; a session that wrote to
/outwhat it was not asked for, or was asked again for what it hands back. Or that nothing does. A failed tool call stands out only when the same thing failed more than once, in one session or across several, or when a session lacked what it reached for, a command not found: a command that exits non-zero once is as often a test meant to fail, and is counted in the table of what each session did and no more.
It leaves out what ordinary code cannot have: how many of a reviewer's points were upheld, which needs the arbitration read, and use of each account's limits.
The branch
A feature has one branch, assay/<feature>, which is what you merge. A step with @branch in its out starts its clone from it, or from the feature's base before it exists, and the session's commits are bundled, whether or not it finished, and fetched into assay/<feature>, which the fetch creates or moves on. So a build turned again carries on from what the last one left. The branch moves back only when you revert turns that moved it, and the fetch refuses while it is checked out, which fails the session. A step with @branch in in alone gets the same clone, and nothing done in it is kept. With several sessions, something has to choose whose commits the branch moves to, so a step with more than one session and @branch in its out is refused.
Flags
A session of a step with @branch in its out has its commits looked at, from where its clone started to what it returned, and is flagged when they add a file git judges binary, add one over 1 MiB, or change anything under the project's .assay/. Merging that last would change the flow. The flags are in the session's flags in step.json and under the turn's table, for you to look at; they fail nothing.
The workspace
Each session works on a clone of the git repo the project is in. The repo's git folder is mounted read-only at /repo.git, and nothing else of the repo is: the working tree, with whatever is ignored or left out below, is not in the container. Inside the container a clone shares its objects and checks out exactly the project's folder and what [repo] include lists, files or folders, relative to the project and with globs allowed (../deps/lua*), plus every .gitattributes and .gitignore: without those, LFS files would stay pointers and ignored build output would be committed. A project at the repo's top gets the whole repo. Either way the project's .assay/ is left out, so no session has the flow or the features in its checkout, and what a session writes outside the checkout is not committed. LFS files come from the repo's own store when the image has git-lfs, and the clone starts a branch at the turn's start. Nothing is fetched and nothing on the host is written. The session works in the project's folder in the clone, at /work/<path in the repo>.
Checking out less is for size and focus, not secrecy: the clone shares every object the repo has, so anything ever committed can be read with git show, the flow at HEAD included. Files never committed are never in a session, which is why a feature's first turn wants nothing uncommitted outside .assay/.
When an agent's session ends, finished, timed out or cut short, anything left uncommitted is committed as "Work left uncommitted when the session ended", and with @branch in out its commits come back as above, with your working tree and current branch untouched.
Warm workspaces
With [repo] prepare, sessions start warm. Before a turn's first session, assay makes the clone at the feature's base in a container from the project's image, with no network, no credentials and no harness, runs prepare in the project's folder, and saves the result as assay/warm/<folder>:<hash>, named by the image, the commit, what is checked out and the command. Every session and command of the feature starts from it, checking out on top of it only what its branch changed: the clone is there and the build is done, so a session's own build is incremental from it, and starting one copies nothing, since a container's files are copy-on-write over its image. A session's own build runs again on top of it, so prepare must be safe to run twice, as builds are. An image keeps file times only to the second, so a build that keys on finer ones sees its outputs as changed once. A failing prepare stops the turn before any session starts. assay build warms HEAD, or --base <rev>, ahead of a turn, and assay clean offers to remove the warm workspaces not at HEAD.
How a session runs
A fresh container for each agent's session, so nothing carries over:
docker run -d … sleep infinityon the project's image, or its warm workspace, with the repo's git folder and the volume of the session's harness mounted read-only- with internet off, fence the network (below)
- sign in by the harness's chosen method (below): its files copied in, never mounted, so agent writes can't touch
~Beside it go the settings the CLI's installer left for it, copied from its volume: how it was installed, and that it does not update itself. - make the clone, unless the warm workspace has it, and start the session's branch; hand over
/inand make/out docker execthe agent headless in the project's folder in the clone, with a timeout- bring its commits and
/outback, also on timeout, since what a stuck session left behind is the interesting part docker rm -fthe container
A command step's container is the same but for the second, third and sixth: it has no harness, no network at all and no sign-in, and what it printed is kept as it runs. A finished turn leaves nothing in docker ps -a: a container exists only while its session runs.
While any session is going, assay holds a logind sleep inhibitor, so the machine does not suspend under a long turn. Without a system bus or logind it warns and carries on.
Watching a session
Sessions render live to your terminal as they happen: assistant text, → tool call, ← result, · outcome. With more than one session the lines are prefixed claude-1, grok-1 and so on, so parallel sessions stay readable.
In a terminal, each running session also gets a status line at the bottom, redrawn in place and never written to the transcript: working while lines are rendering, thinking while nothing renders but bytes still arrive from the agent or over the container's network (every CLI talks to its API while it reasons, printing or not), and quiet when neither has for ten seconds, with time since the last output.
Every session is spoken to in the shapes of the Agent Client Protocol (ACP), one process per session, in harness/: Grok (grok agent stdio) and agy (agy acp) speak it themselves, and Claude Code is driven through an adapter in assay over its own two-way stream-json mode (--input-format stream-json), with each prompt a line on its stdin and a cancel an interrupt request. Messages, tool calls with their input and output, and how each turn ended come back as ACP updates, so the rendering is the same for every harness. harness/testdata/ holds a recorded session from each harness, three prompts with the second cancelled part way, and what assay shows of it, checked by go test ./harness, which also checks that replaying a recording, as the report does, gives the updates the session showed; the -background ones are sessions whose turn waits on a command the agent put in the background, Claude's a resumed one. After bumping a CLI version, record a short session over that harness's .jsonl and run with -update: the diff in its .txt shows what the new version changed.
When an agent's turn ends
A prompt's turn ends when the agent's turn does and nothing it put in the background still runs. Claude, of its own accord, and Grok can put a long command in the background and end their turn meaning to carry on when it finishes, which each does in a turn it starts itself; assay waits for those and adds them to the prompt's turn, cost and tokens included. Claude reports its background tasks in its stream, and Grok in xAI's own notifications. A turn that leaves a task running, a server say, lasts until the task ends or the session times out, as does one whose task ends without the agent starting a turn after it, since nothing then says the turn is over. The streams do not say whether a task is meant to end, so a step that knows sets quiet_timeout: once the agent has replied to the prompt, its turn ends after that long with nothing at all from the agent, and anything it writes, a turn of its own included, starts the clock again. It ends as a finished turn, not a timeout, so the session is collected as usual, and the transcript says it was ended and names the background tasks still running, if any. Unset, only the timeout bounds the wait. Wrap-up ends a turn that waits only on background tasks at once and leaves them running. agy keeps a command it puts in the background within its turn, so its turn ends when the command does. When the last turn ends assay closes the agent's input; a process still running 30 seconds later is killed, and the transcript says so.
Internet
By default an agent's session has no internet. The CLI still needs its API, so each harness's driver in harness/ has a short host allowlist (hosts in config adds to it). Each host is resolved once on your machine and pinned into the container's /etc/hosts; iptables then rejects everything but HTTPS to those addresses, DNS included. The container gets NET_ADMIN to set this up, but the agent runs unprivileged and cannot change the rules. Rejected rather than dropped, so a blocked pip install fails at once instead of eating the timeout.
It is a fence, not a sandbox: a pinned address that fronts other sites (a CDN) is reachable for all of them. meta.json records internet and the allowed hosts.
Some harnesses also have web tools that run on the vendor's side, so the fence never sees them: the container only talks to the harness's own API. With internet off, assay turns those off too: --disable-web-search for Grok, --disallowedTools WebSearch,WebFetch for Claude. agy has no such flag, so assay stages a global hook in ~/.gemini/config/ that denies search_web and read_url_content; the agent sees the call refused and carries on.
With internet = true the network is open. Either way the credential copied in is a live token, so the agent can reach the account it belongs to. Sign in by key (assay account <harness> key) to use a scoped API key instead.
With no internet nothing can be installed, so the project's tools must be in the image: put them in its Dockerfile.
The image
A project has one image, assay/project/<folder>, built in two parts, the one that changes least first:
- The toolchain:
.assay/Dockerfile, or a default of Debian trixie-slim with a GNU userland, git, Python and Go but no C compiler. It must be Debian or Ubuntu based, since assay's part uses apt and agy needs glibc, and it installs from the network: it is built with nothing sent as context, so it cannotCOPYfrom the project, and the project's files never travel to Docker. - assay's part: curl and certificates for the installers, iptables for the fence, and the
agentuser, whose home is the image's working directory.
The image is tagged by a hash of everything it is built from, so an image that exists is current and a turn finds it in a tenth of a second. A change to the toolchain rebuilds it, which for a real toolchain takes minutes. --force rebuilds regardless, and assay build --print writes the Dockerfile assay builds from. A harness command, a sign-in or assay harness <name>, uses the project's image inside a project, and outside any uses assay/base, the default toolchain and assay's part.
No harness is in the image. Each harness at a version is installed once on the machine, into a Docker volume of its own, assay-harness-<harness>-<version>, which every project shares. A session's container mounts only its own harness's volume, read-only, at /opt/assay/<harness>; a command step's and a warm workspace's mount none. A new version of one harness then rebuilds nothing, and a harness that cannot be installed stops only the turns that use it. The volume is filled the first time a turn, a sign-in or assay build needs it: assay runs the harness's installer as agent in a container from the image at hand, with the volume as its home, so all it writes lands there. If the install fails or is interrupted the volume is removed, so a volume that exists is whole, and two assays that need the same one take turns. The CLI's own state and the sign-in stay in the agent's home, /home/agent.
The CLI is installed by its official installer at one version (Claude's and Grok's verify checksums; agy's is a versioned tarball from Google's storage over TLS): the one [harness.<name>] pins, or else the one assay keeps for the whole machine in ~/.local/state/assay/harness/<harness>/version. The kept version is learned from your own CLI the first time the harness is needed, so that a login copied from your machine is read by the CLI that wrote it; after that a turn asks neither your CLI nor the network, so a CLI that updates itself, or is not installed, changes no session. assay harness <name> --update moves the kept version to your CLI's, and its volume is filled on the next turn; a pin is never touched, so pin a version to hold a comparison still. agy's download path needs a build id that only its release manifest gives, and only for the latest release, so learning or moving agy's version fails while your agy is behind the latest, and one already kept or pinned runs on. Nothing but the sign-in comes from the host: in particular not your ~/.grok/config.toml, which would otherwise supply the model, the reasoning effort, your plugins and a statusline the container has no script for.
Cleaning up
| Kind | Name | Belongs to |
|---|---|---|
| base | assay/base |
the machine |
| harness | assay-harness-<harness>-<version> |
the machine |
| project | assay/project/<folder> |
a project |
| warm | assay/warm/<folder> |
a project |
A harness is a volume and the rest are images. <folder> is the project folder's name, lowercased, so two projects of one name share an image name and their tags tell them apart. assay tells what is whose by labels, not names: assay.kind, assay.project with the absolute path of the project's folder, and assay.harness and assay.version on a harness's volume. An image's labels are the last part of what it is built from, so the project's path is in its tag and every layer under it is shared. A warm workspace keeps the labels of the image it was committed from, the project's path among them.
assay clean shows everything assay has made, grouped by whose it is: assay's own, each project's under its path, leftovers, then the assay/* branches in each repo. Each row has its kind, size, age, whether it goes and why. It asks before removing anything, -y answers for it, and without a terminal it only says what would go.
| Command | Removes |
|---|---|
assay clean |
what is stale |
assay clean project [path] |
everything of a project |
assay clean harness [name] |
harnesses' volumes |
assay clean all |
everything |
Stale, from anywhere, is a leftover, an image an older assay made: one named assay-*, or a harness's own image, assay/harness/<harness>; anything whose project folder is gone; an older build of assay/base; and a harness's volume at a version other than the one kept on this machine. Inside a project it is also an older build of the project's image, a warm workspace not at HEAD, and a branch merged into HEAD, and a harness's volume at the version the project pins is kept when a step of its flow names that harness. Another project's things are kept while its folder is there, and a harness's volume at the kept version goes only with clean harness or clean all.
A feature's branch is what you merge, so no form of clean removes one that is not merged into HEAD, and the listing says so. clean project removes the project's image and warm workspaces, current or not, and its merged branches. Without a path it is the project the working directory is in. With one it works from anywhere, on a project whose folder is gone too, since the labels carry the path; its branches are found only while its .assay/config.toml is there to say which repo it is in. Two projects in one repo share its branches. clean harness removes every volume of each harness, or of one harness's. clean all removes every image and volume, and the merged branches in the repo of this project and of each project an image names.
Signing in
How each harness signs in is yours, not the project's: it lives in ~/.config/assay/config.toml, and assay account writes it. An account is a named set of sign-ins, one per harness, so work and personal can sit side by side.
| Method | Signs in with | Draws on |
|---|---|---|
key |
an API key | API credit |
token |
a long-lived token, such as claude setup-token makes |
subscription |
login |
the harness's own sign-in, run by assay | subscription |
assay account # every account, and how each harness signs in, or that it is not set
assay account claude token # the default account; asks for the token
assay account grok login # signs in, unless already signed in (--again to redo)
assay account work claude key --command "pass show work/anthropic"
assay account work grok remove # take grok out of work
assay --account work turn notes # or account = "work" in .assay/config.toml
The words are an account, a harness and a sign-in method (or remove, to take the harness out of the account); with no account, the default one. A session signs in with the account --account names, else the project's account, else default. Every account, default included, signs a harness in only by the method it names for it. A harness the account says nothing for is an error before anything starts: it names the harness and the account, the command to run for each method, and which methods look ready on this machine. assay account shows the same for every harness.
loginruns the harness's own sign-in interactively in a container from the project's image, orassay/baseoutside one, with the harness's volume, so it needs nothing installed but Docker and leaves any desktop CLI alone. Grok signs in by device code, which suits a container. What it leaves is assay's own login, kept in~/.local/state/assay/accounts/<account>/<harness>/. A session starts with a copy of it, and when the session ends, however it ended, the copy it may have refreshed is brought back over the kept one, so a vendor that replaces the refresh token on each use does not leave the kept login unable to sign in. A file missing or empty in the container never replaces a kept one.tokenandkeyask for the value without showing it and keep it in the same folder, readable only by you, or with--commandfetch it when a session starts and keep nothing, which suits a password manager. In the default account, the vendor's own variable (ANTHROPIC_API_KEY,XAI_API_KEY) also supplies the value when none is kept, but only oncekeyortokenis set for the harness.- A token or key exists only inside the session's container, as the variable the CLI expects.
meta.jsonrecords the account, the method and the variable's name, never its value.
What a harness offers
assay harness # every harness: version and where it comes from, whether the project uses it, whether it is installed
assay harness grok # its models, efforts, contexts, modes and settings
assay harness grok --refresh # ask it again; with no name, ask them all
assay harness grok --update # move its kept version to the CLI's on this machine; with no name, every harness with a CLI here
assay asks a harness what it accepts by starting it in a container with its volume, signed in, without sending a prompt: Claude through its control protocol's initialize, which lists each model with the efforts it takes, and an ACP harness through the options its new session lists. The answer is kept per version and per account, since an account's plan decides what it is offered, in ~/.local/state/assay/accounts/<account>/<harness>/offer.json, so it is asked once per version, when first needed. Every turn checks its agents' model, effort and context against it before a container starts. context is the context window in tokens, for a harness that offers a choice: Grok's models run with 256000 or 500000, set per agent as context = 500000, and Claude's offer no choice.
assay harness shows each harness: what it is, its version and where that comes from, pinned by the project or kept, with the version of the CLI on this machine when it differs from the kept one, whether a step of the project's flow names it, and whether its volume at that version is filled. assay account shows how it signs in. claude, grok and agy are verified, wrap-up included. Codex is not driven yet: it needs an adapter over its app-server protocol.
agy is Antigravity CLI, which replaced Gemini CLI for personal Google accounts in June 2026. It is a native binary, installed from a versioned tarball; its version, pinned or kept, includes the build id from the release manifest (https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/linux_amd64.json), because the download path needs it. Before it will run it checks eligibility by fetching your Google profile picture, so its allowlist includes lh3.googleusercontent.com. It keeps its login in the system keyring, which a container cannot reach, unless AGY_CLI_FORCE_FILE_TOKEN_STORAGE is set; so it signs in by assay account agy login. In ACP mode its models are listed without their effort, gemini-4-neon with effort = "low" and so on.