Google Blog Gemini CLI v0.42.0 Ships Gemma 4 as Default, Preview Adds Session Portability and Shell Safety
Google's latest stable Gemini CLI release enables Gemma 4 models by default and improves session management, while the v0.43.0 preview introduces session export/import, surgical code edits, and shell command safety evaluations.
Google released Gemini CLI v0.42.0 as the latest stable version on May 12, with Gemma 4 models now available by default through the Gemini API. The same day, a v0.43.0 preview landed with session portability, more precise code editing, and enhanced shell command safety.
What’s new in v0.42.0 (stable)
The headline change is Gemma 4 availability. Gemma 4 models are now automatically offered through the Gemini API without any extra setup. If you’re already using Gemini CLI with your Gemini API key, Gemma 4 becomes part of your available model list on upgrade.
Session management got cleaner. A --delete flag now works with the /exit command, letting you remove a session immediately on close rather than going back to clean it up later. The release also added a /bug-memory command for heap diagnostics, which helps when sessions run into memory pressure on large codebases.
API reliability improved in this release. Timeouts were reduced to 60 seconds with added retry logic for connection errors, which should reduce the number of sessions that hang silently when network conditions are unstable.
The auto memory feature received an updated inbox workflow that uses canonical-patch contracts for cleaner skill extraction management. If you use Gemini CLI’s memory features to capture patterns from your sessions, the handling is more structured in this release.
What’s coming in v0.43.0-preview.0
The preview release focuses on three things.
Session portability. You can now export a chat session to a file and import it in another session via a new CLI flag. The practical use is picking up a long agent session on a different machine, or sharing a session context with a colleague.
Surgical code edits. The model is now steered toward using the edit tool for code modifications rather than rewriting larger blocks. This produces more targeted diffs and reduces token usage when changes are small and localized.
Shell command safety. The preview adds comprehensive shell command safety evaluations and strengthened steering to prevent unauthorized file system changes. This addresses a common concern with terminal agents where an overly permissive shell execution policy can let an agent make changes outside the intended scope.
Additional improvements in the preview include an adaptive token calculator for more accurate content size estimates, tool call IDs now prefixed with tool names for better IDE compatibility, and an improved UI for session resumption.
To try the stable version, run npm install -g @google/gemini-cli. To test the preview, use npm install -g @google/gemini-cli@preview.
Release notes for both versions are on the Gemini CLI documentation site. The announcement for the original Gemini CLI launch is on the Google blog.