gemini-cli

Troubleshooting guide

This guide provides solutions to common issues and debugging tips, including topics on:

Authentication or login errors

Frequently asked questions (FAQs)

Common error messages and solutions

Exit Codes

The Gemini CLI uses specific exit codes to indicate the reason for termination. This is especially useful for scripting and automation.

Exit Code Error Type Description
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)

Debugging Tips

Existing GitHub Issues similar to yours or creating new Issues

If you encounter an issue that was not covered here in this Troubleshooting guide, consider searching the Gemini CLI Issue tracker on GitHub. If you can’t find an issue similar to yours, consider creating a new GitHub Issue with a detailed description. Pull requests are also welcome!