An exit code is the number a command hands back when it ends. 0 means it worked. Any other number means it did not. Scripts read it to decide what to do next.

Code Meaning
0 It worked. Signing in also ends with 0 when your account is on the waiting list, or when a trial request was sent
1 It failed. The message above it says why. This is the code for nearly every failure
2 niro docs-send, or an engine LLM option, in this release, which has no LLM documentation
130 You pressed Ctrl-C at a question
128 plus a signal number An engine command was stopped by a signal
129, 130, 143 niro audit-push-repo was interrupted (hang-up, Ctrl-C, or stop). It deletes its masked copies before ending

Common causes of code 1

niro upgrade

Code Meaning
1 npm failed or was interrupted
2 npm said it worked, but there is no niro in npm's global folder
3 The new version could not finish the upgrade (handover failed)
4 The refresh did not finish: at least one agent was not refreshed
5 This is not the global copy of niro (for example a linked working copy). Use --force to upgrade anyway

The engine