Gemini CLI: Git Worktree Support for Parallel Sessions

Gemini CLI

Gemini CLI v0.36.0 introduced native Git worktree support, enabling developers to run multiple isolated Gemini CLI sessions in parallel across separate branches of the same repository. The --worktree (or -w) flag creates a new worktree automatically, spinning up a fully isolated agent session with zero configuration. The release also includes macOS Seatbelt sandboxing, Windows native sandboxing, a refreshed Composer UI layout, and a multi-registry subagent architecture that enables AgentSession replay semantics.


Git Worktree Support for Parallel Sessions

Gemini CLI v0.36.0, released on April 1, 2026, introduced one of its most developer-friendly features to date: native Git worktree support that enables fully isolated, parallel agent sessions across multiple repository branches.

What Are Git Worktrees?

Git worktrees are a built-in Git feature that allow a single repository to have multiple checked-out branches simultaneously in separate directories on disk. Until v0.36.0, running Gemini CLI in parallel across different branches required manually managing separate repository clones β€” a cumbersome process that broke the workflow for engineers juggling multiple tasks.

The --worktree Flag

Gemini CLI now supports a --worktree (or -w) flag that creates a new Git worktree automatically and launches a fully isolated agent session within it. Each worktree session operates independently:

  • Its own working directory backed by a separate branch
  • No shared state with other active sessions
  • Zero configuration required β€” the flag handles worktree lifecycle automatically
  • Safety-first design: Gemini CLI handles cleanup when the session ends

This means a developer can simultaneously run a refactoring session on a feature branch, a debugging session on a hotfix branch, and an exploratory coding session on main β€” each Gemini CLI instance operating without any interference.

Sandboxing Expansions

v0.36.0 also brings platform-specific sandbox backends to broaden safe execution coverage:

  • macOS Seatbelt sandboxing is now available as a native alternative to the existing gVisor/LXC Linux options
  • Windows native sandboxing arrives for the first time, giving Windows developers the same execution isolation that Linux and macOS users have had since v0.34.0

Task Tracker Protocol

The release integrates the Task Tracker Protocol directly into the agent loop. This gives Gemini CLI structured visibility into long-running multi-step tasks, enabling it to track progress, report state, and resume work across sessions with better continuity.

Composer UI Refresh and Multi-Registry Subagents

The Composer/UI layout received a visual overhaul in v0.36.0, with a cleaner interface for managing active sessions and reviewing agent outputs. Under the hood, a new multi-registry subagent architecture enables AgentSession replay semantics β€” allowing sessions to be serialized, transferred, and resumed with full context intact.

Plan Mode in Non-Interactive Mode

Plan Mode, which was made the default in v0.34.0, now also works in non-interactive (headless) mode. This makes it practical to use Gemini CLI in CI/CD pipelines and automated workflows that require an agent reasoning through a plan before executing changes.