mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-04 15:16:49 -07:00
Merge troubleshooting into FAQ and spill over info into more reasonable places in the docs, eg error codes in the headless mode.
This commit is contained in:
+11
-6
@@ -36,13 +36,18 @@ Returns a stream of newline-delimited JSON (JSONL) events.
|
||||
|
||||
## Exit codes
|
||||
|
||||
The CLI returns standard exit codes to indicate the result of the headless
|
||||
execution:
|
||||
The Gemini CLI uses specific exit codes to indicate the reason for termination.
|
||||
This is especially useful for headless scripting and automation:
|
||||
|
||||
- `0`: Success.
|
||||
- `1`: General error or API failure.
|
||||
- `42`: Input error (invalid prompt or arguments).
|
||||
- `53`: Turn limit exceeded.
|
||||
| Exit Code | Error Type | Description |
|
||||
| --------- | -------------------------- | --------------------------------------------------------------------------------------------------- |
|
||||
| 0 | `Success` | Success. |
|
||||
| 1 | `GeneralError` | General error or API failure. |
|
||||
| 41 | `FatalAuthenticationError` | An error occurred during the authentication process. |
|
||||
| 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only) |
|
||||
| 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (e.g., Docker, Podman, or Seatbelt). |
|
||||
| 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors. |
|
||||
| 53 | `FatalTurnLimitedError` | The maximum number of conversational turns for the session was reached. (non-interactive mode only) |
|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
+2
-1
@@ -298,4 +298,5 @@ gemini -s -p "run shell command: mount | grep workspace"
|
||||
|
||||
- [Configuration](../reference/configuration.md): Full configuration options.
|
||||
- [Commands](../reference/commands.md): Available commands.
|
||||
- [Troubleshooting](../resources/troubleshooting.md): General troubleshooting.
|
||||
- [FAQ](../resources/faq.md): General troubleshooting and answers to common
|
||||
questions.
|
||||
|
||||
Reference in New Issue
Block a user