Skip to main content

Agents & automation

Fleet & Background Sessions

Fleet lets you run agent sessions in isolated git worktrees while you keep working - either one at a time or fanned out in parallel. When a session finishes, you review the diff and apply it on your terms.

What Fleet is

Fleet is the background execution layer for the Agent panel in Code mode. It has three modes that share the same infrastructure:

  • Fleet Sessions - individual agent sessions, each isolated in its own git worktree on a throwaway branch. Your working copy is untouched while the session runs. Sessions survive tab-switching and app restarts.
  • Fleet Parallel - fans a single prompt out to N independent sessions simultaneously. When they finish, you compare diffs side by side and pick a winner.
  • Run in background - the one-click button in the Agent panel composer. Dispatches the current task headlessly, clears the composer immediately, and notifies you when the agent is done.

All three write their output to worktree branches. You review the diff before anything touches your main working copy.

Open the Fleet panel

  1. Switch to Code mode (Ctrl+2).
  2. Click the Fleet icon (4-square grid) in the left activity bar - or click the Fleet indicator pill in the top bar (it appears whenever sessions are running, awaiting approval, or ready to apply).

The Fleet panel is a dockable tab in the Dockview layout. If your project is not a git repository, the panel shows a "Initialize git" tile instead of session cards - Fleet requires git.

Run a task in the background

Requires: Code mode, a real session (not the pre-session prompt screen), and a project folder open.

  1. Type your task in the Agent panel composer.
  2. Check the isolated checkbox next to the button if you want the agent to write to a throwaway worktree branch (recommended for multi-file or risky tasks). Leave it unchecked to let the agent write directly to your working copy.
  3. Click Run in background (the clock icon).
  4. The composer clears. A toast confirms the session is running.
  5. When the agent finishes, a toast fires with a Review button - click it to open the Fleet panel.

In-place runs (isolated unchecked) write directly to your working copy with no diff step. Changes land immediately.

Isolated runs produce a "Ready to apply" card in the Fleet panel where you review the diff and choose when to apply.

Fleet card states and actions

Cards are sorted action-required first.

State Left border Actions
Running Blue Open · Discard
Awaiting approval Amber (pulsing) View · Approve
Ready to apply Green View diff · Apply ▾
Interrupted / Error Red Resume in foreground · Discard
Idle Grey Open · Discard

While a session is running, the card shows a live activity row: Iter 5/13 - read style.css Last active 12s ago. The timer ticks every 5 seconds. If the session goes quiet for more than 60 seconds the timer turns amber; over 180 seconds it turns red.

Sessions idle for 7+ days show an Idle 7d - Close? badge.

Review and apply a finished session

  1. In the Fleet panel, find the Ready to apply card.
  2. Click View diff to open the full colored unified diff with +/- statistics per file.
  3. When you're ready, click Apply ▾ to open the Apply dialog.
  4. The dialog runs a dry-run conflict check against your working copy. If there are merge conflicts or uncommitted changes, the Apply button is disabled and the conflicting files are listed. Buttons next to each file open the main-project copy and the agent's worktree copy side by side as labeled tabs. Uncommitted changes in your working copy route you to the Git panel.
  5. Once the check is clear, choose merge or squash strategy and confirm.

The dry-run is non-destructive - it never writes to disk.

Discard a session

