Gemini CLI v0.58.0

1 month ago

Gemini CLI v0.58.0 shipped on the first of September. The biggest change closes a hole in the macOS sandbox that let a sandboxed process reach Docker.

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00Gemini CLI v0.58.0
  2. 0:1201: The macOS sandbox
  3. 0:15The container sockets are denied
  4. 0:34The container binaries are denied too
  5. 0:5002: Ignore rules and symlinks
  6. 0:53Ignore rules follow a symlink
  7. 1:07read_file checks both paths
  8. 1:1903: Cancelling and retrying
  9. 1:21Cancelling rolls the history back
  10. 1:35Retry nudges keep the prefix cache
  11. 1:50Legacy sessions nudge on an empty tool response
  12. 2:0204: Policy and the agent server
  13. 2:04The path checker is registered again
  14. 2:21A stale cancellation stops killing the next prompt
Show transcript

Gemini CLI v0.58.0

> release2026-09-01
Gemini CLI

v0.58.0

A tighter macOS sandbox, ignore rules that follow symlinks, and a cancel that leaves the conversation clean.

Gemini CLI running in a terminal
github.com/google-gemini/gemini-cli, tag v0.58.0

Gemini CLI v0.58.0 shipped on the first of September. The biggest change closes a hole in the macOS sandbox that let a sandboxed process reach Docker.

01: The macOS sandbox

> the macOS sandboxv0.58.0
01
The macOS sandbox

Start with the sandbox on macOS.

The container sockets are denied

> the macOS sandboxv0.58.0

The sandbox now denies the container daemon sockets

deny file-read* file-write* /var/run/docker.sock · /private/var/run/docker.sock /Users/Shared/.docker ~/.docker/run · ~/.colima · ~/.orbstack/run · ~/.rd
packages/core/src/sandbox/macos/baseProfile.ts

A process inside the Seatbelt sandbox could reach the Docker daemon socket, start a privileged container, and mount your whole filesystem through VirtioFS, right around the sandbox boundary. Reads and writes to those sockets are now denied, and so are the Colima, OrbStack and Rancher Desktop ones.

The container binaries are denied too

> the macOS sandboxv0.58.0

Running the container binaries is blocked as well

deny process-exec   docker · dockerd · docker-compose · podman · colima · orb deny mach-lookup   com.docker.* · dev.kdrag0n.OrbStack deny ipc-posix-shm*   Docker shared memory all six built-in macOS profiles
packages/cli/src/utils/sandboxBuiltinProfiles.ts

Blocking the socket leaves the binaries. So the profiles also deny executing docker, podman and the rest from their usual install paths, plus the Mach service lookups and the shared memory the daemons talk over. All six built-in profiles carry the same rules.

02: Ignore rules and symlinks

> ignore rules and symlinksv0.58.0
02
Ignore rules and symlinks

Which files the agent is allowed to touch.

Ignore rules follow a symlink

> ignore rules and symlinksv0.58.0

An ignore rule now follows a symlink to its target

matched against   the literal path and the resolved real path ignored if   either one matches .geminiignore or .gitignore a dangling link   is caught and skipped
packages/core/src/services/fileDiscoveryService.ts

File discovery now checks whether a path is a symbolic link. Your ignore patterns are matched against the literal path and against the path it resolves to, and either match ignores the file. A dangling link is caught and skipped.

read_file checks both paths

> ignore rules and symlinksv0.58.0

read_file checks the link and the file it points at

read_file   validates sanitizedPath and resolvedPath read_many_files · grep · glob   inherit it from the shared filter
packages/core/src/tools/read-file.ts

The read file tool validates the path you gave it and the path that resolves to, so a link is no longer a side door into an ignored file. Grep, glob and read many files get the same behaviour.

03: Cancelling and retrying

> cancelling and retryingv0.58.0
03
Cancelling and retrying

What happens when you press stop.

Cancelling rolls the history back

> cancelling and retryingv0.58.0

Cancelling a tool call rolls the history back

append a synthetic cancellation turn slice the history back to the length after your prompt less context spent, fewer follow-up requests
packages/cli/src/ui/hooks/useGeminiStream.ts

Cancelling a tool call used to append a synthetic cancellation turn. Those piled up in your context and generated more requests. The CLI now remembers where the history stood after your prompt and slices back to that point.

Retry nudges keep the prefix cache

> cancelling and retryingv0.58.0

Retry nudges moved off the system instruction

rewrite systemInstruction on every retry append the nudge to the final user turn the prefix stays stable, so the cache holds
packages/core/src/core/geminiChat.ts

When a reply comes back empty, or with thinking and no text, the model gets a nudge to try again. That nudge used to go into the system instruction, which changed the prefix and threw the cache away. It now rides on the last user turn instead.

Legacy sessions nudge on an empty tool response

> cancelling and retryingv0.58.0

Legacy sessions recover from an empty tool response

when   the turn follows a tool response and comes back without text then   the session nudges the model, as the core session already did
packages/core/src/agent/legacy-agent-session.ts

Legacy agent sessions picked up the same recovery. When a turn follows a tool response and comes back without visible text, the session nudges the model rather than ending the turn quietly.

04: Policy and the agent server

> policy and the agent serverv0.58.0
04
Policy and the agent server

Two fixes further down the stack.

The path checker is registered again

> policy and the agent serverv0.58.0

Auto-edit gets its allowed-path checker back

[rule.safety_checker]   nested, so the loader schema dropped it [[safety_checker]]   top level, so it loads AllowedPathChecker now registers for write_file and replace
packages/core/src/policy/policies/write.toml

The write policy declared its safety checkers nested under each rule, and the loader's schema drops a sub-table it does not recognise. So the allowed path checker was missing for write file and replace in auto-edit mode. Moving the declarations to the top level fixes it.

A stale cancellation stops killing the next prompt

> policy and the agent serverv0.58.0

A stale cancellation stops killing your next prompt

the cached task kept its cancellationError, so the next prompt aborted acceptUserMessage clears it when a new turn starts
packages/a2a-server/src/agent/task.ts

On the A2A server, pressing stop recorded a cancellation error on the cached task, and that task stayed in memory. Your very next prompt picked up the same object, hit the old error, and aborted. Accepting a new user message now clears it.