Skip to Content

Reference

Exit codes

What each turno exit code means, for scripts, hooks and status lines.

View source

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.

CodeNameMeaning
0okDone.
1failureIt did not work; the message on stderr says why.
2usageThe command line was wrong: an unknown command or flag, a missing argument, or a question nobody can answer (no terminal, --no-input)
3no_profileNo 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)
4not_signed_inThe folder's profile exists but its account is not signed in (turno profile which --check)
5gateway_downThe gateway (mcpd) does not answer (turno mcp daemon status, turno mcp top, turno mcp savings)
127not_installedThe agent's own command is not installed (turno auto with no profile to open)
130cancelledCancelled 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

On this page