Gemini CLI v0.70.0: shell command policy matching, worktree-safe auth restarts#
Published by Alex Sorokoletov
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#
| Area | What changed |
|---|---|
| Request timeouts | The undici bodyTimeout scales when the request timeout exceeds the 300-second default.[9] |
| Model listing | Output token limits are reported accurately in the models list.[10] Auth capabilities are initialized and options are deduplicated when listing models.[11] |
| Shell expansion | The default in ${VAR:-default} is applied when the variable is set but empty.[12] |
| Session previews | Unicode prompts are preserved and ANSI fragments are stripped in session previews.[13] |
| IDE discovery | A per-user discovery directory is used and port file writes are atomic.[14] |
| Consent prompt | The canonical link path is disclosed and the consent prompt defaults to no.[15] |
| Git detection | A local git clone is detected from the CLI path instead of the working directory.[16] |
| Retry status | Foreground 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#
- [1] Gemini CLI v0.70.0 release notes (v0.69.0 to v0.70.0)
- [2] PR #30355: match commandPrefix and commandRegex rules against the top-level command argument
- [3] PR #30338: keep ASK_USER for shell commands with unresolved expansion
- [4] PR #30282: use re2js for linear-time policy argsPattern evaluation
- [5] PR #30283: skip system MCP servers with insecure command permissions
- [6] PR #30176: preserve selected worktree across authentication restarts
- [7] PR #30259: restore workspace directories only after resumeChat succeeds
- [8] PR #30228: preserve interrupted placeholder after empty model responses to tool turns
- [9] PR #30258: scale undici bodyTimeout when request timeout exceeds 300s default
- [10] PR #30253: report accurate output token limits in models list
- [11] PR #30271: initialize auth capabilities and deduplicate options when listing models
- [12] PR #30250: apply default in ${VAR:-default} when variable is set but empty
- [13] PR #30220: preserve Unicode prompts and strip ANSI fragments in session previews
- [14] PR #30340: use per-user discovery directory and atomic port file writes
- [15] PR #30289: disclose canonical link path and default consent prompt to no
- [16] PR #30315: detect local git clone from CLI path instead of cwd
- [17] PR #30266: scope foreground retry status to active main prompt and current model policy
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