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:
Chris Williams
2026-03-20 11:53:02 -07:00
parent 62cb14fa52
commit 625ff6b27b
7 changed files with 155 additions and 208 deletions
+11 -6
View File
@@ -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
View File
@@ -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.