Gemini CLI v0.70.0: shell command policy matching, worktree-safe auth restarts#

Published by

Part of the Gemini CLI Version Tracker series. | Gemini CLI on GitHub | Releases

Gemini CLI v0.70.0 follows v0.69.0 with a fix-focused release: command policy rules now match against the top-level command argument, shell commands with unresolved expansion stay gated behind ASK_USER, the selected worktree survives an authentication restart, and the request body timeout scales when a request timeout exceeds the 300-second default.[1]

Shell command policy matching#

Several fixes land in how the policy engine decides whether a shell command runs. The commandPrefix and commandRegex rules are matched against the top-level command argument.[2] Shell commands that contain unresolved expansion keep the ASK_USER decision rather than resolving to an allow or deny.[3] The policy argsPattern is evaluated with re2js for linear-time matching.[4] System MCP servers whose command carries insecure permissions are skipped.[5]

Together these change which shell commands a saved rule covers and which ones fall back to a prompt. A command whose expansion the CLI cannot resolve asks before it runs, and prefix and regex rules test the command argument at the top level.

Session and restart state#

The selected worktree is preserved across authentication restarts, so re-authenticating mid-session no longer drops the worktree you were on.[6] Workspace directories are restored only after resumeChat succeeds.[7] After an empty model response to a tool turn, the interrupted placeholder is preserved.[8]

Reliability and display fixes#

AreaWhat changed
Request timeoutsThe undici bodyTimeout scales when the request timeout exceeds the 300-second default.[9]
Model listingOutput token limits are reported accurately in the models list.[10] Auth capabilities are initialized and options are deduplicated when listing models.[11]
Shell expansionThe default in ${VAR:-default} is applied when the variable is set but empty.[12]
Session previewsUnicode prompts are preserved and ANSI fragments are stripped in session previews.[13]
IDE discoveryA per-user discovery directory is used and port file writes are atomic.[14]
Consent promptThe canonical link path is disclosed and the consent prompt defaults to no.[15]
Git detectionA local git clone is detected from the CLI path instead of the working directory.[16]
Retry statusForeground retry status is scoped to the active main prompt and current model policy.[17]

Saved shell approvals are evaluated more strictly#

The policy fixes change the outcome of rules that were already on disk. A commandPrefix or commandRegex rule is now tested against the top-level command argument, and a command the CLI cannot fully expand returns ASK_USER instead of resolving to allow or deny. An allowlist that cleared a command in an earlier build can now land on a prompt, and the argsPattern evaluation runs in linear time on the input it is given.

The rest of the release sits at the seams a long session drives: an authentication restart that keeps its worktree, a resumed chat that restores directories only once it succeeds, and a request timeout that carries the body timeout up with it past the 300-second mark. The configuration surface a build advertises shifts release to release, and these are the points where a session that runs for hours meets re-auth, resume, and the network.

This analysis is based on publicly available open-source code and release metadata, conducted for educational and research purposes. All trademarks and software referenced belong to their respective owners.

Sources#

Previous Gemini CLI analysis: v0.69.0 (November 26, 2026)

Next Gemini CLI analysis: v0.71.1 (November 26, 2026)

All 13 Gemini CLI analyses: Gemini CLI Version Tracker · Official Gemini CLI changelog

Get the weekly digest

New Claude Code, Codex, Gemini CLI and OpenCode guides and release analyses, once a week, plus occasional notes.

One email a week plus occasional notes. Confirm by email; unsubscribe from any issue. Privacy