GitHub
Skip to content

For agents

What a coding agent runs, reads and decides when fleetjobs queues its builds and tests, with a prompt to paste into AGENTS.md.

An agent runs every build and test through heavy, and fleetjobs picks the machine. The agent reads an exit code and never chooses a host.

## Builds and tests

Run builds, tests, typechecks and lint through `heavy <cmd>`, for example `heavy pnpm test`. Use `heavy --light <cmd>` for quick commands. `heavy` returns the command's exit code. If your shell may time out, run `heavy submit <cmd>`, then `heavy wait <id>`. Do not run the same command twice at once.
AGENTS.md

The package ships the same instructions as a skill, at skills/fleetjobs/SKILL.md. Copy it into the folder your agent reads skills from.

GoalCommand
Run and waitheavy pnpm test
Run a quick commandheavy --light pnpm lint
Queue and carry onheavy submit pnpm build
Wait for it laterheavy wait <id>
See the queueheavy status --json
Stop a jobheavy cancel <id>

Output of the job goes to stdout and stderr as it would without heavy. Heavy's own lines, such as why a job waits, go to stderr. heavy submit prints only the job id on stdout. Stdin is not passed to the job.

CodeMeaningWhat to do
0The command passedGo on
1A heavy command failed, such as an unknown job idRead the message
2The invocation is wrongRead the fix: line. The same call gives the same result
64heavy refuses the command, such as pnpm store pruneDo not run it through heavy. The disk timer prunes the stores
75Nobody waited for the job, so it left the queueRun it again
124The job passed its time limit, HEAVY_MAXFind out why it hangs, or raise the limit once
130The job was cancelledNone
137The kernel killed the job for memory twiceThe job is in the night queue

Any other code is the command's own, whether it ran here or on a host.

  • Where the job runs. Do not set HEAVY_LOCAL or HEAVY_REMOTE unless a task needs the job on this machine or on a host.
  • Whether to run a job twice. A second identical call from the same folder follows the first job, and says so. Files changed after the first started are not in its result.
  • Whether to believe a remote failure. See Trust.

A job survives its client. If your tool call times out, the job is still running: heavy status shows it and heavy wait <id> returns its exit code. In a program, use the library.