Answer: Gemini CLI uses specific exit codes to indicate the reason for termination: 41 for FatalAuthenticationError, 42 for FatalInputError, 44 for FatalSandboxError, 52 for FatalConfigError, and 53 for FatalTurnLimitedError. Status: Confirmed Entry: tool/gemini-cli/troubleshooting/exit-codes-meaning Revision: 1 Digest: sha256:1b4c2ed19643dc3c (changes whenever the content changes) Timeline: Created: 2026-11-13T03:19:00Z Last changed: 2026-11-13T03:19:00Z Last verified: 2026-11-20T12:53:52Z Next check: 2026-11-21T12:53:52Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Exit Code 41 | 41 | [1] | 2026-11-20 Exit Code 42 | 42 | [1] | 2026-11-20 Exit Code 44 | 44 | [1] | 2026-11-20 Exit Code 52 | 52 | [1] | 2026-11-20 Exit Code 53 | 53 | [1] | 2026-11-20 Sources: [1] Google. "Troubleshooting guide". https://geminicli.com/docs/resources/troubleshooting.md Role: primary. Accessed: 2026-11-20T12:53:52Z Quote: "| 41 | `FatalAuthenticationError` | An error occurred during the authentication process." (Supports: Exit Code 41) Quote: "| 42 | `FatalInputError` | Invalid or missing input was provided to the CLI. (non-interactive mode only)" (Supports: Exit Code 42) Quote: "| 44 | `FatalSandboxError` | An error occurred with the sandboxing environment (for example, Docker, Podman, or Seatbelt)." (Supports: Exit Code 44) Quote: "| 52 | `FatalConfigError` | A configuration file (`settings.json`) is invalid or contains errors." (Supports: Exit Code 52) Quote: "| 53 | `FatalTurnLimitedError` | The maximum number of conversational turns for the session was reached. (non-interactive mode only)" (Supports: Exit Code 53) Published: 2026-10-16T02:36:07Z Snapshot SHA-256: a8f8608db502854eb7ca61bc0f268acc56bb8c37fb5467178f700ae56b291604 (captured 2026-11-13T03:18:59Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:19:00Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:53:52Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:53:52Z Last attempt: 2026-11-20T12:53:52Z Notes and limitations: Extracted automatically from a single official source (section "Exit codes"). Related: https://latestn.com/tool/gemini-cli/troubleshooting/extension-not-loading How do I troubleshoot a Gemini CLI extension that is not loading? https://latestn.com/tool/gemini-cli/troubleshooting/find-or-create-github-issues How do I find existing GitHub issues for Gemini CLI or create a new one? https://latestn.com/tool/gemini-cli/troubleshooting/fix-429-resource-exhausted Why am I getting an API error 429 Resource exhausted in Gemini CLI? https://latestn.com/tool/gemini-cli/troubleshooting/acp-debugging-telemetry How can I debug Gemini CLI ACP mode and enable telemetry? https://latestn.com/tool/gemini-cli/troubleshooting/debug-hooks How do I debug Gemini CLI hooks that aren't working? https://latestn.com/tool/gemini-cli/troubleshooting/debugging-tips How can I debug issues with Gemini CLI? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:19:00Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/gemini-cli/troubleshooting/exit-codes-meaning/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/exit-codes-meaning POST: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/exit-codes-meaning with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/gemini-cli/troubleshooting/exit-codes-meaning?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What do the exit codes mean in Gemini CLI? Revision 1, last verified 2026-11-20T12:53:52Z. https://latestn.com/tool/gemini-cli/troubleshooting/exit-codes-meaning (accessed 2026-11-21T10:00:21Z). @misc{LatestN_tool_gemini_cli_troubleshooting_exit_codes_meaning_r1, title = {What do the exit codes mean in Gemini CLI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/gemini-cli/troubleshooting/exit-codes-meaning}}, note = {Revision 1; digest sha256:1b4c2ed19643dc3c; last verified 2026-11-20T12:53:52Z; accessed 2026-11-21T10:00:21Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/gemini-cli/troubleshooting/exit-codes-meaning