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.
Paste this into AGENTS.md
Section titled "Paste this into AGENTS.md"## 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.The package ships the same instructions as a skill, at skills/fleetjobs/SKILL.md. Copy it into the folder your agent reads skills from.
What to run
Section titled "What to run"| Goal | Command |
|---|---|
| Run and wait | heavy pnpm test |
| Run a quick command | heavy --light pnpm lint |
| Queue and carry on | heavy submit pnpm build |
| Wait for it later | heavy wait <id> |
| See the queue | heavy status --json |
| Stop a job | heavy 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.
What the exit code means
Section titled "What the exit code means"| Code | Meaning | What to do |
|---|---|---|
0 | The command passed | Go on |
1 | A heavy command failed, such as an unknown job id | Read the message |
2 | The invocation is wrong | Read the fix: line. The same call gives the same result |
64 | heavy refuses the command, such as pnpm store prune | Do not run it through heavy. The disk timer prunes the stores |
75 | Nobody waited for the job, so it left the queue | Run it again |
124 | The job passed its time limit, HEAVY_MAX | Find out why it hangs, or raise the limit once |
130 | The job was cancelled | None |
137 | The kernel killed the job for memory twice | The job is in the night queue |
Any other code is the command's own, whether it ran here or on a host.
Decisions that belong to fleetjobs
Section titled "Decisions that belong to fleetjobs"- Where the job runs. Do not set
HEAVY_LOCALorHEAVY_REMOTEunless 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.