Click Discard on any card. A confirmation dialog appears (with a Don't ask again checkbox). Confirming calls DELETE and removes the worktree from disk.

To suppress the confirmation in future, check Don't ask again in the dialog - or toggle Settings → Fleet → general.dont_ask_again_discard.

Promote a foreground session to Fleet

You can move an already-running foreground session to Fleet without dispatching a new prompt:

  • From the Agent panel: click Send to Fleet in the session header bar (only visible when a project folder is loaded). This provisions a worktree and moves the session to background.
  • From the Sessions drawer: open the Sessions drawer (top-bar hamburger → Sessions), right-click any session, and choose Open in fleet.

Fleet Parallel - fan out to multiple sessions

Fleet Parallel runs the same prompt in N independent isolated sessions simultaneously. When they finish, you compare diffs side by side and pick one to apply.

Each session gets its own worktree branch. The ParallelDiffCompare view shows up to 3 sessions as columns (4+ sessions get a scrollable tab strip), with:

  • Branch name and +/- stats
  • Full colored unified diff
  • QEL score badge
  • Pick this winner button

Sessions are sorted highest-QEL-score first. If the top session passed QEL verification, it shows a purple Verified before review badge. If none passed, a banner warns you before you pick.

Picking a winner opens a confirm sheet with a commit message field and merge/squash strategy, then applies that session's worktree.

Launch a parallel run

Requires: Code mode, a project folder open, a real session.

  1. In the Agent panel composer, click Run in parallel (the branch/fork icon adjacent to "Run in background").
  2. In the Run in parallel sheet:
    • Prompt - pre-filled from your composer draft; edit as needed.
    • Parallel sessions (N) - stepper, minimum 2. A VRAM warning appears at N ≥ 3 on smaller GPUs. The ceiling is VRAM-bounded automatically.
    • Permission mode - Act or Plan only. Ask is disabled to prevent N simultaneous approval pauses.
    • Agent - Bodega (always available) or any installed ACP agent (Claude Code, Gemini CLI, Codex). ACP agents are greyed out when air-gap mode is ON.
  3. Click Launch N sessions.

The parallel run group appears in the Fleet Monitor panel (left sidebar → Monitor tab). When sessions complete, click Compare All in the group header to open the side-by-side compare view.

Fleet Monitor panel

The Monitor tab (second tab in the Code mode left sidebar) shows all active Fleet sessions in a compact table: Branch/Project, Status, Iter, Files changed, Elapsed, Tokens, and action buttons.

  • Running sessions appear first.
  • Parallel runs are grouped into collapsible rows with a per-session mini progress bar and QEL score indicator.
  • The table polls live status every 5 seconds.

From the Monitor you can: Focus a session (bring it to the foreground), Kill a running session, Restart a stopped session, or Compare All on a completed parallel run group.

Top-bar Fleet indicator

The Fleet pill in the top bar appears whenever at least one session is running, awaiting approval, or ready to apply. It shows three sub-counters:

Dot Meaning
Pulsing purple Running
Pulsing amber Awaiting approval
Static green Needs review (ready to apply)

Clicking the pill switches to Code mode, opens the left sidebar, and navigates to the Fleet panel.

Fleet settings (Settings → Fleet)

All Fleet settings live under Settings → Fleet.

Setting Default Notes
agent.max_background_sessions 4 Max concurrent sessions (range 2–12). Exceeding this returns an error toast.
agent.worktree_max_age_days 30 days Auto-GC age threshold (range 7–90 days).
fleet.notify_in_app ON In-app toast when a session completes.
fleet.notify_os OFF OS desktop notification on completion (requires system permission).
fleet.worktree_path <userData>/bodega-worktrees/ Custom storage base directory for worktrees.
fleet.quiet_hours_start / fleet.quiet_hours_end empty HH:MM 24h strings. OS notifications are suppressed in this window; in-app toasts still fire.

ACP agents in Fleet

External ACP agents (Claude Code, Gemini CLI, Codex) can run as Fleet sessions or as participants in a parallel run. Two things to know:

  • They are labeled external - not QEL-verified in Fleet cards and in the parallel compare view, because they bypass Bodega's QEL verification layer.
  • They cannot use Ask permission mode in parallel runs (disabled to prevent an approval storm across N sessions). Act and Plan are available.
  • ACP requires network - all ACP agents are disabled when air-gap mode is ON.

Error messages you may see

Message Cause
Type something to run in the background Composer was empty when you clicked Run in background.
Too many background sessions - close or apply one first You've hit the agent.max_background_sessions ceiling (default 4).
This session is already running You tried to launch a background run on a session already in flight.
Project has no commits yet. Make an initial commit before running in an isolated worktree. Isolated worktrees require at least one commit in the project.
Isolated worktree runs require a git repository The open project is not a git repo.

What happens on app restart

Fleet sessions are persisted. When you relaunch Bodega, any sessions that were running or interrupted reappear in the Fleet panel as Interrupted with a Resume in foreground button. You don't lose track of in-flight work across restarts.

In-place vs isolated - when to use each

In-place (isolated checkbox OFF): the agent writes directly to your working copy. No diff review, no apply step - changes land immediately. Good for low-risk single-file tasks where you want to see results fast and can use git to undo if needed.

Isolated (isolated checkbox ON): changes go to a throwaway worktree branch. You get a full diff review and a conflict-checked apply step. Use this for multi-file changes, refactors, or anything where you want to review before the code lands.

Keyboard shortcuts

KeysAction
Ctrl+2Switch to Code mode (where Fleet lives)

This page mirrors the in-app docs hub for app version 1.0.0-beta.26.1. Found something unclear or out of date? Tell us on Discord. New here? Download the free beta and follow along.