Exit codes
What each turno exit code means, for scripts, hooks and status lines.
This page lists the exit codes turno promises, so scripts, hooks and status lines can rely on them. turno help exit-codes prints the same list.
| Code | Name | Meaning |
|---|---|---|
0 | ok | Done. |
1 | failure | It did not work; the message on stderr says why. |
2 | usage | The command line was wrong: an unknown command or flag, a missing argument, or a question nobody can answer (no terminal, --no-input) |
3 | no_profile | No profile for this folder: no rule and no default, or a rule naming a profile that does not exist (turno auto, turno profile which --check) |
4 | not_signed_in | The folder's profile exists but its account is not signed in (turno profile which --check) |
5 | gateway_down | The gateway (mcpd) does not answer (turno mcp daemon status, turno mcp top, turno mcp savings) |
127 | not_installed | The agent's own command is not installed (turno auto with no profile to open) |
130 | cancelled | Cancelled by you: Ctrl-C, or Esc in a profile list. |
What turno help exit-codes prints
Exit codes. Scripts, hooks and status lines can rely on these.
0 ok done
1 failure it did not work; the message on stderr says why
2 usage the command line was wrong: an unknown command or flag, a
missing argument, or a question nobody can answer (no
terminal, --no-input)
3 no_profile no profile for this folder: no rule and no default, or a
rule naming a profile that does not exist (turno auto,
turno profile which --check)
4 not_signed_in the folder's profile exists but its account is not signed
in (turno profile which --check)
5 gateway_down the gateway (mcpd) does not answer (turno mcp daemon
status, turno mcp top, turno mcp savings)
127 not_installed the agent's own command is not installed (turno auto with
no profile to open)
130 cancelled cancelled by you: Ctrl-C, or Esc in a profile list
With --json, an error is one JSON line on stderr with the same code:
{"schemaVersion":1,"error":{"code":"no_profile","exitCode":3,"message":"..."}}
Examples:
$ turno profile which --check || turno profile assign . work
$ turno mcp daemon status >/dev/null; [ $? -eq 5 ] && turno mcp daemon start