Migrating from v0.5.x to v0.6.0
v0.6.0 changes the exit codes of the gest CLI. Before v0.6, almost every failure exited with 1.
The one exception was iteration next, which exited with 2 when no tasks were available. v0.6 uses
the codes of BSD sysexits.h instead, so scripts and agents can
tell the category of an error from $? alone.
You do not need to migrate any data. Project stores, settings and .gest/ directories from v0.5.x work
unchanged on v0.6.
What changed
Each variant of cli::Error now has its own sysexits code:
| Code | Name | Meaning |
|---|---|---|
| 0 | — | Success |
| 64 | EX_USAGE |
Command-line usage error |
| 65 | EX_DATAERR |
User data format error |
| 66 | EX_NOINPUT |
Input entity not found |
| 69 | EX_UNAVAILABLE |
Resource not in the required state |
| 70 | EX_SOFTWARE |
Internal software error (editor failures, etc.) |
| 74 | EX_IOERR |
Filesystem or database I/O error |
| 75 | EX_TEMPFAIL |
Try again later (valid empty result) |
| 78 | EX_CONFIG |
Configuration or setup error |
ADR-0017 gives the code of each variant and the reasons for the choice.
What you need to update
Scripts that branch on exit code 1
Some scripts check $? -eq 1 to detect an error of gest. Change them to check $? -ne 0. The codes of
errors are now 2 for a command line that does not parse, and 64 to 78 for the errors of gest. One check
covers all of them.
# Before (v0.5.x)
gest task show "$id" || [ $? -eq 1 ] && echo "gest error"
# After (v0.6.0)
gest task show "$id" || echo "gest error"Scripts that treat iteration next exit 2 as “no tasks”
iteration next used to exit with 2 when no unblocked task was available. That code is now 75
(EX_TEMPFAIL). Update the check in every orchestrator loop that polls iteration next:
# Before (v0.5.x)
gest iteration next "$ITER_ID" --claim --agent worker-1 --json
if [ $? -eq 2 ]; then
# Advance or idle
fi
# After (v0.6.0)
gest iteration next "$ITER_ID" --claim --agent worker-1 --json
if [ $? -eq 75 ]; then
# Advance or idle
fiA script that still checks for 2 reads the “no tasks” signal as a general error, and it probably
leaves the loop.
Agent profiles that document the old contract
You may have written your own agent profiles, such as .agents/profiles/**/SKILL.md or AGENT.md. If
they say “exit code 2 means no tasks available”, update them to the new codes. The profiles that ship
with gest already have the new codes.
What stayed the same
0still means success.- Every code other than 0 still means that something went wrong or that the result was empty. The
check
$? -ne 0works as before. - The error messages on stderr keep their words. Only the number of the exit code changed.
- No flags or output formats changed.
--json,--quiet,--rawand the IDs of records behave as before. - No stored data changed. You do not need to run a migration command.
Rolling back
If the new exit codes break something important, you can go back to an older version:
gest self-update --target 0.5.6Your project data still works with v0.5.x.