Skip to content

Checks

A check is a command your repository names as part of what “done” means. List them in one file, and every agent working in the project runs them before it finishes. endurable watches those runs and tells you how each stood when the turn ended.

.agents/checks
npm run lint
npm test

Commit the file to your base branch, and push it if the repository has an origin. That’s the whole setup. There’s nothing to turn on.

Every finished turn that changed files says how the checks stood, in two places: the turn’s one-line summary and the first button of its footer. A failing check also shows on the thread’s row in the list.

'Checks passed' means every check ran, on the code exactly as this turn left it.
It says Meaning
Checks passed Every check ran and passed on the code as the turn left it.
npm test failing A check’s latest run failed, on the code as the turn left it. With several: “2 checks failing”.
Checks ran before later changes They ran, but files changed afterward, so the result is out of date.
Not checked No check was run. With some run: “1 of 2 checks run”.

Click the button in the footer to see each check with its output.

A turn that ends with a check failing is not finished work, even though the agent wrote an answer. The thread goes to Needs attention, its row reads “npm test is still failing · Fix it”, and it shows on Home with everything else that needs you.

  • Fix it sends the agent back with the failing output. It’s told to find the cause, not to weaken, skip or delete the check, and to say so if the check was already failing before its change.
  • Dismiss is for a failure you expected, such as a test you asked the agent to write failing first. It tells the agent nothing.

Replying in the thread clears it too, and so does a later turn that ends with the check passing.

“Not checked” and “ran before later changes” are only reported. They never raise a thread.

flowchart TD
  told[Agent is told the checks<br/>from the base branch] --> work[It works, running whatever<br/>narrow test shows its change]
  work --> thinks{Thinks it's done?}
  thinks -- no --> work
  thinks -- yes --> runs[Runs each check,<br/>on its own]
  runs --> pass{All pass?}
  pass -- no --> work
  pass -- yes --> answer[Answers]
  answer --> compare[endurable compares each run<br/>with the folder as the turn left it]
  compare --> passed([Checks passed])
  compare --> stale([Ran before later changes])
  compare --> failing([Failing: thread needs you])

endurable never runs a check itself. It does three things:

  1. Tells the agent. The list is part of what every agent in the project is told, about 200 tokens.
  2. Recognizes a run. When the agent runs a command whose words match a declared check, at the top of the repository, endurable notes its exit code and a fingerprint of the folder at that moment.
  3. Compares. When the turn ends, each check’s latest run is compared with the folder as the turn left it. The same fingerprint means the check ran on this code. A different one means something changed after.

The agent is told the checks are for the end of the work. While it’s working it should run whatever narrow thing shows a change, one test file say, and save the full list for when it believes it’s finished. This ordering matters: told the other way round, agents run the entire suite after every small fix.

The base branch’s file decides. A thread goes by .agents/checks as it was on the branch it started from, read from git. If an agent edits the file in its worktree, nothing changes for that thread. A change to the checks counts once it’s on the base branch, and on origin if there is one. A thread already under way picks it up when its own branch takes in the base’s newer commits.

The exit code must be the check’s own. These count:

Terminal window
npm test
npm test > test.log
CI=1 npm test
npm test && npm run lint

These don’t, because the script’s exit code belongs to something else:

Terminal window
npm test | tail -20 # tail's exit code
npm test; echo done # echo's
npm test || true # always 0
npm test & # backgrounded

When an agent runs a check in a way that doesn’t count, it’s told so once, and asked to run it plainly for its final run. To make that painless, a run that does count returns only the last 40 lines of output, with the rest saved to a file. Agents pipe to tail to keep long output out of their context. This gives them the short version without the pipe.

Any change after the run makes it stale. Not only the agent’s file edits. A formatter, sed, a code generator, anything that alters the folder.

A narrower run isn’t the check. npm test test/cart.test.js is a fine thing to run while working. It says nothing about npm test.

  • One command per line. Blank lines and lines starting with # are skipped.
  • At most eight. A line past the eighth, or one that repeats an earlier line, declares nothing.
  • Each line is a single plain command. A line with &&, a pipe, a redirect or a variable assignment declares nothing, and Settings tells you which lines were skipped and why.
  • A check has no name other than its command, so that’s what you’ll see in the app: “npm test failing”.

If you need several steps, put them behind one script and list the script:

.agents/checks
./scripts/verify.sh

Settings → Projects shows a project’s checks as endurable reads them from the base branch.

Keep checks fast. Every agent runs every check at least once per piece of work. A ten-minute suite makes every thread ten minutes slower.

A check that’s red on your base branch flags every thread. Each one will end “failing” through no fault of its own. That’s the cost of the rule, and the reason to fix such a check or take it out of the file.

Child threads aren’t raised for checks. A child answers to its parent, and the parent is told how the child’s checks stood. The parent’s own turn is the one that’s held to them.

No project, no checks. A thread without a project has none, and neither does a thread reviewing someone else’s pull request.