This file provides context for AI-assisted development with Claude Code.
TUI tool for managing multiple Claude Code, OpenAI Codex, OpenCode, GitHub Copilot CLI and Antigravity CLI sessions in parallel using tmux.
- Go 1.26+, Bubble Tea v2 + Lip Gloss v2 (
charm.land/.../v2),charmbracelet/x/vt(drawer's live terminal), tmux, SQLite (WAL mode)
make build # build to build/fleet
make run # go run
make test # go test -race
make fmt # go fmt
make lint # golangci-lint
make coverage # test coverage reportUse conventional commits. Version is auto-computed from commits:
fix: ...→ patch (v0.1.0 → v0.1.1)feat: ...→ minor (v0.1.0 → v0.2.0)feat!: ...orBREAKING CHANGE: ...→ major (v0.1.0 → v1.0.0)chore:,docs:,refactor:,test:,style:→ patch- Scopes are optional:
fix(hooks): ...,feat(ui): ...
- Each PR adds a fragment file:
changelog/unreleased/<name>.mdwithtype:frontmatter (added/improved/fixed/changed/removed) - Keep fragments concise: 1–2 sentences, lead with the user-facing change. No implementation detail, marketing tone, or exhaustive sub-points — a user skimming the release notes should grasp it at a glance. e.g. "Status updates now respond in ~150ms instead of up to 2s."
- Voice — fun via honest specificity, not hype. Fragments render in-app (Ctrl+K → "Release Notes", which formats
`code`+**bold**), so write for a reader: open each bullet with a bold 2–4 word headline so a release skims in one pass; write in second person ("You can now…", "Sessions now…"); name the annoyance you killed ("…instead of a cryptic 'Operation not permitted'"); numbers over adjectives ("~150ms instead of 2s");code-format keys/commands/paths (Ctrl+K,~/Documents); one idea per bullet; ban hype words (seamless, powerful, delightful, blazing). Full guide + examples:changelog/README.md. - Add
highlight: trueto a fragment's frontmatter to also surface it in the in-app What's New reel. The item still renders in its normal type section; the flag also copies it into a### Highlightsblock that leads the release (emitted byprepare-release.yml). Reserve for changes a user would be glad to discover — most fragments are not highlights. - Never decide
highlighton your own — always ask. When you write a fragment, ask the user (via theAskUserQuestiontool) whether it should be a highlight, and give a recommendation with your reasoning. A highlight leads the release in the What's New reel, so it's an editorial call about what deserves the user's attention — not a property of the diff, and not something you can infer from how big the change felt to implement. Default recommendation is no: most fragments are not highlights. Ask even when you're confident, and ask on the way in (when writing the fragment), not after the PR is up. - CI checks for fragment presence; comment
/no-changelogto skip - At release time, fragments are merged into CHANGELOG.md and deleted
- Comment
/shipon any issue or PR to prepare a release /ship 2.0.0to override the version- CI opens a release PR with changelog rolled — review and merge to release
- Merging the release PR triggers GoReleaser (binaries, GitHub Release, Homebrew)
- Install:
brew install brizzai/tap/fleetor runbash install.sh(requiresghCLI)
cmd/fleet/main.go # CLI entry point
cmd/fleet/add.go # `fleet add [path]` — session in an existing directory
cmd/fleet/session_launch.go # Shared by add + worktree: agent/account resolution, hooks, launch
cmd/fleet/worktree.go # `fleet worktree <branch>` — worktree + session from the shell
cmd/fleet/send.go # `fleet send <session> <message>` — message a running session from the shell (-wait: then collect the reply)
cmd/fleet/status.go # `fleet status` — live status of every session: prompt waiting on, unsent draft, branch, PR (--json)
cmd/fleet/read.go # `fleet read <session>` — last transcript turns, or the cleaned screen (--lines)
cmd/fleet/wait.go # `fleet wait <session...>` — block until done/idle/waiting/running; exit 0/2/3/4
cmd/fleet/control.go # `fleet answer|interrupt|submit|clear|restart|suspend|resume` — guarded pane actions
cmd/fleet/inspect.go # Shared by the agent-facing commands: state loading, rendering, JSON shape
cmd/fleet/skill.go # `fleet skill <install|uninstall|status>` — install the agent skill
cmd/fleet/instance_lock.go # One TUI per config dir (FLEET_ALLOW_MULTIPLE overrides)
cmd/fleet/pprof.go # FLEET_PPROF loopback-only profiling server
internal/ticket/ # Tracker-agnostic ticket layer: Provider interface, branch naming, seed prompt, image download, keychain store, ticket.md + meta.json, Materialize
internal/linear/ # Linear provider — GraphQL client, API-key + PKCE OAuth
internal/jira/ # Jira Cloud provider — REST v3 client, API-token Basic auth, ADF→markdown
internal/ticketing/ # The router the UI calls: registry, per-repo binding, key→provider resolution, fan-out
internal/git/exclude.go # .git/info/exclude writer (resolved via `rev-parse --git-path`)
internal/ui/ticket.go # TUI glue: materialize on create, infer from branch, status line
internal/ui/workspace_picker_ticket.go # ticket suggestions inside the `w` dialog's New branch field
internal/ui/connect_linear.go # Connect Linear dialog (browser sign-in or pasted API key)
internal/ui/connect_jira.go # Connect Jira dialog (site + email + API token)
internal/skill/ # Embedded SKILL.md + per-agent install targets (skill.go, SKILL.md)
internal/tmux/tmux.go # Tmux abstraction (create, kill, capture)
internal/tmux/pty.go # PTY-based attach with Ctrl+Q detach
internal/session/session.go # Session model, status detection, claude --resume
internal/session/copilot.go # Copilot status branch, conversation ownership, relaunch wait (copilot_name.go: titles)
internal/session/antigravity.go # Antigravity status branch (pane-led), conversation ownership, pane detectors, titles
internal/session/agent_process.go # Agent-process helpers: ownership by pid, relaunch wait for Copilot/Antigravity
internal/session/paneview.go # Reader's view of a pane: the prompt it waits on (Menu), the input box (draft vs suggestion), cleaned lines
internal/session/turns.go # Last N turns (prompt / closing reply / tool count) from a Claude transcript's tail
internal/control/ # Agent-facing observer: the TUI's status pipeline run one-shot over rows + hook files + one batched capture
internal/session/storage.go # SQLite persistence (sessions, shells, slot_bindings, pinned_repos, …)
internal/instancelock/ # flock-based one-TUI-per-config-dir guard
internal/sqliteutil/ # DSN builder for state.db + stats.db (per-connection pragmas, URI-safe path)
internal/envflag/ # One truthy rule (1/true/yes/y/on) for FLEET_NO_* and other env switches
internal/shell/shell.go # Shell model: non-agent drawer terminals + tmux-derived status (idle/running/exited)
internal/git/git.go # Git operations (branch, dirty, worktree)
internal/git/head.go # ReadHead: checkout root + branch from the HEAD file, no git fork (linked worktrees followed)
internal/git/repo_info.go # RepoInfo cache + refresh logic
internal/github/pr.go # GitHub PR info via gh CLI
internal/hooks/ # Hook-based status detection (claude_hooks, codex/opencode/copilot/antigravity hooks, hook_watcher, status_file)
internal/workspace/provider.go # Provider interface + GitWorktreeProvider + ShellProvider
internal/workspace/repo_config.go # Per-repo .fleet.json loading (legacy .bc.json supported) + ResolveProvider
internal/config/config.go # JSON config (~/.config/fleet/config.json)
internal/claudeaccount/ # Multi-account Claude: per-account CLAUDE_CONFIG_DIR + login, auth-status identity, /api/oauth/usage quota, assignment strategies
internal/ui/accounts.go # Accounts dialog (Ctrl+K → Manage Claude Accounts) + /login pane + quota poll
internal/ui/account_picker.go # Row-anchored "Move to Account…" picker (context menu → move_account)
internal/ui/accounts_header.go # Top-right per-account weekly-quota readout
internal/naming/naming.go # Auto-name sessions via smart heuristic (filler stripping, title-case)
internal/stats/ # Local personal analytics: stats.db recorder, transcript scan, Report/Recap (report.go is the UI contract)
internal/ui/stats_view.go # Stats screen (`i`) — pure renderer of stats.Report
internal/ui/stats_recap.go # Weekly "Your week" recap reel + header badge
internal/ui/stats_wiring.go # Recorder tees, scan goroutine, Report/Recap round trips, badge state
internal/debuglog/ # slog-based debug logging to ~/.config/fleet/debug.log
internal/diagnostics/diagnostics.go # System diagnostics collector for bug reports
internal/ui/ # Bubble Tea TUI (app, sidebar, preview, dialogs, styles)
internal/ui/palette.go # Theme palette definitions (5 built-in themes)
internal/ui/settings.go # Settings dialog (S key) — master-detail: Appearance/Behavior categories + live preview
internal/ui/sidebar_preview.go # Synthetic sidebar fixtures + RenderSidebarPreview (drives Appearance preview + onboarding)
internal/ui/onboarding.go # First-run theme picker + annotated "how to read the sidebar" sample
internal/ui/bugreport.go # Report dialog (! key): type picker → per-kind form, diagnostics, error history, action log
internal/ui/statusreport.go # Wrong-status branch of the report dialog: expected-status form + allowlisted issue body
internal/ui/actionlog.go # Ring buffer tracking user actions (steps to reproduce)
internal/ui/firstrun_trace.go # One-shot first-run action trace: vocabulary, recorder, debounced persist, send paths
internal/ui/errors.go # Ring buffer keeping error history (errors that flash and vanish)
internal/ui/keybindings.go # Centralized keybinding definitions
internal/ui/workspace_picker.go # Worktree dialog (base branch + new branch + existing worktrees)
internal/ui/workspace_create.go # Create workspace sub-dialog + PendingWorkspace phantom entries
internal/ui/command_palette.go # Command palette dialog (Ctrl+K) — fuzzy search over commands + repos/worktrees, renders as overlay
internal/ui/drawer.go # Terminal drawer (` key): render, slide animation, focus/key handling, shell lifecycle + live-stream wiring (syncShellStream → OutputReader + vterm)
internal/tmux/control_output.go # Control-mode %output reader (live shell streaming) + octal decoder
internal/vterm/vterm.go # Insulated charmbracelet/x/vt wrapper (drawer live rendering; strips ESC k titles)
internal/frost/ # Frost mode: freeze a rendered frame into a styled cell grid (x/vt replay) and run cell effects over it
internal/ui/frost.go # Frost mode trigger + tick loop
internal/chrome/protocol.go # Command/Response types, action constants, socket path
internal/chrome/native_host.go # Native messaging host with Unix socket bridge
internal/chrome/client.go # TUI-side client (connects to socket, sends commands)
internal/chrome/install.go # NMH manifest auto-install to Chrome's NativeMessagingHosts dir
chrome-extension/ # Chrome MV3 extension (service worker, manifest, icons)
Read docs/design-system.md before any UI work. It is prescriptive, not advisory.
The short version: focus > selection > mode, in that fixed order of visual weight, and a mode never fills. A background fill is the scarcest thing in the UI — spend it on the cursor and the caret. Roles live in internal/ui/design.go (SelectionPill/SelectionBand/SelectionMarker/ModeOn/ModeOff/FocusCaret/PrimaryAction/NewTextInput); build a style inline and you are inventing a fourth dialect. Background(ColorAccent) outside that file fails the build (TestAccentFillIsConstructedInOneFile), and so does a mode indicator that fills (TestModeNeverFills).
The doc also settles the three questions that kept getting answered ad hoc: pill vs band (sized by the filled region, ~40 columns), which presentation tier a new surface takes (full-screen / centered overlay with dimBackdrop / row-anchored dropdown with none), and whether a tab is a mode or a selection (does switching it move the keyboard?).
Styles in styles.go are declared bare and constructed only in ApplyPalette — an initializer alongside would be a second copy, and a style built in only one of the two silently keeps default-pink under every other theme.
- Tmux session prefix:
fleet_(agent sessions); drawer shells use a distinctfleetsh_prefix — intentionally not a prefix offleet_, so shells never leak into agent-session enumeration (tmux.ListSessions) - Session ID format:
<8hex>-<unix_timestamp> - SQLite DB:
~/.config/fleet/state.db - state.db and stats.db pragmas ride the DSN, never
db.Exec("PRAGMA …")(sqliteutil.DSN, called bystateDBDSNinstorage.goand bystats.Open; it also percent-encodes%/?/#in the path, which SQLite'sfile:URI parser would otherwise misread):busy_timeoutandforeign_keysare per-connection, andExecconfigures only the pooled connection it happens to get — every other one ran withbusy_timeout=0(instantSQLITE_BUSYthe moment another writer held the lock, measured 1359 of 1600 concurrent upserts) and with foreign keys off (theslot_bindingscascade unenforced)._txlock=immediateso a read-then-write transaction waits under the busy handler instead of hitting the lock-upgrade deadlock; pool capped at 4 like stats.db.TestEveryConnectionGetsThePragmas/TestConcurrentWritersNeverSeeBusypin both. The PR cache row is written only whenprCacheRowChanged(branch, origin,LastPRRefresh,PRRateLimitedAt) — it used to be rewritten for every repo every 2s — or when an earlier write failed (prCacheUnsaved, retried on the repo's next refresh, since the in-memory cache already holds the new value andprCacheRowChangedalone would never see it again). - One TUI per config dir (
internal/instancelock,cmd/fleet/instance_lock.go):flockon~/.config/fleet/tui.lock(holder pid written for the refusal message), taken inrunTUIbefore the auto-update — whose re-exec closes the fd (close-on-exec) so the new binary takes it afresh. Two TUIs each run every worker against the same panes, repos and DB (measured: doubled idle CPU, 145 of 200 log linesdatabase is locked). CLI commands never take it.FLEET_ALLOW_MULTIPLE=1overrides; a filesystem without flock logs and continues rather than refusing to start over the guard itself. FLEET_PPROF=127.0.0.1:6061servesnet/http/pproffrom the TUI (cmd/fleet/pprof.go) on its own mux, loopback only — a profile exposes process memory. Three checks: the address asked for, the address actually bound (localhostresolves through/etc/hosts), and the request's Host header (loopbackHostOnly, against DNS rebinding from a browser page). Started after the instance lock, so a refused second TUI never binds the port. For profiling a real fleet:go tool pprof -top http://127.0.0.1:6061/debug/pprof/profile?seconds=60.fleet worktree <branch>(aliaswt,cmd/fleet/worktree.go): the TUI'swkey as a CLI command — create the worktree, copy.claude/settings.local.json+copy_filesentries, start a session. Flags:--base(defaults togit.GetDefaultBranch),--path(defaults to cwd),--agent(defaults todefault_agent; validated explicitly —agent.Parsefalls back to Claude for anything unrecognized, so a typo would silently launch the wrong agent),--account(Claude account email; defaults to whateveraccount_strategypicks. Validated explicitly against the configured accounts — an unknown name errors rather than falling back, since the cost of a typo here is billing the wrong subscription. Rejected alongside a non-Claude--agent, which would silently ignore it),--no-session(print only the worktree path, socd "$(fleet worktree foo --no-session)"composes; conflicts with--agent,--accountand--prompt),--prompt/-p(the agent's first message —-p -reads stdin, sogh issue view 242 | fleet wt fix-242 -p -works; conflicts with--no-session). An explicitly empty-pis rejected rather than ignored:-p "$(gh issue view 999)"on a missing issue expands to nothing, and silently starting a promptless session reads as a broken flag (fs.Visitis what separates-p ''from an absent-p). Flags parse on either side of the branch (a loop peeling one positional perfs.Parse— a single Parse stops at the first positional and would rejectfleet worktree foo --no-session). It resolves to the main worktree (git.GetMainWorktreePath) before creating, so running it from insiderepo-fooyieldsrepo-bar, notrepo-foo-bar— same as pressingwon an origin header. It callsdebuglog.Init()first:debuglog.Logger's fallback writes to stderr, and the provider/Session.Startlog at Info, so without it the command spews slog lines over the user's terminal (fleet addnow does the same).- Initial prompt (
Session.InitialPrompt, set byfleet worktree -p,fleet add -p, and byfleet sendwaking a suspended session): the agent opens already working on it, because every agent takes a first message on its own command line (claude "<p>",codex "<p>",opencode --prompt "<p>",copilot --interactive="<p>", each also valid alongside resume/fork). The text never enters that command string.tmux.Session.Starttypes the launch command into the pane's shell, so an embedded prompt would be parsed by that shell —$(...)and backticks would execute, and a newline would end the command early. Instead the prompt ridestmux new-session -e FLEET_INITIAL_PROMPT=<raw>(agent.PromptEnvVar, set insessionEnv), which no shell parses, and the command carries only"$FLEET_INITIAL_PROMPT"— one argv element whatever it contains. Two tests pin this:TestBuildLaunchCmdNeverEmbedsPromptTextandTestInitialPromptTravelsInEnvNotCommand. Quoting only settles the shell; the agent's own argv parser is a second parser, and it reads a leading-as an option and exits — leaving a live session at a shell prompt with the message gone. So the prompt sits behind a separator that ends option parsing:-- "$FLEET_INITIAL_PROMPT"for Claude/Codex,--prompt="$FLEET_INITIAL_PROMPT"for OpenCode,--interactive="$FLEET_INITIAL_PROMPT"for Copilot (with a space, yargs reads the value as a fresh option).fleet sendexplicitly promises a message may start with a dash, and the suspended-wake path routes that message through here. One-shot: every launch path clears it on success viaconsumeLaunchOverridesLocked(which also clears the launch model/effort — see the next bullet) —Start,Restart(therkey, and the idle-suspend wake) andRespawnClaudeall build frombuildAgentCmd+sessionEnv, so a path that forgets silently re-asks the original task. Never persisted, or it would replay on every app restart. Kept on a failed launch so a retry still carries it. fleet add [path](cmd/fleet/add.go): a session in a directory that already exists — no worktree, no branch. Takes the same session-shaping flags asfleet worktree(-p/--promptincluding-p -,--agent,--account,--model,--effort), parsed with the same either-side peel loop, since a path is not free-form prose. The path is optional (defaults to cwd, likefleet worktree --path) but a barefleet addwith no arguments stays a usage error: it was one before, and a mistypedfleet addin the wrong tab would otherwise launch an agent wherever that tab happened to be. A-pprompt titles the session vianaming.GenerateTitle, settingTitleGeneratedexactly as the TUI's own fallback does — the agent's own title still overrides it later (that path checks onlyManuallyRenamed), while the worker stops regenerating an identical title fromFirstPrompt. It callsmigration.Run()anddebuglog.Init()beforesession.Open, both of which it previously skipped:session.Opencreatesstate.db, after whichmigrateConfigDirpermanently bails out ("both dirs have state.db") and still writes its marker, silently stranding abrizz-codeuser's sessions, pins and slot bindings iffleet addwas their first fleet command.cmd/fleet/session_launch.goowns whatfleet addandfleet worktreedo identically once they know where the session goes:resolveLaunchAgent(flag →default_agent, plus the PATH check),resolveLaunchAccount(the per-origin allowlist, explicit-account validation,claudeaccount.Select, theAllowedConfiguredsplit, the all-logged-out note,GuardConflictingAuth),installAgentHooks, andlaunchSession(hooks → fields →Start→SaveSession→PinRepo). It exists because the two had drifted:fleet addcarried a shorter copy of the account logic with no explicit-account branch, no note when the strategy couldn't rank, andGuardConflictingAuthcalled from inside the wrong branch — a second, weaker implementation of a policy whose whole point is that a mistake bills the wrong subscription. It also never installed hooks at all, so a CLI-created session had no status detection, and a failedSaveSessionleft an orphaned live tmux pane nothing pointed at. These helpers exit the process rather than returning errors — the shape of the code they were lifted from, kept so the move reads as a move; the cost is that the policy stays untestable and only review catches a change to it.- Launch overrides —
--modeland--effort(Session.Model/Session.Effort→agent.LaunchOpts), on bothfleet addandfleet worktree. One-shot on exactly InitialPrompt's terms, cleared by the same call (consumeLaunchOverridesLocked, renamed fromconsumeInitialPromptLockedwhen it widened), and never persisted — that is a decision, not an omission: the agents treat these as session-scoped (Claude documents--effortas non-persistent; Codex's/modelpopup writes its own config) and all of them let the user change model mid-session, so a value fleet stored would be re-imposed on the next restart and silently undo that choice. Unlike the prompt they ride in the command string, whichtmux send-keystypes into the pane's shell, so a value carrying;, a backtick or$(...)would be executed —agent.ValidateLaunchValuerejects anything outside^[A-Za-z0-9][A-Za-z0-9._/-]*$at parse time, before anything is created, and both commands call that one copy. The charset is sized against real values (opus,claude-opus-5,gpt-5.1-codex-max,anthropic/claude-sonnet-5,high,xhigh,ultracode); model ids change too fast for an allowlist, so shape is the check and the agent rejects an unknown name itself.--modelis--modelfor every agent and is passed through untranslated (each takes its own spelling). Effort is two spellings and one agent that has none, whichinternal/agentabsorbs:--effortfor Claude,--reasoning-effortfor Copilot (which, unlike Claude, exits on a value outsidenone|minimal|low|medium|high|xhigh|max, soguardEffortSupportedrefuses one at parse time viaagent.ValidEffort),-c model_reasoning_effort=<v>for Codex (whose value needs no quoting —-cparses it as TOML and falls back to the raw string, so a barehighsurvives the shell), and nothing for OpenCode. OpenCode has the concept, spelled--variant, and fleet shipped that spelling for exactly as long as it took a reviewer to run the binary: the option is declared on therunsubcommand, while fleet launches the default command ($0 [project]), whose builder declares onlyproject,promptand the network options — and OpenCode's root parser is yargs in.strict()mode, so an unknown option is not ignored, it prints the command list and exits. That would have produced a session fleet reports as created, with its row saved and its repo pinned, whose pane is a shell prompt with no agent — the failurepromptArgdescribes, which nothing in fleet detects at launch. Soagent.SupportsEffortis false for OpenCode and--effortis refused there rather than dropped, at parse time when--agentsays so and again inguardEffortSupportedoncedefault_agentis resolved (the same two-place check--accountneeds, and for the same reason: the parse-time guard can't seedefault_agent).BuildLaunchCmdre-checks as well, so a caller that forgets drops the flag instead of launching a command the agent refuses.--modelis unaffected — the default command's handler readsargs.model. Both are appended ahead of the prompt argument, since--ends option parsing and anything after it stops being read as a flag (TestModelAndEffortPrecedeThePrompt). Refused with--no-session, like-p/--agent/--account. fleet send <session> <message>(cmd/fleet/send.go): messages a session from the shell — the half of a session's lifecycle the CLI couldn't reach.<message>is every argument after the selector, joined; a lone-reads stdin. Flags must come before the selector (unlikefleet worktree, whose flags parse on either side): a message is free-form prose that can start with a dash, and the flag parser silently eating words out of what the agent receives is worse than requiring flag-first. Delivery isload-buffer+paste-buffer -p+ a separatesend-keys Enter(tmux.PasteAndSubmit), notSendLiteralKeys: literal keys make every newline its own Enter, submitting a multi-line message a line at a time, and the Enter must land after the paste's closing bracket to read as "submit" rather than as pasted text. Selector tiers, most precise first:@0-@9slot, exact id, exact title, workspace name, git branch (injected asbranchOfso the resolver stays pure — it's the only tier that shells out, hence last of the exact ones), id prefix, title substring. A tier matching several sessions is an error listing them, never a fall-through to a vaguer tier that happens to match one.fleet sendguards, in order — each exists because the pane is a typing surface, not an API: suspended → wake it (Restart()with the message asInitialPrompt, then persist the newtmux_session, status and any conversation idadoptResolvedLaunchIDjust healed — the TUI's worker re-persists that a moment later, but a one-shot CLI process exits first and would recompute and discard the heal on every wake); no tmux /pane_dead→ refuse; pane back at a shell prompt (shell.IsShellCommandovertmux.PaneCurrentCommand, after an explicitRefreshSessionCachesince the TUI's tick isn't running) → refuse, because/exitor a crash drops the pane to a shell where the message runs as a command — deliberately not-force-able; waiting (session.PaneIndicatesWaiting) → refuse unless-force, since text typed into a numbered menu is discarded and its Enter confirms the highlighted option.fleet sendstartup handling — a session is launched by typing the agent's command into a fresh pane, so "not ready" and "exited" look alike from outside and the naive one-shot read got both wrong. Two separate waits, because one signal can't cover it:waitForAgentInPanepolls up toagentStartupGrace(10s) for the pane to stop reading as a shell (measured process-start ranged 0.6s–7.4s; under-waiting madefleet wt … -p -immediately followed byfleet sendfail with a flatly false "has exited", and that branch isn't-force-able). That only proves the process started — the TUI then spends ~2.4s painting, and anything written to the pty in that window is discarded. No signal distinguishes it: the process name has already flipped, and waiting for the pane to settle fires ~2s early (measured: settles at 783ms, input box renders at 2972ms) because the screen sits static mid-startup. So readiness is never predicted —confirmDeliveredchecks the outcome, polling the pane for the message's whitespace-squashed first line (or Claude's[Pasted textplaceholder, since a multi-line paste is collapsed and never appears verbatim) and reporting an honest failure if it never lands. No auto-retry — a re-paste on a false negative submits twice. Costs ~65ms on a live session; a message under 6 chars skips the check, since a short needle would match by coincidence. That last check reads the pane, not the hook: granting a permission fires no hook, so the stored hook status stayswaitinglong after the user answered — stale in exactly the direction that would block legitimate messages. It returns false for OpenCode (no structural detector for its UI). Waking a suspended session prints a note that an already-open TUI picks the new tmux session up within a few seconds (see the relaunch bullet under external-session adoption).- Agent-facing control plane (
fleet status/read/wait/answer/interrupt/submit/clear/restart/suspend/resume): one-shot commands a supervising agent drives every session with, instead oftmux capture-paneand guessing. Observation reinvents nothing (internal/control.Observer): oneRefreshSessionCacheand oneBatchCapturePanesfor all sessions, then per sessionFromRow→ the hook file intoUpdateHookStatus→UpdateStatus— the TUI worker's own pipeline, read-only (nothing written to state.db;session.DisableCrashDumps, since every CLI invocation is a fresh "life" that would dump a dead session again). ~0.15s for 22 live sessions. Three gaps a one-shot observer has and the TUI doesn't, each closed with the TUI's own rules rather than a parallel one: (1) the stale-running-hook rule needs >10s of watched stable content, so on an observer's first lookSeedStableContentprimes that clock from tmux'swindow_activity— the fact the rule already defers to — for arunninghook only (in the waiting path the same clock means "changed recently" and would flip a fresh prompt to running); (2) answering a prompt fires no hook, so awaitingstatus with no prompt structurally on screen is reportedrunning— the pane-not-hook rulefleet send's guard already follows (not for OpenCode, which has no pane detector); (3) anObserveris kept across polls byfleet wait, so multi-frame state accumulates exactly as on the worker. Status words: a pane back at a shell readsexited; an acknowledged session readsidlewhere state.db may still sayfinished(the TUI'sAcknowledgeflips memory without persisting status — the CLI matches the screen, not the column). Suspended sessions are counted, not listed, without--all. Output is compact text by default, compact JSON (--json, no indentation — a third of the tokens) for structure. session.PaneView(paneview.go) is what a reader needs, kept apart from the classifier. Menus are parsed only when the agent's own waiting detector agrees (PaneIndicatesWaiting), so a numbered list in prose is never a prompt; numbered rows first, then unnumbered❯rows (Copilot's boxed menus, Claude's folder-trust dialog) viaparseBoxedMenu. Option rows read the left column only (the AskUserQuestion preview panel sits beside them), continuation lines go toDetailand stop at a side panel's indent or box edge.Subjectis the dialog's first dashed (╌) frame — the exact Bash command or the diff — and Claude'sTip:banner is dropped fromContext. Kind comes from the footer, with AskUserQuestion's "Esc to cancel"-only variant caught by its own rows (Type something.,Chat about this, a☐tab). The input box separates a typed draft from Claude's prompt suggestion by ANSI alone: both are the same characters, the suggestion is rendered dim (SGR 2), sovisibleRunesAllDimtracks the attribute — skipping reverse-video (the block cursor sits on the first character) and consuming extended colours whole (a38;5;2colour index is not dim). Claude only; the creature animation past a 20-space margin is cut.session.ReadClaudeTurnsreads a transcript's tail (256KB, doubling to 16MB until it holds one more prompt than asked) — transcripts run to hundreds of MB. A turn'sReplyis the text after its last tool call (narration between tools is not the answer);Donefromturn_duration, an interrupt, or the next prompt. Tool results are never decoded. The interrupt marker is matched structurally ("text":"[Request interrupted by user, unescaped quotes) and on a top-leveluserline: newer Claude Code writesapi-request-bloblines replaying earlier messages, old interrupt markers included, which otherwise marked the running turn interrupted.- Control verbs observe first, refuse anything that would type into the wrong place, act, then check the pane for the outcome.
answermoves with arrow keys and verifies the cursor landed on the asked option in the same prompt before pressing Enter (Enter confirms whatever is highlighted);--expectrefuses if the question no longer mentions what the caller read; multi-select and tab-focused prompts are refused.interruptrefuses a non-running session (Esc Esc on an idle Claude opens the rewind menu) and a prompt on screen (Esc there is "deny").clearisC-uthen (BSpace,C-u) per extra line, re-read between rounds — never Esc (interrupts a working agent; rewind on an empty box) norC-c(clears, but arms "press again to exit").restartrespawns in place when tmux is up (the TUI keeps its pointer), fullRestart()otherwise, and refuses to resume a Claude conversation with no transcript — Claude writes none until the first prompt, so--resumeon a never-prompted session fails with "No conversation found" and drops the pane to a shell — unless-fresh. The guard checksResolveLaunchID's id, the one the relaunch actually resumes, not the transcript status reads (which falls back to the row's id).-freshdrops the id in memory only;persistRelaunchwrites the empty id once the launch worked, so a failed one keeps the pointer to the old conversation.restart,resumeand thefleet sendwake refuse a session pinned to a removed Claude account (accountGoneErr): the launch would fall back to the ambient login and silently bill another subscription. The TUI'shealAccountBeforeRelaunchre-picks instead, but where to move depends on quota and login state that live only in a running TUI, so the CLI names the fix rather than guessing; logged-out and spent pins fail visibly in the pane and aren't checked.suspendpersists the conversation id the hooks reported before acting: with no TUI running nothing else has, andSuspenddeletes the hook file it came from, so the next resume opened a new conversation (caught live). It also writessuspendedto the row before the kill (restoring it if the kill fails), asSuspendmarks memory first: an open TUI that sees the tmux session vanish reads the row, and one still naming a live state had it log a crash and persisterrorover the suspend.removetakes the shared selector minus the title-substring tier. Errors name the fix (fleet restart <id>), andfleet send's now do too. fleet waitexit codes are interface: 0 reached (with-until done, finished cleanly), 2 timeout, 3 blocked on a prompt, 4 exited/errored; it returns early on 3/4 rather than sitting out the timeout, and prints the final reply. A state that already holds at the start counts only afterwaitSettle(3s), or once a hook in a strictly later second than the start lands (stamps are whole seconds, so a Stop from earlier in the send's own second would pass;UserPromptSubmitexcluded), or once the session was seen not matching — sofleet send …; fleet wait …never returns before the agent picked the message up (waitCounts). ASessionStartlatest hook counts only after settle: it maps to finished, and a launch or wake with a first prompt fires it just before that prompt'sUserPromptSubmit, after the relaunch already showed running — otherwisesend -waiton a suspended session returned the previous turn's reply. Rows are re-read every poll, so a session relaunched into a new tmux session mid-wait is followed rather than read as gone.fleet send -waituses the send time as that boundary with a 20s fallback.- Pipeline fixes the control plane surfaced, all in the shared status code: Claude's folder-trust dialog now reads waiting (its "Quick safety check" wording matched none of
approvalPatterns;Yes, I trust this folderadded); after a denied permission the session settles to finished instead of reading running for the whole 120sconversationActiveWindow— the deny's tool_result and interrupt lines are stamped after the waiting hook and read as the lead advancing, solastLeadTranscriptTimestampnow also reportsturnEndedwhen aturn_duration/stop_hook_summaryfollows the lead's last entry in file order (the timestamp itself is unchanged: bookkeeping still never moves it); andStripANSIdecodes runes before matching the 8-bit CSI, since0x9Bis also a UTF-8 continuation byte (▛U+259B) and was eaten along with the text after it. fleet skill <install|uninstall|status>(cmd/fleet/skill.go,internal/skill): installs the Agent SkillsSKILL.mdthat teaches a coding agent to drive fleet's CLI. Opt-in, unlike hook injection — hooks are load-bearing (no status without them), a skill is a convenience, and it costs its description in the context of every session in every repo, so it stays the user's call. Discovery isfleet -h(worded at agents: "runfleet skill installyourself, it never prompts") plus atipOncein the TUI. Never prompts and never reads stdin, so an agent can install it for itself in one call. Writes two roots, not four, because the agents overlap:~/.claude/skills(Claude Code; also read by OpenCode and Cursor) and~/.agents/skills(Codex, Cursor, OpenCode, and Copilot — which reads~/.copilot/skillsor~/.agents/skillsand is detected by binary only, since the VS Code Copilot extension creates~/.copilotwithout the CLI). Neither root alone suffices — Codex reads only.agents/skills, Claude Code only.claude/skills— and Cursor/OpenCode map to.agents/skillsso either one installed without Claude Code still lands somewhere it reads. Agents sharing a root share one write (rundedupes by path), so three selected agents don't race three writes at one file. Selection is by name, the operation is by path, and the report must follow the path —runacts in a first pass and reports in a second, so an agent the user didn't select whose file was written or deleted anyway (because a selected agent shares its root) reports what really happened, taggedSharedWithand rendered(shared with codex). Reporting it as skipped told an OpenCode user their skill was untouched in the same breath as deleting it. Read-onlyStatusdeliberately does not disclose sharing: nothing changed, so there's no side effect to own up to, and disclosing it would make an explicit-agentfilter look ignored. Frontmatter is restricted toname+description: that's the intersection every target accepts (Claude Code's packaging validator rejects unknown keys outright), andnamemust equal the install directory or the skill silently never loads —TestFrontmatterIsPortablepins both. Written via temp-file + rename because Claude Code watches skill dirs for live changes, so a partialSKILL.mdcan be read mid-write. Install defaults to detected agents; uninstall and status default to all (the copy worth removing or finding usually belongs to an agent the user has since uninstalled), and every verb honours-agent—statussilently dropping a valid filter would be the same swallowingresolveAgentsrejects for typos. Detection is binary-on-PATH, plus a config dir only where fleet never creates one:~/.cursorcounts (Cursor installs itscursorshim only on request),~/.codexand~/.config/opencodecount (their injections areLookPath-gated for exactly this reason), and~/.claudeexplicitly does not —NewHomecallsInjectClaudeHooksungated and itMkdirAlls the dir, so every fleet user has one whether or not Claude Code exists. Trusting it installed a Claude skill for Codex-only users. A skipped agent's printed reason re-checks detection rather than assuming: telling a Cursor user Cursor isn't installed, when they merely passed-agent claude, is a false claim about their machine. The TUI's tip samplesskill.AnyInstalled()once inNewHome, not from the tip'sactive()— that runs on the ~2s Update tick, where filesystem calls don't belong.- External-session adoption: the TUI reads sessions from SQLite exactly once, at startup (
loadSessions), so a session created by another fleet process would be invisible until restart.maybeSyncExternalSessions(heavy worker pass, self-throttled toadoptSweepInterval=5s) diffs the table against the cycle's snapshot via the pureunknownSessionsand sendsadoptSessionsMsg;handleAdoptSessionsre-checkssessionByID(the snapshot is taken at cycle start, so the Update goroutine is the only authoritative dedupe point) then mirrorshandleSessionCreateResultminusSaveSession/analytics. Removals ride the same sweep (externalRemovalsMsg, #304): a session is dropped from memory when its row is gone and its tmux is dead (goneSessions) — the liveness half is what spares a session this TUI just created, whose tmux is up before itsSaveSessionlands. Pinned checkouts whose directory no longer exists (missingDirs, a definite not-exist only) are hidden, never unpinned: moved frompinnedRepostomissingPinsin memory and restored when the directory returns, so a remount doesn't cost the pin — but only while SQLite still holds it (externalRemovalsMsg.pinned), since dropping out of the missing set also happens when the header delete unpins it. The message goes out every sweep, not only when the missing set changes: memory can drift while the set stays the same (unpin, thenubefore the next sweep).fleet removeitself still leaves its pin behind, likedon a session row; the hide is what clears a worktree deleted afterwards. Unlike a session the user just created, an adopted row arrives on a timer, so the cursor must not move: it's captured withtargetForCursor()and restored by identity viatarget.findafter the rebuild. No resurrection risk —deferDeletedeletes the SQLite row immediately, ahead of the 5s undo window. - External relaunch/suspend: another process (
fleet restart/resume, afleet sendwake,fleet suspend) can give a known session a new tmux session or suspend it, and the TUI used to keep pointing at the dead one — reading it as an error, and pressingrthere would start a second agent on the same conversation.relaunchedElsewhere(pure, besidegoneSessions) finds them, and direction is decided by liveness, not by which side differs: this TUI's own relaunch also leaves memory and row disagreeing until the row is persisted, but then memory names the live tmux session, while another process's relaunch leaves memory on a dead one and the row on a live one. Two paths apply it: the 5s sweep (sendExternalRelaunches→externalRelaunchMsg), and compare-before-clobber inupdateAndPersistStatus— a session whose tmux is gone on the way intoerrorfirst has its one row read (LoadSessionLaunch) beforeUpdateStatusruns, because that reads a missing tmux session as a crash and acts at once (a crash dump,session_errored), and the worker's persist oferrorwould erase a CLI suspend'ssuspendedwithin one fast pass, long before the sweep reads it. A session suspended here and woken elsewhere (fleet resume, afleet sendwake) is a relaunch like any other — this TUI's own suspend never renames the tmux session. Every adoption path skips a session with a relaunch in flight (Session.Relaunching): mid-Restartmemory already names a tmux session that isn't up yet, which is exactly what another process's work looks like. A change also carries the tmux name memory had when the worker diffed (fromTmux), and the handler drops it if memory has moved on since — this TUI relaunching the session between the sweep and the message would otherwise be overwritten with the CLI's tmux session, orphaning its own agent where no later sweep could see it (both tmux sessions are up).AdoptExternalRelaunchresets in-memory hook state without deleting the status file (by then it may be the new agent's), and restarts atstartingrather than trusting the row's status, which the worker may already have overwritten. In-place relaunches (respawn-pane, tmux name unchanged) need neither: hook ownership follows the new agent process once the old pid is gone. - Sessions grouped by git repo root in sidebar with tree lines (├─/└─)
- Status: Running, Waiting, Finished, Idle, Error, Starting, Suspended
- Status icons: ● (running/finished), ◐ (waiting), ○ (idle/starting), ✕ (error), · dim (suspended — same dot as idle; dim style + "suspended" label distinguish it)
- Agent glyph: each session row shows a dim, monochrome per-agent sigil between the status dot and the title —
✻Claude,◇Codex,△OpenCode,⚇Copilot,✧Antigravity (agentGlyph+AgentGlyphStyleinsidebar.go/styles.go); all are width-1 glyphs from well-covered Unicode blocks (Dingbats / Geometric Shapes — same block as the status dots;⚇is Misc Symbols, East-Asian-Neutral and present in Menlo;✧is Dingbats, Neutral, checked against Menlo's cmap) so they stay aligned in base mono fonts; identity is carried by shape so the status dot keeps sole ownership of color; empty/legacyAgentfalls back to Claude - Keybindings: j/k nav,
Shift+↑/↓jump to prev/next group header (origin or checkout — from a session row the nearest header above is its own checkout header, soShift+↑surfaces the current group before climbing out; clamps to the first/last row when no header remains, so it doubles as top/bottom),Ctrl+Shift+↑/↓the same motion one level up — origin headers only, so a repo with a dozen worktrees costs one press instead of a dozen (both sharenextRowMatching, so the "own group first" landing, the edge clamp and the out-of-range guard can't drift apart; needs a terminal that sendsCSI 1;6Afor the chord — iTerm2/Ghostty/kitty/WezTerm/VS Code do, Apple Terminal does not), Enter attach, Space jump to next waiting/finished,Pjump to the first session of the next checkout whose PR badge is red (CI failed / changes requested / unresolved threads / conflicts), else the next green one (approved + CI passed) — a collapsed checkout is expanded to reveal it, as Space does, and a checkout with no sessions lands on its header; the verdict isprVerdict, the same classifierprBadgeStylepaints from, so the jump can never land on a badge a different colour than it seeks; only checkout headers on screen are candidates (a collapsed origin hides its headers, muting it exactly as Space mutes its sessions; a collapsed checkout still shows its header), and snoozed checkouts — own deadline or origin umbrella — are skipped; drafts/merged/closed are never targets, and with PR badges turned off in Settings the jump is a no-op, since there is no badge to land on. Not a Space chord, though that was asked for:Ctrl+Spaceis macOS's "previous input source" shortcut on any Mac with two layouts, so the terminal never sees it, andShift+Spacearrives as a plain space — measured in Ghostty outside tmux (kitty flags=1,"space"for both) and through tmux — so it would silently fire Space's session jump instead;Alt+Spacetypes U+00A0 unless the terminal sends Option as Meta.Ppairs withp(open PR); like every uppercase command it is unreachable under caseless layouts (Hebrew/Arabic), whereCtrl+K→ "Jump to Next PR Needing Attention" is the escape, a new session (instant, repo-scoped, default agent), A new session with agent picker (Claude/Codex/OpenCode/Copilot/Antigravity) + Claude account picker (Autoplus each account with its 5-hour quota; the row appears only with 2+ accounts and goes inert on a non-Claude agent), n new session (any repo, path autocomplete), w new worktree session (base branch + new branch; works on a session, checkout header, or origin header — an origin header bases the new worktree on the group's main clone), F fork to worktree (Claude-only), d delete (scope follows cursor: session = that session; worktree header = sessions + git worktree remove; repo header = forget repo from fleet, folder untouched; empty repo header = unpin; origin header = forget the whole group, checkbox-gated), u undo delete (5s window), r restart (confirm, configurable), R rename, m mark session as unread (idle→finished), z snooze (scope follows cursor;zagain on a snoozed row wakes it), e editor, p open PR in browser,Ctrl+Pcopy PR link to the clipboard (same PRpresolves; copied via thecopy-commandtool —pbcopy/wl-copy/xclip/xsel; VS Code/Cursor's integrated terminal on Linux/Windows takesCtrl+Pfor Quick Open before fleet sees it, so thereCtrl+K→ "Copy PR Link" or the.menu is the escape — macOS is unaffected, Quick Open isCmd+P), Y quick approve (waiting sessions),.context menu for the row under the cursor (session rows include "Move to Account…"), / filter, Ctrl+K command palette,tmy tickets,iyour stats (winside it: weekly recap),`toggle terminal drawer, S settings, W what's new (release notes reel), X dismiss on-screen tip, ! report (wrong status / bug / feature picker, captures a status snapshot on keypress), ? help (sectioned + type-to-filter), ctrl+c quit - Non-Latin keyboard layouts (issue #239): a terminal reports the character the layout produced, not the key pressed, so under a Hebrew layout the physical
jarrives asחand every letter command falls throughhandleKey'sswitch msg.String()silently.internal/keylayoutholds one chart per layout (Hebrew, Russian, Arabic, Greek) written in the US-key → produced-character direction — the direction a keyboard chart reads, which is the only practical way to review it against one — and inverts them. The safety rule lives inbuildToUS, not in discipline: an entry survives inversion only if the produced character is non-ASCII. Every fleet binding is ASCII, so a hit can never shadow a key the user actually pressed; that's why callers need no "is this already bound?" check and why a Latin layout (AZERTY/QWERTZ/Dvorak) is provably untouched. The cost is that positions emitting ASCII on their own layout aren't remapped (Hebrewq→/, Greekq→;), and Arabicbcan't be (it produces the two-rune ligatureلا) — all three are asserted as documented gaps, so a real omission still fails the test.normalizeKey(internal/ui/keylayout.go) rewrites bothCodeandText:Key.String()returnsTextverbatim when non-empty, andString()is what every switch here matches on, so setting onlyCodewould pass a unit test and still dead-press in the app. Ctrl/Alt chords are skipped — they already carry a Latin letter on every layout. Two call sites, each placed so a text input is structurally out of scope rather than merely avoided: inhandleKeybelow the modal/launchpad/focus/filter/drawer branches, and inrouteToModalfor the 8 dialogs owning notextinput(TestNormalizedDialogsHoldNoTextInputparsesrouteToModalforUpdate(cmdMsg)calls and fails if a text-owning dialog joins them;TestFindTextInputDetectsis its positive control, since a blind detector would make it pass unconditionally). Deliberately never reachesforwardKeyToPane/handleFocusKey— those pushmsg.Textinto tmux, so a Hebrew user's shell must receive Hebrew. One exception, and it's a symmetry fix, not a convenience:handleTypingKeymatches the drawer's chrome on the US position (switch normalizeKey(msg).String()) because it intercepts keys above the remap — without it, Russianё(which sits on the backtick key) would open the drawer and then be typed into the shell, with nothing left that closes it. Only the chrome comparison is remapped; everything forwarded stays literal. Cost:ёreaches the shell only viaCtrl+Gfull attach, the same trade already made forCtrl+T/Ctrl+W(TestNonLatinKeyClosesDrawer). Caseless scripts (Hebrew, Arabic) send identical bytes forשandShift+ש— the shift isn't in the byte stream and no table can recover it — so the uppercase commands (A R S W X Y D F) stay unreachable by their letter there;Ctrl+Kand.are the layout-independent escapes. Russian/Greek carry capitals, except GreekW: shift+w and shift+s both emitΣandS(settings) owns it. - Terminal drawer (
`key): a collapsible panel holding plain non-agent "shells" (dev servers, log tails, scratch commands), scoped to the selected repo/worktree. Separate from sessions (internal/shell,shellsSQLite table) — never in the sidebar, no hooks/auto-naming. Placement is layout-aware (seerenderBodyinapp.go): in dual it splits the right column — preview on top, terminal below (lipgloss.JoinVertical), session list untouched and full-height; in single/stacked it falls back to a full-width band at the bottom that shrinkscontentHeight.renderDrawer(width, maxOuterH)clamps its outer height tomaxOuterH(in dual that'scontentHeight - drawerMinPreviewRows, so the preview keeps ≥5 rows). Renders as a bordered panel (fleet's panel vocabulary, accent border when focused) with tabs inset in the top border and a loud● TYPING → <shell>label top-right. The body is a live virtual-terminal emulator (internal/vterm, wrappingcharmbracelet/x/vt) fed by a tmux control-mode%outputreader (internal/tmux/control_output.go→OutputReader, attached per active shell, re-pointed on tab switch/restart): byte- and cursor-accurate, event-driven (no capture-pane polling), rendered each frame on the View thread.syncShellStream/startShellStreamAsync/teardownShellStream(drawer.go) own the reader+emulator lifecycle — the attach (atmux -C+ PTY fork) and teardown (Close= Kill+Wait) run off the Update goroutine (async dispatch →shellStreamReadyMsg, installed only if the requested target+size are still current;attachShelluses a synchronous teardown before its full-screen takeover). On attach the fresh emulator is seeded viacapture-pane(tmux.CapturePaneANSI→drawerSeedBytes): control mode replays nothing on attach, so without the seed the body is blank until the next output. The reader sizes the pane to the drawer body so wrap points match (renderDrawerrecordsdrawerInnerW/H), and the drawer is a stable-height viewport (capped bydrawer_height, clamped to[DrawerHeightMin,DrawerHeightMax]=[4,14]), not content-fit. The reader writes bytes into the mutex-guarded emulator and schedules a single coalescedshellOutputMsgrender wake (shellWakeCAS); a slowdrawerSyncIntervaltick is the lifecycle/resize backstop.vtermstrips screen/tmuxESC k … STset-title escapes that x/vt would otherwise leak as visible text. Always-typing, 2 states (drawerMode: hidden/typing — seeinternal/ui/drawer.go):`opens straight into TYPING (auto-creates a shell if the repo has none) — keystrokes forward to the shell pane via the focus-mode control client (forwardKeyToPane, which maps anyCtrl+<letter>→ tmuxC-<letter>so the shell's own line-editing keeps working;Escpasses through to the shell). No menu mode; chrome is a small set of Ctrl chords intercepted before forwarding:Ctrl+Tnew shell,Ctrl+Wclose (twice to confirm a running one, armed viadrawerCloseArmed),PgUp/PgDnswitch tab (plain or Ctrl-modified both accepted; chosen for reliable delivery — no modifier a terminal might swallow; costs the shell's PageUp/PageDown inside the drawer),Ctrl+Gfull attach (Ctrl+Q returns),`close drawer. An exited shell restarts onEnter(no live process to type to). Cost: the shell losesCtrl+T(transpose) andCtrl+W(delete-word) to the drawer. Status (○ idle / ● running / ✕ exited+code) derives from tmuxpane_current_command+ pane-dead, no hooks. Shell tmux sessions use thefleetsh_prefix; removing a worktree kills its shells first (killShellsForRepo) so the dir frees forgit worktree remove. Max body height viadrawer_heightconfig (default 12). - Session hotkeys (RTS-style):
Alt+0-9(or=then digit) binds the selected session to a slot; re-pressingAlt+<N>on a session already in slot N unbinds;==then digit clears any slot; plain0-9jumps to the bound session (double-tap within 400ms also attaches);[N]badge in sidebar marks bound sessions; bindings persist in SQLiteslot_bindingstable (FK cascade on session delete) - Help sheet (
?,internal/ui/help.go): 53 bindings grouped into sections (KeyBinding.Section, labelled byhelpSections), filterable by typing. Two facts forced this: thesessionblock is 23 entries, and every column was sized to the single widest binding in the table (colW = keyW + 2 + descWover all of them), so one 46-character description made two columns need ~130 terminal columns — at 80×24 the sheet was one column with 37 of 51 bindings off-screen, reachable only byj/k. Columns are now measured against their own contents (newHelpChunk), which is why the four slot bindings moved into their ownslotssection: they carried the two longest strings and were setting the width for every other key. The column count is chosen height-first (fewest columns that fit both budgets, falling back to the most that fit the width when nothing fits the height): a width-only search renders a two-hit filter as two one-row columns, which is what the pre-rewritecolsByHeightterm existed to prevent. Sections flow across column boundaries rather than pinning them — packing whole sections into columns would floor the sheet at the height ofsession(23 rows) and make 100×30 worse than before; a section split across a boundary repeats its header as… (cont.). Typing breaks the old "press any key to close" contract deliberately, and with itj/k/g/Gas scroll keys (scrolling is arrows / PgUp / PgDn / Home / End;escclears a filter before it closes the sheet, so one press never discards both). The⋮ +N above/belowscroll notes ride the separator rows the frame already has (the blank under the filter and the blank above the hint), so scrolling reserves no rows of its own — overflowing by k rows hides exactly k, and the frame is identical whether or not the sheet scrolls. A version that added two indicator rows on overflow turned the one row thePbinding added into three hidden bindings at 120×40 (TestHelpSheetHoldsTwoColumnsAt120pins both budgets: whole at 120×42, exactly one row over at 120×41). Headers drop while filtering, following the palette's rationale, and the section folds onto the row instead — load-bearing, not decorative:`,EnterandPgUp/PgDneach appear in two sections meaning different things, so a filtered list without the tag shows one key contradicting itself.routeToModalhands this overlay the raw key, not thenormalizeKey-remapped one, or a Hebrew user's search box would silently type Latin — which also moves it out ofTestNormalizedDialogsHoldNoTextInput's scan set, soTestNonLatinTypingReachesTheHelpFilterguards that direction instead. - Context menu (
.): a dropdown anchored to the sidebar row under the cursor (internal/ui/context_menu.go), listing the actions valid for that row kind — session / checkout header / origin header, seeded from the existingcursorBarContext()classifier. It adds no behavior of its own: each entry carries adispatchCommandaction id (buildContextMenuItemsinapp.go), so handlers, action-log entries, and analytics are inherited from the command palette's dispatcher. Three ids were added for it:delete_at_cursor(→deleteAtCursor(), the scope-follows-cursor delete thedkey now shares),toggle_group, andresume(a suspended row can'tattach— its tmux is gone). Actions that exist but can't run right now render dimmed with the reason and are skipped byj/k. Every such guard is a conjunction, so the note switches on which clause failed — a Claude session with no resume id yet saysno session id yet, notClaude only; a waiting session whose pane died sayssession not running, notnot waiting. A constant note there is a bug: it contradicts the status dot rendered next to it. The guards mirror the real handlers exactly, so a lit row can never dead-click. Each row shows its keybinding and pressing that key inside the menu fires it, making the menu a discovery surface that trains users onto the faster path — so a row's shortcut must be the key that actually works:resumeis pinned to a literal⏎becausehandleKey's suspended check runs above the split-mode Enter↔Tab swap, so Enter resumes in both modes. Renders via the palette's overlay pattern (View()returns a bare box, composited withoverlayAt) but withoutdimBackdrop— it's a small box beside its row, not a modal takeover. Anchored bycontextMenuAnchor()(sidebar content starts at y=2 in every layout: header row + panel border; +1 more whenviewOffset > 0adds the "… N more above" row); hangs below the row and flips above near the footer. - Context menu target (
contextMenuTargetinapp.go): the menu's entries all resolve their subject fromh.cursorat dispatch time, so the cursor must still be on the row the menu named. Keys can't move it (routeToModalfeeds them to the menu) but messages can —handleSessionCreateand the workspace-create handler both auto-select the row they just made, andrebuildFlatItemsruns on the tick. Since workspace creation is non-blocking by design, a session finishing while the menu is open would slide the cursor onto a different row anddwould confirm deleting a session the menu never named. So.captures the row's identity (targetForCursor) and thecontextMenuMsghandler re-finds it (focusContextMenuTarget) before dispatching, refusing if the row is gone. Two guard tests:TestContextMenuIDsAreDispatchableparsesdispatchCommand's case literals and fails if a menu id isn't handled (the dispatcher no-ops silently on unknown ids, so a rename would otherwise turn an entry into a dead click), andTestContextMenuDispatchFollowsTargetNotCursormoves the cursor under an open menu and asserts the action still hits the original row. - Command palette (Ctrl+K): renders as an overlay over the sidebar/preview (not a full-screen takeover); fuzzy-searches commands plus every repo/worktree currently in the sidebar (name, branch, full path all matched); picking a repo/worktree jumps the sidebar cursor to that header (auto-expand if collapsed); palette-only commands include "Reload All Sessions" (restarts all dead/error sessions). For a native Cmd+K feel on macOS, map Cmd+K → Ctrl+K in your terminal prefs (iTerm2: Profiles → Keys → Key Mappings → +; Ghostty:
keybind = cmd+k=text:\x0b). - What's New (
W/Ctrl+K→ "What's New"): a curated release-notes reel. An animated rainbow✦ What's Newbadge (internal/ui/whatsnew.go→renderWhatsNewBadge: a static Lab-blended ROYGBIV rainbow (lipgloss.Blend1D) with a narrow glint sweeping letter-by-letter,whatsNewFrameadvanced by a ~60mswhatsNewTickMsgloop that self-reschedules only while visible — no idle CPU) composites at the top-right of the header (overlayAt,x=width-w-1, y=0) inView(), gated onhasUnseenWhatsNew && !modalOpen(). Content is the existingReleaseNotesDialoginwhatsNewmode: only each release's### Highlightssection, for releases newer than the seen version and withinwhatsNewWindowDays(7) — shared predicateisUnseenHighlightkeeps the badge and the reel in agreement. Opening either view marks seen (config.ReleaseNotesSeenVersionviaMarkReleaseNotesSeen, seeded to the running version on first run so fresh installs aren't nagged) → badge clears. Releases load once at startup (loadReleaseNotesfromInit) so the badge computes without opening the dialog. Highlights only exist from the first release shipped after this landed (older releases carry no Highlights section). The full "Release Notes" view hides the duplicate Highlights block. - Contextual tips: a bottom-right hint box surfaces actionable tips when a condition holds (catalog in
internal/ui/tips.go→tipRegistry). Two policies:tipRecurring(condition-driven, e.g. ≥4 error sessions → "Reload All Sessions" hint; dismissal is in-memory and the tip recurs when the condition repeats) andtipOnce(no recurrence, e.g. command-palette discovery; auto-expires aftertipOnceBudgetand is persisted in configseen_tips). A teachingtipOncemay also setLearnedKey: once the user has invoked that featuretipLearnedThreshold(5) times — counted in configfeature_usageviaConfig.NoteFeatureUsed, bumped at the feature's call site (e.g.Ctrl+K, drawer open) — the tip retires for good even if never seen/dismissed (tipLearnedgate inrefreshTips).refreshTipsruns on the ~2s tick;Shift+X(dismissActiveTip) hides the visible tip; rendered viarenderTip+ bottom-right overlay (stacked above any toast), suppressed while a modal is open (modalOpen) - Undo delete:
ukey restores last deleted session within 5s window (stacked — multiple deletes each undoable). Tmux kept alive during window for full restore. - Pinned repos: repos auto-pinned on session creation, persist in SQLite. Empty repos show dimmed with "(empty)".
don empty repo header unpins it. - Delete scope follows the cursor (single-purpose
y/nconfirm, no extra buttons):don a session deletes only that session;don a worktree header deletes its sessions + runsgit worktree remove+ unpins;don a real-repo header "forgets" the repo (deletes its sessions + unpins, folder untouched);don an empty real-repo header unpins instantly (no dialog). Worktree-vs-repo detected via cachedRepoInfo.IsWorktreeRepo, falling back to a directgit.IsWorktreecheck for empty headers the worker hasn't cached yet. Header deletes route through the same deferred-delete machinery, souundo works (LIFO, per-session). - Origin-row delete (
don the top-level origin header): forgets the whole group — every checkout under the origin (main repo + all worktrees) and their sessions. Because it wipes a group at once, the confirm dialog is checkbox-gated (ConfirmDialog.RequireCheckbox—spacetoggles◉,y/Enterinert until ticked).confirmDeleteOrigingathers checkouts viacheckoutsForOrigin(scans sessions + pinned + pending, deduped — works even when the origin is collapsed) and fans out todeferDeleteRepoper checkout, so each follows its own rule andu-undo still works. Whether worktree dirs are also removed from disk follows theorigin_delete_removes_worktreesconfig (default true; main repo folder always kept). - Worktree removal kills holding processes: leftover dev daemons (process-compose, air, vite/node) that detached from the tmux pane pin the worktree dir and make
git worktree removefail with "Directory not empty". Before removing,destroyWorktree(app.go) finds holders viainternal/proc(platform-split discovery:lsof -Fpcnon macOS inproc_darwin.go, a native/proc/<pid>/{cwd,exe,fd}walk on Linux inproc_linux.go; shared prefix-match + kill policy) and SIGTERM→grace→SIGKILLs them — sparing a denylist (editors, language servers, shells, tmux, fleet, ssh).GitWorktreeProvider.Destroyfalls back toos.RemoveAll+git worktree prune(package mutex serializes concurrent removes). The delete dialog pre-lists warnings: uncommitted-changes (from the git cache, then re-checked live by the async scan — see the git cadence bullet), running-session count (instant from cache), and an async "Will terminate N process(es): …" line (ConfirmDialog.StartScan/SetScan, gen-guarded;yis held until it lands). If removal still fails, the worktree is re-pinned + flagged✕ removal failed — d to retry(failedWorktreeRemovals), sodretries. tmux.RespawnPaneruns its command asexec <command>: tmux hands a command string to/bin/sh -c, and Debian/Ubuntu's dash forks it instead of becoming it, so after any in-place restart (r,fleet restart) the pane's foreground process readshfor the agent's whole life —fleet statuscalled it exited andfleet sendrefused it. macOS's sh already execs. The command must therefore stay a single simple command (TestRespawnPaneLeavesTheCommandInTheForeground, which fails on Linux CI without the exec).- Tmux status bar configured per session with detach hint (ctrl+q)
- Attach uses PTY with Ctrl+Q intercept for clean detach (creack/pty + golang.org/x/term)
- Copy-to-clipboard: a copy-mode selection (drag, double/triple-click, keyboard copy) reaches the system clipboard via
tmux.EnsureCopyCommand→set-option -s copy-command <tool>—pbcopyon macOS; on Linux the first usable ofwl-copy(needsWAYLAND_DISPLAY) /xclip/xsel(needDISPLAY), display vars read from fleet's own env — the proxy for the client sessions get attached from (clipboardCopyCommandFor); with no display-reachable tool nothing is set, since tmux's defaultset-clipboard externalalready OSC-52s copy-mode selections. tmux's default copy bindings runcopy-pipe-and-cancelwith no arg, which pipes tocopy-commandand emits OSC 52 (set_clip=1) — the two are independent, not a fallback chain, so acopy-commandthat fails does not by itself lose the copy (onlyset-clipboard offdoes, by suppressing OSC 52).copy-commandstill matters because OSC 52 is what iTerm2 blocks by default and Apple Terminal doesn't support: a local pipe is terminal-independent.copy-commandis a server option (fleet shares the user's tmux server, no dedicated socket), so it's set only when unset, leaving a user's owncopy-commandalone; it re-checks the live server on each call (no process-level cache) so a tmux server created fresh after a restart still gets it. SetFLEET_NO_COPY_COMMAND(truthy) to opt out entirely — e.g. when deliberately relying on OSC 52 (remote tmux → local clipboard over SSH). Called fromStart(server exists) + the startup bootstrap (existing-session users) - Extended keys (Shift+Enter):
tmux.EnsureExtendedKeysturns on tmuxextended-keys(+ appendsxterm*:extkeystoterminal-features) so modified keys — most visiblyShift+Enter— reach the agent as a distinct sequence instead of collapsing to a bare\r; with tmux's defaultextended-keys off,Shift+EnterandEnterare the same byte, so Claude submits instead of inserting a newline. The pane sees\x1b[27;2;13~, not CSI-u\x1b[13;2u:extended-keys-formatdefaults toxtermand fleet deliberately leaves it alone (Claude accepts both, and the format is another shared-server option fleet doesn't own). tmux only sends the extended form to an app that requested mode 1/2 — Claude requests it wheneverTERM_PROGRAMis on its allowlist, and tmux setsTERM_PROGRAM=tmuxinside the pane, so the request fires regardless of the outer terminal (pane_key_modeshowsExt 2when it worked). Both are server options (fleet shares the user's tmux server):extended-keysis set toonunless it's alreadyon/always— and since tmuxshow-options -svreturns the effective value (not empty-when-unset), this also overrides an explicitextended-keys off(useFLEET_NO_EXTENDED_KEYSto opt out); the exactxterm*:extkeysentry is appended toterminal-featuresonly when absent (no duplicate piling, and not fooled by anextkeysfeature on a different pattern likescreen*:extkeys). The append is load-bearing only for terminals tmux can't name:tty_default_featuresauto-detects iTerm2/XTerm/mintty (all of which already carryextkeys) off XTVERSION, but Ghostty is absent from every shipping tmux (3.5a/3.6/3.7 — master only). Necessary but not sufficient — the outer terminal must honor xterm'smodifyOtherKeysmode 2. iTerm2 does, unconfigured; kitty never will (it refusesmodifyOtherKeyson principle and tmux ignores kitty's own\x1b[>1urequest), so kitty needs a manualmap shift+enter send_text all \x1b[13;2u. Claude's/terminal-setupis not the fix for iTerm2/Ghostty/kitty/WezTerm — per Anthropic's docs it targets VS Code/Cursor/Alacritty/Zed. Version-gated (extendedKeysSafe): skipped on exactly3.5(Alt+Backspace emits invalid bytes, Shift keys mis-encoded — tmux#4146/#4156, fixed in 3.5a) and on all of3.6/3.6a/3.6b(a fast key burst trips the assume-paste path and leaks the terminal's raw^[[27;…~bytes into the pane — tmux#5031, fixed in 3.7; Ubuntu 26.04 ships 3.6a). Both bugs live in the parser for keys arriving from the outer terminal — dead code whileextended-keysis off, so they're bugs fleet would be handing users, on their own tmux windows, with nothing pointing back at fleet. tmux ≤3.4 requests mode 1 (Eneks=\E[>4;1m), so it likely gets no Shift+Enter benefit while still taking the server-wide change. Re-checks the live server each call likeEnsureCopyCommand; called fromStart+ the startup bootstrap. The bootstrap path flips the option under already-running agents, which only record their mode request whileextended-keysis on — an existing session can eat aShift+Enteruntil it's restarted. SetFLEET_NO_EXTENDED_KEYS(truthy) to opt out — e.g. a terminal whoseShift+Enteryou've bound differently, or a remote tmux you don't want reconfigured - Hyperlinks (Cmd+click):
tmux.EnsureHyperlinksappendsxterm*:hyperlinksto the server'sterminal-features(tmux ≥3.4,hyperlinksSupported; called fromStart+ bootstrap likeEnsureExtendedKeys). Both go throughensureTerminalFeature, which compares whole entries line by line (hasTerminalFeature) — a substring check would letscreen*:extkeyssatisfyxterm*:extkeys. The version gate is best-effort: the version is read once per process, so a first read before any server exists treats tmux as new, and a pre-3.4 server then rejects the set-option, whose error is ignored. tmux forwards OSC 8 only to a client it believes supports it, and auto-detects that only for terminals it can name — nested setups never qualify (measured under zellij: client featuresbpaste,ccolour,clipboard,cstyle,extkeys,focus,RGB,title, links stripped to text). Applies to clients attaching afterwards.FLEET_NO_HYPERLINKSopts out. Shift+Enter under zellij can't be fixed from the tmux side (zellij doesn't pass modifyOtherKeys through); atipOnce(zellij_shift_enter) points at the zellij binding instead — sending CSI-uESC [13;2u, which tmux parses as Shift+Enter when it arrives from the outer terminal (and then re-encodes for the pane inextended-keys-format). Gated inNewHomeonZELLIJandtmux.ExtendedKeysUsable(): on tmux 3.5 / 3.6.x fleet leaves extended keys off, so the binding couldn't work there; the tmux half is asked only under zellij. - Warp can't drag-copy at all: Warp doesn't deliver mouse drag-selection to terminal apps (no tmux entry into copy-mode), so neither
copy-commandnor any tmux binding helps — unfixable from our side.ApplyStatusBarshows an amber "⚠ Warp doesn't support drag-to-copy (Warp bug)" on the bottom-right whenisWarpTerminal()(TERM_PROGRAM=WarpTerminal) mouse on(set per session) is required for scroll: Claude/Codex render to the main screen (not the alternate screen), so withmouse offthe wheel scrolls the outer terminal's scrollback (stale frames) instead of session history. Cost ofmouse onis that native click-drag selection needs a terminal modifier (Shift; Option in iTerm2)- Mouse (
internal/ui/mouse.go): fleet reports the mouse in cell-motion mode (DECSET 1002 + SGR 1006), set on thetea.ViewbyHome.chrome. Click a sidebar row to select it, double-click to activate it (activateCursorRow, the literal body of the Enter handler, so attach / resume / focus-split / toggle-group can't drift from the key), wheel to scroll, and click an entry in the context menu, command palette, snooze picker, account picker or allowed-accounts editor to run it.FLEET_NO_MOUSEopts out, likeFLEET_NO_COPY_COMMANDandFLEET_NO_EXTENDED_KEYS. Reporting was deliberately off until now (#268) and the reason has not gone away: v2's eventLoop callsView()after every message and there is no click-only mouse mode, so one trackpad flick is ~300MouseWheelMsg/sec, each buying a full compose — measured at 220% CPU. Two things hold it off, both inUpdate/Viewrather than in any handler: a mouse message is the only kind that does not markviewDirty, so an event nothing acted on is served the cached frame (Home.screen); and one that does act repaints at most once permouseRepaintInterval(16ms) with a trailingmouseSettleMsgso the settled state still lands. The wheel scrollsviewOffsetand never the cursor — every cursor move firesfetchPreviewForSelected, which forks atmux capture-pane, so a wheel bound to j/k would fork hundreds of processes per flick; scroll to look, click to select. Geometry is recorded at render, never re-derived:renderBodywritesh.layout.sidebarper layout branch (all three put content atsidebarContentTop=2, the constantcontextMenuAnchorinverts) andcomposeScreenwritesh.layout.overlaywhere it already knows the box's x/y. Row maps are built by each dialog's ownViewas it emits rows (overlayRowMap) because the palette interleaves section headers, arecentlabel and blank spacers with its results — nothing but that loop knows which line a row got, andsidebarWindowis shared withRenderSidebarfor the same reason (the… N more belowindicator sits exactly on the first index a naiveviewOffset + rowreturns). Activation is the dialog's own key, returned byClickRowAtand replayed throughrouteToModal: enter in a menu, space in the allowed-accounts editor (where enter saves, so a menu-style click would store whatever happened to be ticked), and nothing on the snooze dialog's custom-duration row (enter there means "snooze for what I typed" and the box is empty when you click into it). A click outside an open overlay closes it via its own Esc; nothing falls through to the sidebar behind, which is still painted because the dropdowns deliberately don't dim. Clicks are inert while the drawer is typing or a split is focused —j/kcan't move the sidebar there either, and a click that did would point the highlight at one session while the keys go to another; the wheel stays live, since scrolling is looking. Drag, motion and release are swallowed. Not covered: full-screen dialogs, the preview and drawer bodies (neither has scrollback), and drawer tabs - macOS TCC-blocked folders: sessions/shells under
~/Documents,~/Desktop,~/Downloadsfail with "Operation not permitted" because tmux daemonizes into its own TCC "responsible process" and loses the terminal's Full Disk Access grant (unfixable from our side — the access happens in the tmux server, and there's no API to request a folder prompt for a CLI). fleet probes actual access lazily viatmux.DirAccessBlocked(arun-shelllsinside the server, so it reproduces the pane's attribution — not fleet's own process; cached per protected root per launch inhandleSessionCreate/forkSessionMsg/createShell) and surfaces atipRecurring(tipTCCBlockedID) pointing to aCtrl+K → "Open Full Disk Access Settings"command that deep-links the FDA pane. Opt out withFLEET_NO_TCC_WARNING(remote-tmux/SSH) - Idle-session suspend (memory-pressure hibernation): a full fleet of
claude --resumeprocesses (~400MB each) can exhaust RAM/swap and get the shared tmux server OOM-killed — taking every session down at once. The background worker's heavy pass runsmaybeSuspendIdleSessions(throttled ~20s vialastSuspendSweepAt): it probesperfwatch.MemoryPressure()(platform-split: macOSkern.memorystatus_vm_pressure_level, Linux PSI/proc/pressure/memory— better OOM signals than "Pages free") plus free swap, where low swap escalates to critical per platform rules (SwapEscalatesPressure: trusted outright on macOS's demand-grown swap; on Linux only corroborating a PSI warning, since fixed partitions sit partially used on healthy boxes) and hibernates the most-idle sessions. OnlyStatusIdlesessions are ever auto-suspended (never running/waiting/starting/finished). Suspend =Session.Suspend():clearHookState+ kill the whole tmux session (frees agent process and the server's pane buffers) + setStatusSuspended;ClaudeSessionIDis persisted so the conversation survives. Resume is lazy — Enter on a suspended row runsresumeSelected→Restart()(recreates tmux +--resume <id>) then attaches. Aggressiveness viasession_suspend_modeconfig (GetSessionSuspendMode, defaultlight): off / light (critical pressure + idle>24h) / balanced (warning+ pressure + idle>4h) / aggressive (warning+ pressure + idle>1h). Every mode gates on memory pressure — nothing is suspended on a healthy machine — seesuspendIdleThreshold.StatusSuspendedshort-circuits at the top ofUpdateStatus(its tmux is intentionally gone, so the liveness gates would otherwise flip it to error + crashdump);UpdateHookStatusignores the killed agent's SessionEnd death-rattle while suspended. Excluded fromreloadAll(never auto-revived) and status-summary pills (like idle). Palette: "Suspend This Session" / "Suspend Idle Sessions Now". First auto-suspend fires a one-time tip explaining what happened (suspended rows render a dim idle-style·, so the tip keeps it from reading as a crash). - Snooze (
z): an attention mute with a deadline — 30m / 1h / 4h / tomorrow 9am, or a typed duration (15m,30h,2d). Deliberately not a Status and not Suspend. Not a status because a snoozed session that is waiting is still waiting; overwritingStatuswould destroy that and force reconstructing it on wake. Not Suspend because snooze never touches the process (Suspend answers "free my RAM", snooze answers "stop nagging me"), which is what makes it safe to snooze a running session. So it's an orthogonal deadline that only the attention surfaces consult: theSpacerotation (findNext), the status pills, and the row's dimming. Precedence lives in exactly one place —snoozeState(internal/ui/snooze.go): origin umbrella → checkout umbrella → the session's own deadline.BuildFlatItemsresolves it once per session and stampsSidebarItem.Snooze, so no downstream caller re-derives it (the jump scan and the pills both read that field). A session's own snooze runs independently underneath a group's, so it survives the group waking. Group snooze is an umbrella, never fanned out onto sessions — stored in thesnoozed_groupstable keyed in the same space ascollapsed_groups(origin:<key>/ repo path), which is why a session created after the snooze is muted too. Snoozing a group also collapses it (setExpanded(key,false)); waking re-expands, symmetrically. Only the group holding the snooze renders a countdown — children carry a bare☾so N of them don't repeat one number N times. Marker is☾U+263E, not the more obvious⏾U+23FE: Menlo (macOS Terminal's default) has no U+23FE glyph and renders a fallback box — the same failure that got U+2B21 rejected for the agent sigils. The suffix comes out of the title's width budget (reserveinrenderSessionItem) rather than bumping the constant, since it's present on only some rows. Expiry rides the ~2s Update tick (maybeWakeSnoozed, throttled 15s vialastSnoozeSweepAt) — not the worker, unlike the idle-suspend sweep, which lives there only because it probes memory pressure; keeping snooze on Update meansh.groupSnoozeneeds no lock. Expiry is a reminder, not just the mute ending: a session whose own deadline lapses while it sits idle is flagged unread (themflip, idle→finished, viaexpireSessionSnooze→flagUnread) so it re-enters the rotation — expiry only (a manualzwake goes throughclearSnoozeuntouched, since you're already on the row) and session scope only (a group wake never fans out onto its children). Deadlines that lapse while fleet is closed are reconciled in the startup handler for both sessions and groups;FromRowdeliberately keeps a lapsed session deadline so that handler can see it and persist the clear — it used to drop it in memory only, which left a dead deadline in the row, harmless until the wake carried a side effect, at which point it would re-fire on every launch. That path runs before the hook watcher has seeded anything, so unlikemthe flip is not gated on hook state: on a never-run session it simply doesn't stick. The duration picker (SnoozeDialog,internal/ui/snooze_dialog.go) is a row-anchored dropdown composited viaoverlayAtlike the context menu (nodimBackdrop), holding the four presets plus a free-text duration. The input is the row below the last preset (focusindexes presets, withlen(SnoozeDurations)meaning the input), so↑↓/tabwalk the whole dialog as one selection andEnteralways acts on whatever carries the highlight — the highlight is the promise.setFocusmoves the text input's own focus in step, so the caret only blinks where the highlight is. Typing from a preset row jumps to the input and keeps the keystroke (isTypingKey), so the fast path (open, type2d,Enter) never needs the arrows. A focused-but-unparseable box refuses rather than falling back to the highlighted preset.parseSnoozeDurationtakes a single unit only (15m/30h/2d, capped at 30d): deliberately nottime.ParseDuration, which accepts combos and seconds we don't offer and has no notion of days, so its errors would describe a syntax fleet doesn't have. Its error strings are user-facing — they render live in the box. The box is fixed width and height (contentW); the verdict line swaps between the key hint and the resolved wake time, and a hint long enough to wrap would grow the box a row mid-keystroke (TestSnoozeDialogHeightIsStablepins this). Preset rows pad the raw text before styling — padding a styled string counts the ANSI bytes and the columns come out ragged. Sidebar-only by design: no global count, no wake toast. - Repo headers show branch name (), dirty indicator (*), and PR badge (#N)
- Stats (
i/Ctrl+K→ "Your Stats";internal/stats+internal/ui/stats_*.go): local-only personal analytics in~/.config/fleet/stats.db(its own file, so "reset my stats" is deleting it; WAL). Scope is fleet sessions only — turns are backfilled from the transcripts of sessions fleet launched (joined via every Claude id a session has had, so a/clearrotation doesn't orphan history), never all Claude usage on the machine. Forks must not count their parent twice, which took three guards: a turn that starts before its fleet session'screated_atis dropped at load (a--fork-sessiontranscript copies the parent's history); a Claude id maps to its first owner (claude_idsis insert-or-ignore, because a fork's first SessionStart reports the parent's id and a last-writer-wins upsert handed the parent's transcript to the fork); and the scan reads one file per Claude id, the largest (a fork into another cwd stages a frozen copy of the parent's transcript under the parent's id). The in-fleet half comes from recorder tees:recordStatusbeside every persisted status change (updateAndPersistStatuson the worker, suspend, resume, restart,flagUnread),RecordAttachin the attach callback,NoteSessionon load/create/adopt and on a new Claude id, andrecordStats(stats.Action*)for fleet actions —logActionmaps throughstatsActionFor, a fixed table read by action name only (unmapped actions record nothing); actions logged before their own guard runs (quick approve, mark unread, open PR, copy PR link, open editor) are deliberately absent and record where they succeed — thequickApproveMsg/openPRMsg/copyPRLinkMsg/openEditorMsghandlers onerr == nil, andmarkUnreadSelectedpast its guards (notflagUnread, which snooze expiry also calls) — or aYon a running session counted as an approve, plus direct calls at Space/P/slot jumps (throughrecordStatsJump: counted only when the jump lands on a different row than the cursor started on, and a press withinstatsRepeatWindow(300ms) of the previous press of the same key — counted or not, so a held key is one jump however long it's held — continues that burst; terminal auto-repeat once turned a held Space into 942 "jumps" in a day), palette/help opens, rename, confirmed deletes, session and worktree creation. The recorder never blocks (drop-on-full queue, one writer goroutine) and every method is nil-safe, so a stats.db that fails to open costs only the feature. Privacy line: stats.db holds enums, ids, numbers, timestamps, model names and repo base names — never prompts, titles, message text, tool input or paths (a transcript is keyed by a hash of its realpath, since the path spells out the home dir and the project's cwd) — and nothing in it ever passes throughinternal/analytics. Opening Stats is not recorded: pressingimust not inflate the numbers it opens. The first-run screen is chosen on content, not coverage (statsReportEmpty: no turn, no measured reply, no active day in the heatmap year) — status changes start the recording clock and loading the sidebar notes every session before the user has done anything. The transcript scan runs on atea.Cmdgoroutine of its own, never the status worker (whose 90s stall budget is spent on git/gh) and neverUpdate: 10s after launch and on every Stats open (incremental by byte offset, ~20ms warm), progress throttled to ~10/s and skipped during an attach (h.sendis a rendezvous the attach suspends). Reports and recaps compute off-goroutine after aFlush, guarded per range by a generation counter. The "Your week" badge is the only push surface: after each scan, and on the tick once the week rolls over (maybeRecapNewWeek— instances run for days), the last full Mon–Sun week's recap is computed, and if it has cards and its Monday ≠stats_recap_seen_weekthe badge takes the What's New corner (What's New wins when both are due; hidden while a modal is open), sized to the room the breadcrumb leaves — it drops· press i, then itself, rather than overprint a title. It advertisesi, soiwith the badge up opens Stats with the recap on top; opening the recap marks the week seen. Recap cards copy withcthroughtmux.CopyToClipboard, leaving out the lines that name repos (RecapCard.RepoLines) unlessris toggled — repo and worktree names often carry client or ticket names, and a card is copied to be shared. The concurrency curve plots each bucket's peak, not its mean: a 6-hour bucket's mean sits under 1 and never reaches the peak the hero reports. Layout is a card grid (statsGrid): roundedColorBordercards with dim titles inset in the top border tile the full width (uncapped — a capped grid floated inside a full-width frame whose title and hints no longer shared its edges), columns pack greedily and wrap by width (a last row left holding one card steals the previous row's last one, rather than stretch a lone card across the screen), cards in a row share a height with a short stack's slack split evenly between its cards, and a card with no data is left out rather than drawn empty (hero tiles keep an honest—). No card should be mostly blank, which took three rules: which cards share a row under the chart is chosen, not fixed —statsLowerLayoutsoffers a handful of arrangements (everything in one row; records and fun facts stacked or side by side; the notes in a row of their own) andstatsBestGridkeeps the one stranding the fewest blank card cells, counting rows under a short body, columns beside a narrow text body (records and fun facts are capped near their natural width so spare columns go to bar cards) and half of a bar card's columns pastfullW, plus a per-card penalty for blank rows paststatsMaxBlankShare(30%) of that card's body — summed cells alone never saw one hollow card, and let a one-row layout strand half of fleet actions under a tall records + facts stack; height is only a tiebreak (cw/32a line) until it shortens the chart and dear once it scrolls — atcw/8it outvoted the waste it was meant to break ties on (TestStatsNoCardIsMostlyBlank, measured off the rendered frame); lists stretched by their row re-render to fill it (statsCardSpec.fit) — fleet actions show the top five and a dim+N more, or as many as the row holds, and fun facts open a blank line between facts when they all still fit; and the agents card exists only when it compares (≥2 agents with turn data), otherwise the agent split rides a dim line under the repos, since one agent drew "Claude 100%" in a tall empty box.statsReportLinespicks the richest style that fits — big hero digits + card padding, then padding, then neither — and grows the concurrency chart into the rows left up tostatsChartMaxRows(10): taller, a sparse week became a wall of thin spikes. Rows a tall screen still has spare become air, not stretched cards (statsBalance): the page is top-anchored — it starts right under the range tabs, spare rows open at most one blank row between bands, and the rest fall below the page — with the footnote attached one row under the grid (TestStatsViewBalancesSpareRows). Centring floated a short page mid-screen with a band of empty rows between the tabs and the first card; pinning the footnote to the bottom like a status line left 7–12 empty rows between the cards and their footnote at 250×62. The range picker is a tab row pinned at the top of the page (rangeTabs:7 days 30 days all time · Sep 24 – Sep 30, the window dim beside it), the active tab a mode (ModeOn, never filled);1/2/3pick a range directly,[]/←→/h lcycle. It replaced a‹ 7d 30d all ›chip inset in the frame's top-right border that nobody noticed (a desktop notification covered it in the reporter's screenshot). A blank row under the tabs is spent only when the page fits without scrolling (tabRows). The window moved off the footnote onto the tabs. The scan's progress line rides under the footnote. The plot stops one column short of the card's text edge, or the bar for the hour in progress ran into the right border. The chart never snaps to a multiple of the peak, since eighth-block tops step cleanly at any height. The concurrency chart is solid block columns (statsBlockChart, never braille — Ghostty renders braille as sparse separate dots) laid on equal-width slots (statsChartSlots: with fewer than two samples per column every slot is ≥2 columns, since mixing 1- and 2-sample columns drew bursts as 1-column slivers and gaps), over a dim─baseline, with┈gridlines only when a level spans ≥3 rows. The heatmap is always two columns per week (one column reads as stripes), shows only weeks with data, and is sized to share a row with repos/agents when ≥16 weeks fit there. A day's level is the higher of two quartile levels, one over fleet actions and one over agent time (statsDayLevels): turns are backfilled from transcripts months before fleet records its first action, and scoring by actions alone once any day had one drew every backfilled day as a zero dot. Only days before the earliest data source (TurnsSinceorRecordingSince) are blank. Every cell is the same■— a zero day a border-tone square, today a text-colour one, rows labelledM T W T F S S: zero days drawn as·read as static, and a▣/□today marker is East-Asian-Ambiguous, which Ghostty draws two columns wide, shearing the grid and eating the legend's space (■renders one column there). Charts are coloured withStatsRamp(built inApplyPalette: step 0 is the border tone, the data steps start ~40% of the way to the accent so the lowest band doesn't read as chrome), the one sanctioned exception to "colour means status" (docs/design-system.md§5); concurrency uses three far-apart classes (solo / 2 / 3+). Under the chart, one line splits busy time into those classes (statsShareLines): awhen agents were busycaption, a short bar (≤40 cols) and the shares named in their segments' shades — a full-width bar with a swatch legend and no caption read as an unexplained stripe, or as part of the chart's axis. Hero numbers are the only accent-coloured figures (statsFigure, units dim); when every tile in the row fits them and the page doesn't scroll they render in a 3-row half-block font (statsBigFigure—▀ ▄ █are solid cells with no seams, unlike box-drawing strokes), as does the recap's figure, centred in the tile (hugging the left edge left a wide tile mostly blank). Units are glyphs in that font too (h m s ×, dim), shaped never to pass for a digit (sis the round S, not the square 5), and a space in the value opens a three-column gap: drawn as ordinary letters beside three-row digits they shrank to subscripts, and21h 00mread as2100. Two deliberate exceptions: a thousands comma is dropped ($1,412draws as1412) — any one-pixel mark at that size read as a decimal point, including a comma half a row below the period — and$is a small dim superscript on the top row, as a price tag sets it, since six pixel rows drew it as a blob. A value holding a character the font lacks falls back to the one-line figure. Below the width that holds five full tiles the heroes collapse to a one-row strip (value only, short labels) instead of wrapping 3 + 2. The laid-out lines are cached per (size, range, data generation):clampScrollruns on every key. The API-price dollar figure is a fun fact about tokens you didn't pay for on a subscription, not a bill; it lives in the hero row only. Fun facts that compare or rank must be earned by the data: they wait forminRecordedDays(7) local days of recording (recordedDays:recording_sincethrough today) whatever their samples say — a first weekend can clear every per-bucket gate with one burst — and then a comparison needsminCompareSamples(10) in each bucket it compares and a pattern must spanminFactDays(3) distinct days (replySpeedFact,busiestHourFact, the not-attached share); the busiest hour must also hold time fromminFactDaysdays of its own and beat the runner-up bybusiestHourMargin(20%), or a near-tie crowned whichever hour came first —MinSamples(5) is enough to show a median, not to claim two buckets differ, and one afternoon of first-day recording produced "your replies get quicker when 2+ other agents are busy". Records only — no badges, achievements or personas. - Tickets (
internal/ticket+internal/linear+internal/jira, routed byinternal/ticketing; opt-out-by-absence): starting work from a ticket, with one mutation. Two independent gates, and both must hold per provider: fleet needs a credential (workspace-level) and the provider must have keys for the repo. For Linear those default to the teams you are a member of (Account.Mine, read off the sameworkspaceQueryas the workspace —viewer { teams }), so a connected user's own teams are on in every repo with nothing to configure; a repo can name its own team(s) instead (exactly those, not the union) or opt out with{"linear": {"enabled": false}}(linear.TeamKeys,TestTeamKeysDefaultsToYourTeams). That reversed a per-repo-only rule whose required.fleet.local.jsonstep was the one people missed: connected, then nothing, and nothing said why (#373). Jira stays per-repo — it has no membership to read. There is still deliberately no fallback to "every team in the workspace" / "every project on the site": that would put strangers' tickets under the branch field of every repo on the machine, and a real Jira site has hundreds of projects. Your memberships are usually one to three. The memberships are cached in memory only:ticketing.WarmAccounts(TUI startup andfleet worktree --ticket) reads them, and the Connect dialog keeps its verification reading vialinear.CacheAccount— without that, a user who had just connected got nothing until a restart, which is the session they try it in. Before the reading lands, and after Disconnect, the default is empty: quiet, not wrong. A defaulted key never outranks an explicit one: a member key the repo names as a Jira project is dropped from Linear's default (the registry breaks ties Linear-first, so otherwise a repo naming JiraOPSwould handOPS-42to Linear for anyone on a Linear team keyedOPS). A ticket named outright —fleet wt --ticket, orMaterializewith no provider — falls back past the repo's keys to any connected account whose workspace has the key (ownerForNamed, cached readings only); a failed account read is reported as such rather than as missing config. - The core move is fetching one step earlier than you'd expect. If fleet materializes the ticket at worktree-creation time, the agent never needs to know the tracker exists — which is why fleet ships no tracker skill and no sidebar badge. It hands over content, not instructions.
- The layering is domain / providers / router, and the domain package imports no provider — that's what keeps it acyclic.
internal/ticketowns everything that was never tracker-specific: theProviderinterface,Ticket/Document/Result/Account, branch naming, the seeded prompt, the image downloader, the keychainStore,ticket.md, themeta.jsonledger andMaterializeitself.internal/linearandinternal/jiraare clients that implementProviderand nothing more.internal/ticketingis the only ticket package the UI andcmd/fleetimport; it holds the registry and is the one place that knows there is more than one tracker. - A provider is a zero-size value over package-level state, not a struct with fields. That state has to be reachable from
Available(), which the Bubble Tea Update goroutine calls and which therefore may not do any work — two atomics behind a package var is what makes that free, and an instance the UI would have to find first is not. Same reasonKeys(repoPath)is two small file reads. - There is no tracker CLI anywhere in these packages, and that is load-bearing (
TestNoTicketSubprocess, an allowlist of the three OS helpers — two keychains and a browser opener — scanning all four ticket packages, so a new subprocess has to be added deliberately). An earlier version shelled out toschpet/linear-cliand ate three version-skew bugs in one session: a Homebrew build compiled without--allow-net=uploads.linear.appthat failed every image download and still exited 0; anauth logincommand absent before v2.5.0; and the CLI's own error text naming aconfigurecommand that never existed. Theghprecedent did not transfer —ghis already installed for most developers,linearwas a download demanded for this feature — and Jira has no comparable CLI, so shell-out was a Linear-only trick rather than an architecture. The guard scans every package because the single-directory version passed vacuously the moment a second provider arrived. - Auth resolves per provider, env first, both cheap. Linear:
LINEAR_API_KEY→ fleet's own store; two credential kinds differing in exactly one place —authHeader()— where a personal API key is sent raw and an OAuth access token takesBearer(sending either in the other form reads as a rejected credential;TestAuthHeaderFormDiffersByKind). Jira Cloud:JIRA_SITE+JIRA_EMAIL+JIRA_API_TOKEN, all three or none (a site with no token is not a credential, and falling back to the store whileJIRA_SITEis exported would authenticate against a different site than the variable names) → fleet's own store; one kind,Basic base64(email:token)— not a bearer, which is rejected exactly like a wrong password with nothing saying the form was the problem. - A search term is escaped for TWO parsers, in order (
escapeJQL): Lucene first (backslash-prefix its reserved set), then the JQL string literal (double every backslash, escape"). Quoting alone is not enough — Lucene parses the contents of the literal for a~comparison, sofix (logintyped into the New branch field, which fires a search at three runes, came back as a 400 the dialog reported as "Jira: unavailable". Half a branch name is not evidence that the tracker is down. - Jira is Cloud only, and that is enforced by the API version rather than the hostname. REST v3 is what serves ADF and exposes
/rest/api/3/search/jql; Server and Data Center speak v2, return wiki markup, and take a bearer PAT — a second fetch path and a second auth story for a product fleet cannot test against.NormalizeSitetherefore accepts any host with a dot (Atlassian now serves Jira Cloud on customer-owned domains, and refusing those would refuse an ordinary site) and appends.atlassian.netonly to a bare tenant name. A Server site failsVerifyCredentialwith a 404, which the Connect dialog turns into "fleet supports Jira Cloud only" — the one place that diagnosis can honestly be made. - Error classification is per-tracker and the two are opposites, so each has a test saying which way round its API works. Linear answers an unknown issue with HTTP 200 and an
errors[]entry whose ownextensionscarrystatusCode 400(TestGraphQLErrorClassification); reading the status alone would file "no such issue" as a generic failure. Jira answers with real status codes (TestErrorClassification); reading the body first would do the same in reverse. Jira's 404 means "not found, for you" — it deliberately does not distinguish a missing issue from one the credential may not see, since telling an unauthorized caller which keys are real is a leak. - The store is first-usable and per provider, mirroring
clipboardCopyCommandFor: macOS Keychain (security) →secret-tool(libsecret) →~/.config/fleet/<provider>.jsonat 0600.ticket.Store{Service, Label, FileName}carries the names on a value, which is what makes the second provider a construction rather than an edit — the previous version hardcodedfleet-linearin three places and a fourth that disagreed (the secret-tool branch ignored the service it was handed, so the test seam silently did not work on Linux). The secret never touches argv:security -w <value>and-X <hex>both work and both publish it to everypson the machine, soSavefeeds it on stdin twice —security ... -wimplements an interactive "type it again" prompt and does not care that stdin is a pipe. Verified against a live keychain. That prompt reads throughreadpassphrase(3), whose buffer is_PASSWORD_LEN= 128 bytes, and past itsecuritystores the first 128 and still exits 0 — no failure, no warning. The record then reads back as a JSON prefix that cannot parse, the load reports "no credential", and the user reconnects on every launch with nothing saying why. It split the user base in the worst possible way: an API-key record is ~85 bytes and fits, so the paste path looked perfect while every OAuth login was destroyed on every write. So the record is chunked at 96 bytes each, chunk 0 carrying a<total>:header so a torn write reads as absent rather than as a short credential, and old chunks are deleted before a write so a shrunk record leaves no tail. The chunk writer must never build its stdin withappend(data, '\n'):datais a slice into the record, so that writes into its spare capacity — the first byte of the next chunk — and it corrupted every multi-chunk write while each call still returned success.TestKeychainStoresRecordsPastThePasswordBufferLimitpins 129 (the first byte over the cliff) and the multi-chunk sizes; a round-trip test with a short value passes either way, which is exactly what the original one did.sanitizeForIssueredactslin_api_*/lin_oauth_*,ATATT*and a bareBasic <base64>header besidesk-ant-*— the last one because Jira's token is base64-encoded away inside the header, so a prefix rule alone catches only half of it (TestBuildStatusReportBody_NeverLeaksJiraToken). - Linear ships both auth paths and the user picks. Browser sign-in is the shorter one; pasting a personal API key is the only one that works over SSH, in CI, where an admin has disabled OAuth installs, and where the user wants read-only or team-scoped access. OAuth is PKCE, so no client secret ships — the client ID is public like
projectAPIKey(FLEET_LINEAR_CLIENT_IDoverrides). Redirect ports are fixed (53682-53684, first free) because Linear matchesredirect_uriagainst the app's registered list and an ephemeral port is simply rejected; all three busy, or no browser, returnsErrOAuthUnavailable, which is a routing answer, not a failure — the dialog points at the paste path. Thestatecheck runs before the code is touched (TestOAuthStateMismatchRejected): the callback is a fixed loopback port, so anything on the machine can reach it during the window. Access tokens last 24h;credential()renews at a 5-minute margin, serialized byrefreshMu— without it a ticket with a dozen screenshots starts a dozen downloads that each find the token stale and each spend a refresh. A refused refresh disconnects (the grant is gone), while an unreachable endpoint does not — fleet failing to reach Linear is not evidence against the grant. - Jira ships one auth path, deliberately. Atlassian's OAuth 2.0 (3LO) needs an app brizz would register and own forever, and in many organizations a per-site admin has to approve each install — for a credential a user can mint themselves in two clicks at
id.atlassian.com. The API token also covers the SSH/CI case Linear needs its paste path for anyway. An Atlassian API token does not expire on a timer, so there is nothing to renew and a rejected one is a revoked one: the honest move is to report it rather than retry. Available(),Resolved()andKeys()are called from the Update goroutine and therefore touch no network and no keychain — atomics and small file reads. The keychain reads happen once, inwarmTickets()fromInit.Resolved()is separate fromAvailable()on purpose: before the warm finishes, "no credential" is ignorance, not a fact, and anything acting on the absence of one (the discovery tip) must wait.ticketing.Resolved()requires every provider to have warmed, not any — a tip that fires while one is still resolving would offer to connect a fleet that is about to say it already is.- Repo keys come from
.fleet.json/.fleet.local.json:{"linear":{"team":"BRZ"}}and{"jira":{"project":"OPS"}}(pluralteams/projectslists append and dedupe; a local singular replaces the committed one — see the.fleet.jsonbullet below). Linear also falls back toteam_idin a committed.linear.toml; that file belongs to the CLI fleet no longer uses, but reading one key out of a file someone already has costs nothing, andapi_keyin the same file is never read (TestTeamKeysReadOnlyTeamID). Jira has no such fallback — no tool writes a per-repo Jira file anyone already has. Gating is on the set, not one key — a workspace routinely has several teams and one repo may see branches from both. - A ticket that already knows its provider is never re-resolved.
ticket.OptscarriesProvider, andticketing.Materializeprefers it, falling back toOwner(repoPath, id)only for a bare identifier nobody has claimed yet (thefleet wt --ticketpath). Applying the repo gate a second time was a real regression: search is deliberately unscoped, so a repo tracking onlyBRZoffersPRD-45, and re-resolving that pick refused it after the branch was named and the worktree created — withticketStatusLineswallowingErrNotConnected, so nothing on screen said why. The repo gate decides whether ticket surfaces appear at all; it is not a rule about which issue you may work on.ticketStatusLineno longer swallowsErrNotConnectedeither — at that call site the user demonstrably has a ticket in hand, so it means the credential went away in between, which is the same argument that already applied toErrNotFound. ticketingorder decides who owns a contested key. A repo namingBRZas both a Linear team and a Jira project is pathological, but "first configured wins, and the order never changes" is an answer where "whichever the loop reached first" is a coin flip that lands differently between launches.Owner/OwnerInresolve by the identifier's key prefix;Keysis the deduped union, which is whatLooksLikeIdentifierandIdentifierFromBranchgate on.- One round trip does everything per provider. Linear:
issueFullQuerycarries description, comments, labels, assignee, priority, parent/children, attachments, and the team's workflow states, so the optional state write needs no second query — measured at 87 complexity points against a 10,000-per-query cap. Jira: oneGET /rest/api/3/issue/{key}?fields=…carries the same, with a second call only whencomment.totalexceeds the page returned (the newest comment is usually what changes what a ticket means). That call isorderBy=-created, notcreated— Jira'sorderByis ascending by default, so the plain form fetches the oldest page, the exact opposite of the reason the round trip is worth taking. The page replaces the embedded set only when it is larger (an issue can embed more thancommentFetchLimit, and swapping 100 for 50 would lose half of them while looking like a fix), and is reversed back to chronological before rendering soticket.mdreads as a conversation in both trackers. Rate limits are generous against roughly 2 calls per worktree, so no throttling machinery exists in either. ticket.Prioritykeeps Linear's numbering on purpose —0unset,1urgent …4low — so the palette's priority gauge and its colour ladder need no translation layer and a Jira row renders identically to a Linear one.Rank()exists because the raw number cannot be sorted on:0means "not set", so ascending order would float every unprioritised ticket above the urgent ones. Linear's number converts verbatim; Jira maps by priority NAME, not id (schemes are per-project, so the default ids 1..5 mean Highest..Lowest only on a site nobody configured), coveringhighest|blocker|critical/high|major/medium|normal/low|minor|lowest|trivial. Anything unrecognized is None, not Medium: guessing a middle rank would put it above a real Low, and the list is sorted on this.ticket.StateTypenormalizes the state category, andticket.SortAssignedowns the one comparison (state type → position → priority → the server's order, stable) so a merged Linear+Jira list is ordered by the same rule as either one alone. Linear supplies a realStatePos— the difference between "In Progress" and "In Review" leading the list; Jira has no position at all, so it supplies 0 and the tiebreak falls through to priority. Jira has no distinct backlog or triage category either, so both collapse into Unstarted — honest rather than lossy, since a Jira "To Do" really is one bucket.- The one mutation. Linear resolves the team's started state by type, against a position-sorted list (
TestStartedStateResolvesByTypeAndPosition) — type so it works on a team whose started state is called "In Dev", position because a real team has several started states and the lowest is what a human means by "I'm starting this". Jira has no position and every in-progress-ish status shares theindeterminatecategory, sostartedTransitionprefers the exact name "In Progress" (Jira's own default) and otherwise takes the first indeterminate transition in the workflow's own order — picking wrong would move a fresh ticket straight to review. It costs a second round trip, unlike Linear's, because available transitions depend on the issue's current status and the caller's permissions and cannot ride along with the fetch. Fires only on create-from-ticket (configticket_start_state, default true; the pre-Jiralinear_ticket_startis still read when it is unset), never when a later session opens in an existing worktree — by then a human may have moved the issue on.meta.jsonrecordsstate_writeso it stays exactly-once, and now recordsprovidertoo: two trackers can land different issues in one.fleet/ticket/<ID>/, and a Linear write says nothing about whether the Jira issue of the same key has been started. - Extensions come from the BYTES, and only from the bytes. Linear's default alt text is literally
image.pngand its upload URLs carry no filename, so a real PNG would land unnamed and unextensioned — and an agent's file-read tool dispatches on extension, making a perfectly downloaded screenshot unreadable.detectExtsniffs magic bytes (http.DetectContentType) and takes no filename argument at all. It used to short-circuit on a recognized extension, andfetchImageused to readContent-Disposition/Content-Typefirst — which meant that for Jira, where the alt is the filename and both headers are always sent, the sniff never ran: a 200 carrying an HTML interstitial forscreenshot.pnglanded on disk as a.png, past a check whose whole stated purpose was to stop that. The one exception is SVG, which Go's sniffer cannot name (<?xmlreads astext/xml, a bare<svg>astext/plain), so a header sayingimage/svg+xmlis honoured only when the body sniffs as XML or plain text — an HTML body is refused whatever the headers claim (TestBytesBeatHeaders). - Images are declared by the provider, never scraped from the rendered markdown. A
DocumentcarriesImages []Imageand writesplaceholders into its body;collectImagesdownloads and rewrites them. The indirection exists because the two providers find their images in incompatible ways and neither can write a final path — the on-disk name is only known once the bytes arrive. Matching is on the whole link target including the closing paren:fleet-image:1is a prefix offleet-image:10, so matching the bare token would let image 1 succeeding rewrite half of image 10's link (TestCollectImagesIndexesAreNotPrefixes). A placeholder whose download failed or hit a cap degrades to(image: alt — not downloaded)rather than a dangling link, because an agent told to open every file inimages/will try. - Jira downloads every
image/*attachment, not only the referenced ones, and that is forced by Atlassian rather than chosen. An ADF media node'sattrs.idis a Media Services file id and is not the attachment id the REST list is keyed by (JRACLOUD-96383/96384 are open requests to add the mapping); alt text is the only bridge and Jira frequently writes none. Inline-only matching would silently drop the screenshot on exactly the bug reports that are mostly screenshot. Everything is listed under## Attachments, inlined where a media node resolved and marked(shown above)where it did. Two indexes, because they answer two questions:## Attachmentslooks up by attachment id, since one issue can carry two files both calledimage.pngand a name-keyed map collapsed them — both resolved to the second, the first became unreachable, and one screenshot rendered twice while the other was never downloaded, on exactly the screenshot-heavy bug report this branch exists for. A media node has only the filename to go on, sobyNameholds a queue and each node claims the next unclaimed index, falling back to the first once they are all taken (the same image referenced twice must render twice, not degrade). Non-images are named, never fetched: an agent cannot read a 40MB video, and pulling a customer's spreadsheet into a worktree unasked is not fleet's call. - ADF → markdown is a walker, not an HTML pass (
internal/jira/adf.go). v3 serves descriptions and comments as a JSON document tree.expand=renderedFieldsreturns HTML, which needs its own converter and loses the structured media references; v2 returns wiki markup, a different markup language to convert and one Atlassian is moving away from. Walking the tree is the only option that also solves the image problem, since media nodes are where inline screenshots are named.codeis applied innermost and suppresses the other marks, because**x**inside a code span is literal backtick-asterisk text. An unknown block recurses into itscontentrather than dropping — ADF gains node types faster than fleet will track them and their text lives in an ordinary content array underneath.underline,textColor,subsupandborderhave no markdown form and are dropped silently: the words survive, and a marker for "this was purple" helps nobody. - Image gating is per provider and re-checked at the credential.
Document.Hostis Linear'suploads.linear.appor the configured Jira site, compared onurl.Hostname()— never a prefix or suffix, since a suffix test matchesuploads.linear.app.evil.exampleand a prefix test matches it too.httpsonly, so the credential never crosses the network in plaintext even to the tracker itself.ticket.fetchImagere-checks the gate on the line that attaches the credential: a gate one call away from the thing it protects is a gate a later refactor removes without noticing.imageClientrefuses every redirect, because Go stripsAuthorizationonly across a registrable-domain change and deliberately permitsuploads.linear.app → anything.linear.app. Issue bodies and attachment records are attacker-influenced content — anyone who can write to an issue fleet later materializes, including through Linear's customer requests and Jira's public service-desk intake. - Files land at
<worktree>/.fleet/ticket/<ID>/— inside the worktree so the agent reads them with a relative path and no permission prompt, since a prompt on the session's first act renders as-waiting, the friction this feature removes. Deliberately not namespaced by provider: that would change the path under every worktree that already exists and lengthen the one line of the seed prompt an agent has to act on, to fix a collision that needs a repo tracking both trackers and a key shared between them.meta.jsoncarries the provider instead. Git exclusion usesgit rev-parse --git-path info/exclude, never--git-dir+info/exclude:infois on git's shared-path list, so a linked worktree's--git-dirgives a path git never reads — the entry would look installed and exclude nothing (TestAddFleetExcludeFromLinkedWorktreeproves it withcheck-ignore). The entry is repo-wide, written once, idempotently, and it is.gitignore's opposite on purpose:.gitignoreis tracked, so writing it would dirty a fresh worktree and risk committing customer screenshots. The exclude is written before the first byte, since a window where the files exist and the exclude does not is a window wheregit add -Asweeps a customer screenshot into a commit. - Branch names are
brz-3182-<slug-of-title>(BranchNameFor), not the tracker's own suggested name — Linear's carries an owner prefix (alice/brz-3182-…) and Jira's carries the summary verbatim. Both trackers link a PR by finding the identifier anywhere in the name, so every form links identically; this one matches the convention already on disk.identifier.gois one file for both providers because a Linear team key and a Jira project key are the same shape. - Inference is key-gated (
IdentifierFromBranch). The regex is deliberately loose about the prefix because the caller gates on the repo's real keys; ungated it readsfix-123-thingasFIX-123andrelease-2024-cleanupasRELEASE-2024, identifiers for teams that don't exist. The gate is what makes a non-ticket branch cost nothing. - Nothing polls, and a prompt is seeded exactly once. Ticket work is event-driven and one-shot: it happens at worktree creation and nowhere else (
w+ a ticket,fleet worktree --ticket), so a session added by hand witha/n/Astarts empty like every other manually created session.handleSessionCreatetherefore does no inference at all — it passesmsg.promptthrough untouched. fleet used to infer a ticket from the branch on every session creation, plus reuse the already-writtenprompt.txtwhen.fleet/ticket/<ID>/was present. Both re-asked the original task on every session after the first, and the reuse branch never looked at the branch at all, so a worktree that once held a ticket kept seeding it after the checkout had moved on tomaster. A seeded first message is the gesture of starting a worktree from a ticket, not a property of the directory.TestTicketWorkStaysOffTheWorkerskeeps it out ofrefreshAllGitAndPR, whoseworkerStallThreshold(90s) is already sized against ~70s of git +ghper repo — and it names every ticket package, since the single-name version passed vacuously the moment a second provider arrived. This is only affordable because there is no badge, hence no live state to keep fresh. - The seeded prompt is a short pointer that tells the agent not to start (
TestSeedPromptTellsAgentNotToStart), stated at the top and bottom because a first message describing a task reads as an instruction to perform it. Line 1 leads with the tracker's name and the identifier before the title: the identifier because it is three surfaces at once (the agent's instruction, the preview pane's prompt strip, and the input tonaming.GenerateTitle, which cuts at ~50 runes), the tracker's name because it is a fact the agent can act on — it is what makes "look it up yourself" possible when the snapshot on disk has gone stale. It ridessessionCreateMsg.prompt->Session.InitialPrompt. - Base branch autocomplete (
internal/ui/workspace_picker_branch.go, issue #277): thewdialog's Base branch field suggests branches beneath itself, on the ticket rows' vocabulary (▸+selTitle, dim otherwise,branchMaxRows=5) and through the samesetSelectionhighlight. The list is fetched once, byfetchWorkspaceListForRepoon the worker goroutine beside theGetDefaultBranchit already ran, and ridesworkspaceListMsg.branches— so filtering is a synchronousstrings.Contains, with none of the ticket machinery's debounce or generation guard, which exist only because a lookup is a network round trip. A failed listing leaves the field exactly as it was. While that field carries the highlight the existing-worktrees list is hidden, which is a height budget rather than a flourish: the dialog has none of its own (wrapDialogonlyPlaces, and the worktree loop is unbounded), so at 80×24 with six worktrees five suggestion rows took the box from 21 lines to 26 and pushed the footer off the bottom. Dropping the list reclaims more than the rows add, so the focused dialog is strictly shorter than the resting one (TestWorktreeFocusedDialogIsNoTallerThanAtRest;TestWorktreeDialogRowsNeverOverflowis width-only and runs at height 40, so it could never catch this). Capping the rows against remaining height was the alternative and was rejected:setSelectionruns nowhere nearView, so the cursor clamp would have started varying with window size. Hidden is not unreachable —shift+tabstill cycles onto the list and brings it back. Rows render only while that field carries the highlight: the field always holds text, so rendering them unconditionally would park five rows mid-dialog for every user including everyone who never touches the base branch — deliberately unlikerenderTicketBlock, which renders whenever tickets exist because prose in the other field is what put them there. tabmoves between fields,↓/↑walk rows — split apart for this. They were one merged case, which was fine while only the New branch field grew rows and stopped being fine the moment the Base branch field grew its own: tabbing off a focused base field would have taken six presses to reach the next input. The↓/↑walk is the full continuous path (base input → base rows → new-branch input → ticket rows → worktree list) and must retrace itself exactly — which is why↑from the New branch field lands on the last base row (visibleBranchCount()-1), not the base input. It cycles:tabwraps the worktree list back to the base field andshift+tabwraps the other way, because a key documented as "next field" that does nothing on the last field is a dead key rather than a design, and wrapping one direction only moves the dead end onto the other. Cost:tabno longer walks the worktree list;↓still does.visibleBranchCount()is deliberately not focus-gated even thoughrenderBranchBlockis — that↑handler asks for the last row while focus is still elsewhere, and a focus gate would answer 0 and silently land on the input.- A suggestion is stored as the exact ref that will be written into the field, which is why a remote-only branch always comes out
origin/-prefixed (baseRefFor).GitWorktreeProvider.Createrunsgit worktree add <path> -b <new> <base>, and with-bpresent git resolves<base>as a plain revision with no remote-tracking DWIM — so a bare remote-only name is a row that looks valid and fails on Enter, and the no--bretry silently drops the base entirely. A field already readingorigin/…keeps its prefix and matches only branches with a remote (git.BranchInfo.HasRemote, added for this):GetDefaultBranchpre-fillsorigin/<default>precisely so a worktree starts from the remote tip, and quietly swapping that for the local branch would change what gets built without saying so.HasRemoteforcedListBranchesinto two passes — a branch shares its committer date with itsorigin/counterpart only when it is level, so a branch you have not pulled has its remote ref sort first, which the old single-pass form both missed the flag on and emitted twice (TestListBranchesRemoteCounterparts; the duplicate was already visible in thebkey's picker). - An at-rest field lists the alternatives, not itself. Filtering the pre-filled
origin/<default>yields exactly one row echoing the field — a row that answers nothing and no-ops on Enter — so a field nobody is typing into widens to the unfiltered list instead, keepingwantRemote(you asked for a remote ref, so the wider list is the other remote refs) and excluding the field's own value, which would otherwise reinstate the very no-op row the widening removes. That exclusion runs before thebranchMaxRowscap: filteringmatchBranches' result instead silently returns one row fewer than fits. The gate isbaseAtRest— set byShowandpickBaseBranch, cleared by the first typed change — and not equality between the field and a branch name, which looks equivalent and is not: typing your way tomaster-fixpasses throughmaster, so the equality form widened 1 row to 5 at therand collapsed back at the-, and since the dialog is vertically centred that was the whole box jumping four rows mid-word. - A ticket picked from My tickets always resolves, even in a repo whose keys don't cover it (a team you aren't on): the palette row carries
TicketProvider,openTicketFromPalettestashes it besidependingTicketID, andPrefillTicket(id, provider)binds that one key to that provider for the rest of the open (bindTicketKey, copying the handedboundrather than writing through it). Coverage is checked per provider: when another tracker holds the key it loses it for this open, or a JiraOPS-7would be fetched as Linear'sOPS-7. Before this the hand-off fell through the repo gate — no lookup, no branch name, noticket.md— and the session started with nothing on it (#373,TestPickedTicketResolvesInARepoThatDoesNotTrackIt). - Ticket suggestions live in the
wdialog's existing New branch field, not a new field and not a mode (internal/ui/workspace_picker_ticket.go). The field IS the literal option, so nothing duplicates it and only one thing ever claims Enter. Two rules make that hold: exactly one highlight, and the caret lives with it — arrowing onto a ticket blurs the input, typing returns both and keeps the keystroke (isTypingKey, borrowed from the snooze dialog, whose "the highlight is the promise" rule this follows); and shape decides the default, never a mode — text matching a tracker's identifier shape resolves in place (LooksLikeIdentifier), prose stays literal with tickets one down-arrow below. In place means the field becomes the branch name (applyResolvedBranchName→BranchNameFor) while the highlight stays put; it does not mean "only record the ticket". That half was missing at first, so typingBRZ-3217fetched the ticket, materialized it and named the session after it — and then created a git worktree literally calledBRZ-3217, breaking the invariantpickTicket's own comment states, that both ways of naming a ticket end up identical. The rewrite is gated on the field still holding nothing but that identifier: the generation counter drops a reply a later keystroke invalidated, but it cannot see a current reply for a shorter identifier you paused on en route (BRZ-321while typingBRZ-3217), which would otherwise dropbrz-321-<slug>under the cursor and let the rest of the typing land on the end of it. The same check leaves a tail you edited by hand alone. The confirmation line reads✓ named from BRZ-3217 · <title>, not a bare identifier: it renders in the same place the selectable ticket rows do, so on its own it read as a row you might still need to arrow onto when the naming had already happened — and it is the only thing on screen that explains why the field rewrote itself a moment earlier.✓is U+2713, East-Asian-Neutral, so it is always one column — the same width check the priority gauge had to pass. The highlight never moves on its own; a picker that jumps its own selection is the ambiguity coming back through the window.setSelectionis the single writer offocus/ticketCursor, enforced byTestWorktreeSelectionMutatorIsTheOnlyWriter, because a stray write skips the clamp and renders two selection markers. The footer names what Enter will do and changes as the highlight moves. - The dialog is a pure function of what it was handed, never of the registry.
Showtakes[]ticketing.Boundand derives its key union once;SearchBound/OwnerInact on that set. Two reasons pointing the same way: the dialog latches individual providers off as their credentials are refused (ticketsOffis keyed by providerKind, so a rejected Jira token cannot silence the Linear suggestions in the same repo — the two credentials fail independently), so re-deriving would search a tracker it has already given up on; and a dialog whose behaviour depends on process-wide credential state cannot be tested at all. A fan-out search that fails latches nothing, because it names no single provider. The searching line names the live trackers (⋯ searching Linear and Jira…), deduped so a repo tracking two Linear teams doesn't read "Linear and Linear". - Lookups are debounced (250ms) and generation-guarded, never per keystroke. Without the generation counter, typing
BRZ-3182then editing toBRZ-3184lets the slower first reply overwrite the field with the wrong ticket's branch name, which then becomes a real git branch (TestWorktreeStaleTicketReplyIgnored). The counter is monotonic and never reset to 0, unlikeConfirmDialog.scanGen— that one lives onHomeand never recycles; a per-dialog counter reset to zero would let a reply from a previous open match a new one.d.loadingis deliberately not used for ticket lookups: it swallows every key butesc. The owning provider is resolved before the closure fires, so a failed reply can still name the tracker it went to — which is the case where naming it matters most. - Degradation is structural: no credential, no team or project, rejected key, offline, unknown id, or nothing matching — every case leaves Enter working and the dialog usable (
TestWorktreeEnterAlwaysCreates).ErrNotConnectedis the resting state for everyone who never connected and is never surfaced as an error;ErrNotAuthenticatedis, because it names a thing to fix. The sentinels carry no provider prefix: they used to readlinear: issue not found, which the UI rendered asLinear: linear: issue not found, so every caller hand-worded its message instead of formatting the error. The provider name belongs to whoever is drawing the line. Once the worktree exists nothing may fail the caller:Materializesits besidecopyClaudeSettingsFileandCopyConfiguredFilesand shares their posture, and a failed fetch costs the prompt, never the session. - Connect dialogs (
internal/ui/connect_linear.go,internal/ui/connect_jira.go): separate palette commands, not one chooser — "Connect Linear" and "Connect Jira" each go straight to the thing they name. A pasted credential is verified before it is stored (Linear oneviewer/organization/teamsquery; Jira/rest/api/3/myselfthen/rest/api/3/project/search), so "connected" is a fact rather than a hope and a typo is caught while the user is still looking at the field they typed it into. Jira's project list is a nicety, not a proof:/myselfalready verified the credential, and a token scoped away from project browsing must not read as a bad token. Linear's done screen then names your teams, now on in every repo, plus the two per-repo overrides (teamto narrow,enabled: falseto keep a repo quiet); a user on no team gets the old per-repo.fleet.local.jsonline instead, since they have no default (TestConnectedScreenNamesYourTeams). Jira's still shows the exact.fleet.local.jsonline that turns a repo on. Jira's form has three fields, andEnteron any but the last advances rather than submits: one keystroke meaning two things depending on where you happen to be is how a credential gets submitted half-typed. Only the token is masked — a masked site field is how someone spends five minutes not noticing a typo. Discovery is atipOncefiring when a session's branch matches the generic<team>-<number>shape and nothing is connected — deliberately notIdentifierFromBranch, which is gated on keys nobody has configured yet at the moment the tip should fire; a false positive costs one dismissible hint, since the tip only offers and never fetches. Its id stays the literal stringconnect_lineareven though it now offers both trackers: that value is persisted inconfig.seen_tipsand counted inconfig.feature_usage, so renaming it would re-show a tip every existing user has dismissed and reset everyone's learned count. Only the Go constant changed, totipConnectTicketsID. - My tickets is a tab in the command palette, not a new dialog (
internal/ui/palette_tickets.go;topens straight onto it,Ctrl+Kreaches it by cycling), and it is one merged list across every connected tracker, not a tab each. The question the tab answers is "what am I meant to be working on", and that does not have a Linear half and a Jira half — the identifiers already say which is which, andticketing.Assignedfans out concurrently and re-sorts the union throughSortAssigned. A provider that fails contributes nothing and does not fail the others: half a list is worth more than an error, and one revoked credential must not empty the tab. The palette already had tabs (paletteTabOrder,cycleTab), so this is the existing surface rather than a fourth full-screen view — and typing narrows the list, which is why the whole open assigned list is fine here where it would be noise in a static list. The rows carry the join, which is the only thing this shows that a tracker cannot: which tickets already have a worktree and what that session is doing. Tracker keys are derived from the identifiers themselves (the prefix is the team or project), so it needs no repo config, spans every repo on screen, and needs no idea which tracker a row came from. When several sessions share a worktree the row reports the one that most wants you (ticketSessionRank), never whichever came first. Enter jumps to the session if one exists, else opens the ordinarywdialog with the identifier prefilled (PrefillTicket,pendingTicketIDconsumed exactly once) — so the repo and base branch are still confirmed on the screen that always confirms them, and a ticket becomes a branch name by only one code path. Because the list sorts on priority, priority is shown, as a three-cell gauge in a lead column —▰▰▰urgent,▰▰▱high,▰▱▱medium,▱▱▱low, and blank for no priority, since "low" is a choice someone made and "none" is the absence of one. A gauge rather than a label (P1/!!) because the list is sorted on this key and a sort key you have to read row by row gives you nothing across fifty rows —▰▰▱ranks below▰▰▰at a glance,P2only does once you've read both; it is also the shape Linear's own UI uses.U+25B0/25B1are Geometric Shapes (the status dots' block) and East-Asian-Neutral, so they are always one column — the obvious alternatives■ □ · •are Ambiguous width, which some terminals render double and which would shear the column out of alignment; Menlo covers both.paletteLeadWidthis 4, not 3: the gauge fills every cell it is given, so a three-wide column rendered▰▰▰BRZ-1with no separator. Colour stops after high (red, then orange; the lower two carry rank by shape in the ordinary dim tone): colouring all four tints nearly every row and the top two stop standing out — and yellow, the obvious third step, already means waiting in the sidebar. It rides in a column of its own, not insideName, for two reasons: a column can be coloured, and a column can be omitted — and it is omitted in the mixedalltab, where a lead column no other kind has pushed every ticket title four columns right of every command and worktree. Both of the tickets tab's dedicated columns vanish outside it, soticketRightColumnputs state and priority back into the right column there — otherwise a ticket in a mixed list shows nothing but its title. State grouping is likewise tickets-tab-only: aTodoheader sitting above a run of commands would describe rows it has nothing to do with. Rows are grouped under the state with a count when nothing is typed; typing drops the headers and folds the state back onto the row, since nothing else would carry it. The badge column is chosen by tab, not by kind: in the mixedalltab it is a plaintktlabel, and in the tickets tab it is gone entirely — it is 4 wide because ofcmd/repo/wkt, and there it only ever held a one-character dot. The is this in fleet answer moved to the right column, which was empty in that tab, and is spelled out:● running,◐ waiting,· suspended, blank when there is no worktree (ticketsTabRight). This reverses the earlier rule that the status is carried by the dot and never repeated as a word — that was right while the two sat in different columns saying the same thing, and wrong once the dot was alone on the far left, carrying two facts (is it here, what is it doing) in one glyph with no legend. Right-column content is composed in parts, never styled as one string, and it never takes the fuzzy highlight: the matched indexes belong to the Haystack, and painting them onto fleet's own annotation lights up the wrong runes. While filtering, the headers are gone so the state folds back onto the row in front of the join — usingit.Group, deliberately notticketRightColumn, which also appends the priority and would render the gauge a second time two columns from the first (TestFilteredTicketsTabDoesNotDoubleThePriority). Identifiers pad to a common width so titles start in one column.Ctrl+Onarrows the tab to work you have not started (scopedOutincommand_palette.go) — the tickets tab's own scope, not a global one. The cut isState != StateStartedrather than an allowlist of todo and backlog, so a category neither provider maps (Linear'sStateOther) stays visible instead of silently vanishing from a list the user believes is complete; and it is not spelled "backlog only", because Jira emits no backlog or triage category at all and that scope would read as permanently empty there. The chip carries it (tickets · todo 7) rather than a second chip of its own, andrenderTabsapplies the same predicate asrebuildFilteredso the count can never contradict the rows beneath it.Ctrl+Obecause the search box owns the obvious chords — bubbles' textinput bindsctrl+a/b/d/e/f/h/k/n/p/u/v/wplus the plain arrows for line editing, andctrl+c/ctrl+k/ctrl+q/ctrl+sare quit, close, detach/XOFF and flow control, whilectrl+i/m/j/[are byte-level aliases of tab/enter/newline/esc. Arming requires the tickets tab; clearing does not — off it the key falls through to the input while the scope is off, and is live while it is on. Asymmetric because the two presses are not the same act: arming has an effect you can only see where the rows are, while the chip it lights renders from every tab, and a mode you can see but cannot reach from where you are standing is worse than one you cannot see. There is exactly one scope, so clearing it is never ambiguous. The footer hint follows the key rather than the tab (ctrl+o: todo/ctrl+o: all), so a dead key is never advertised — the same rule the context menu's dimmed rows keep. Deliberately not reset byShow: a queue you pick your next task out of is the state you want most of the time, so re-pressing it on every open would make it a chore rather than a mode — it is not persisted to config, so a restart clears it. A scoped tab that ends up empty saysNothing unstarted — ctrl+o shows allrather than the genericNo matches: withticket_start_statemoving your active work to In Progress, "everything I am assigned is started" is the routine outcome of this scope, and it otherwise looked exactly like a fetch that failed. Claimed only when rows were really scoped out and nothing is typed — with a query, or with nothing hidden, the scope is not the reason and saying so would be a guess. Colour therefore means session status and only that, the same discipline that keeps agent glyphs monochrome.Haystackmust be exactlyName + " " + <right column>: the renderer maps matched indexes back onto those two strings by offset. The palette's name column is budgeted against the widest right column rather than a fixed 22-rune cap, which was truncating titles toStorage opt…on a terminal with room to spare. Fetched when the palette opens and never polled —ticketListLimitis 100 per tracker, one page for both (Linear takesfirstup to 250, Jira's/search/jqlaccepts it in one POST), and the number matters because the fetch is ordered byupdatedAt, so the cut falls on recency rather than state: the earlier fifty truncated exactly the untouched backlog the todo-only scope exists to surface.Ctrl+Kcosts nothing at all when no tracker is connected. fleet worktree --ticket <ID>(-t) mirrors the TUI and names the branch when no branch is given. Conflicts with-p— both set the first message and say opposite things — but is allowed with--no-session, unlike-p: a promptless session is meaningless, a materialized git-excluded ticket directory is not. A bad identifier fails before anything is created, the same line-p -draws. It callsticketing.Warmfirst — a one-shot process has read no keychain yet, so every provider would otherwise report itself unavailable. When no provider will read the identifier,unclaimedTicketAdvicenames which gate failed: a repo that already declares the project needs a credential, not a config edit, and telling someone to add a line they can see is already there is a false statement about their own setup.- Git info (branch/dirty) refreshes on a per-repo cadence (
internal/ui/git_cadence.go): every 2s while a session in the repo is running/waiting/starting or ran within the last minute, every 30s when its sessions are at rest, every 5 min when every session is suspended or errored (kept, not dropped, so a merged PR still turns its badge).triggerGitRefresh(detach, checkout, create) forces a full pass viagitForceNext. It used to refresh every repo every 2s — measured ~1.6 CPU-s per cycle across 11 large worktrees, ~80% of a core in child processes fleet's own %CPU never shows. git runs withGIT_OPTIONAL_LOCKS=0(gitCommand), so the periodicgit statusnever takesindex.lockin a worktree an agent is committing in. PR info every 60s hot / 2 min cold viaghCLI, only for a repo whose git refresh ran. Because a cold repo'sIsDirtycan be minutes old, the worktree/origin delete dialogs re-check it live in their async holder scan (countDirty→dirtyScanPrefix; agit statusthat fails or times out is reported as "Couldn't check", never read as clean —git.UncommittedChangesreturns the errorHasUncommittedChangesswallows), andy/Enter is held until that scan answers (ConfirmDialog.scanPending, read byconfirmLockedfor both the key and the greyed button;escstill cancels): removal isgit worktree remove --force, so a cached "clean" must never be the last word, and a fastd ymust not beat the live one. - tmux status bar repaint (
refreshTmuxStatusBars): skipped for sessions with no tmux (suspended, or errored with tmux gone —statusBarApplicable; applying to them failed withexit status 1for every such session on every launch). The cache key (statusBarKey) holds every rendered input and the pane pid, deliberately not the session status: no option renders status, and keying on it re-ran 13set-options — redrawing the attached client's chrome — on every running↔finished flip. Two inputs take over the job status did by accident — a restart paints a plain bar inStart, so the themed one must land after it: the pane pid (new per pane process) and astartingbit, which flips once per launch and repairs a themed apply that lost the race toStart's plain one. - Crash dumps fire only on a new death.
deathRecordedis in-memory, so a session persisted as errored was re-dumped on every launch (580 files, 29 for one session).FromRowsetsloadedDeadfor a row already inerror, andtriggerCrashDumpskips while it holds; the relaunch paths clear it withdeathRecorded. It also lifts once the session is seen alive after the load: a non-dead hook stamped afterloadedAt(a stale file read at startup doesn't count), or — for Codex/OpenCode only, whose deaths are pane/tmux-only — a pass where tmux and the pane are up and the hook isn'tdead(OpenCode persists a recoverablesession.erroraserrorwith its pane alive). Claude/Copilot wait for the hook: on the first pass the watcher may not have seeded the stale dead hook yet. It is a separate flag, not a seededdeathRecorded, because a stale non-dead hook file read at startup re-armsdeathRecorded; and it is keyed on loaded rather than on anyerrorstatus, so a session that errored while alive (an agent-reported error) and then really dies still gets its dump. The dir is pruned to the newest 100 (pruneCrashDumps). - While attached, the status worker's fast active-pane pass rides the 2s heavy cadence instead of 500ms (hook-driven priority updates still run every cycle; detach forces a full cycle): the sidebar isn't on screen, and each pass is a
capture-paneagainst the tmux server relaying the attached session. - PR badge: green ✓ (approved+CI passed and GitHub not blocking the merge —
github.PR.ReadyToMerge, the one predicate the badge, its colour, thePjump, the preview line andfleet statusall ask; an approved, green PR whosemergeStateStatusisBLOCKED(an approval-policy bot, CODEOWNERS, conversation resolution) orBEHINDdrops to a bare yellow#N, with the reason spelled out in the preview line and asblocked/behindinfleet status. A deny-list rather than== CLEAN, because GitHub computes the field lazily and answersUNKNOWNon a cold read), yellow ◔ (CI running) / ⌕ (review required) — stacked◔⌕when both, and shown only when there's nothing red to fix, red ✕ (CI fail) / ↩ (changes requested or unresolved threads), purple ⇡ (merged), gray ◌ (draft; ✕ appended on CI fail), hidden (closed) - PR info includes unresolved review thread count via GitHub GraphQL API
ghCLI optional — PR info hidden if not installed- Preview strips OSC-8 hyperlink sequences to prevent dotted underline artifacts
- Status detection: hook-based (primary, no time expiry) via Claude Code hooks + pane capture (fallback, ANSI-stripped)
- Claude's own status file (
internal/session/claude_proc_status.go): Claude Code keeps<config dir>/sessions/<pid>.jsonper live process —~/.claude, or the account'sCLAUDE_CONFIG_DIR(measured: Claude createssessions/there) — and since 2.1.327 writesstatus: "waiting"with awaitingForreason. fleet reads the owner pid's file (the pid the hooks report; no scan), requires itssessionIdto match the owner conversation and the pid to be alive, and uses it only to confirm waiting, applied last in the Claude hook path over whatever hook + pane concluded. Only to confirm, because Claude sets it only for dialogs that declare a reason: AskUserQuestion and MCP input sayinput needed, while several permission and plan-approval dialogs declare none and readbusy. Trusted reasons areinput needed/sandbox request/worker request/goal proposal;dialog openis not, since Claude also reports it for a/modelor/configthe user opened themselves, which would put the row in theSpacerotation. It closes the cases the hook and pane get wrong: aPermissionRequestthat lands before the question renders (overridden to finished), and a message typed while a question is open, which is queued and still firesUserPromptSubmit, so a running hook lands after the waiting one and masks it. For that second case the stale-running rule also settles to waiting, not finished, when the pane structurally shows a prompt (older Claude, or a reason fleet doesn't trust). Once the file stops saying waiting, the status it overrode is handed back (claudeBumpedFrom, idle included), so a latch that only preserves status can't keep the row waiting.fleet statushonours it too (ClaudeWaitingFor): its "no prompt on screen means answered" rule would otherwise report running before the question renders. - Agent team status: sub-agents don't fire hooks, so pane detection handles team states via structural checks (numbered menu
❯ 1.+2.+ a menu footer —Esc to cancel, orapprove with this feedbackfor ExitPlanMode plan-approval prompts; box-drawing│+Waiting for team lead); a fresh hook=running is never overridden to waiting by pane (avoids false-positives from code in scrollback); one ruled stale (>10s of stable content) settles to waiting only on a prompt shown by its layout (paneShowsPromptStructurally— menu + footer, team box, AskUserQuestion footer), never on theapprovalPatternstext fallback - Background agents (
Agenttool +run_in_background): the lead firesStop(hook=finished) and parks until the agents re-invoke it, so the session would read idle/finished.detectBackgroundAgentsRunning(session.go) catches the in-flight dock rows (◯ <type> <desc> <elapsed> · ↓ <tokens>, rendered below the input box → scrollback-safe) and returns Running;applyHookFinishedthen overrides the finished hook → Running. Only the in-flight glyph◯matches, so the session self-clears to finished when the agents complete. Trade-off: a long background job shows Running for its full duration (chosen over hiding live work under idle). - All blocking I/O (tmux, git, gh) runs in background worker goroutine, never in Bubble Tea Update()
- Hook status files:
~/.config/fleet/hooks/{session_id}.json, written atomically via a uniquely-named temp file (os.CreateTemp) — hook handlers are one-shot processes and an agent can fire two at once (Codex asks permission per concurrent tool call), so a shared<id>.json.tmplet the loser's rename fail with ENOENT and could rename a torn write into place - Hook handler:
fleet hook-handler(invoked by Claude Code hooks, reads FLEET_INSTANCE_ID env) - Hooks auto-installed into
~/.claude/settings.jsonon TUI launch - Debug log:
~/.config/fleet/debug.log(slog, init in TUI and hook-handler) - Config file:
~/.config/fleet/config.json(tick_interval_sec, default_project_path, editor, theme, auto_name_sessions, copy_claude_settings, worktree_path, confirm_before_restart, origin_delete_removes_worktrees, drawer_height, session_suspend_mode, account_strategy, default_account, allowed_accounts, ticket_start_state (legacy linear_ticket_start still read), account_usage_style, stats_recap_seen_week) - Ticket credentials: OS keychain items
fleet-linearandfleet-jira(orsecret-tool, or~/.config/fleet/{linear,jira}.jsonat 0600). Never inconfig.json, never in a session's tmux environment - Claude accounts:
~/.config/fleet/accounts.json(0600) records emails/orgs/config-dir paths; the logins themselves live in the macOS Keychain, one item per account dir. Per-account Claude Code homes:~/.config/fleet/accounts/<8hex>/ - Workspace: built-in git worktree support (zero config), per-repo
.fleet.json(or legacy.bc.json) overrides with custom shell commands - Workspace creation is non-blocking: dialog closes immediately, phantom "Creating..." entry with spinner appears in sidebar, user can keep navigating
- Worktree creation copies
.claude/settings.local.jsonfrom source repo (configurable viacopy_claude_settings, default true) - Base-branch fetch before worktree creation (
git.FetchBaseRef):git worktree add -b <new> origin/masterresolvesorigin/masterout of the local clone and never asks the remote, so a worktree could start days behind and need a merge as its first act. Both create paths — thewdialog's async closure andfleet worktree— refresh that one ref first. The refspec-lessorigin <branch>form is deliberate: it is what opportunistically updatesrefs/remotes/origin/<branch>, the refworktree addthen resolves — behind a--terminator, because git's parser takes options after a positional, so a base oforigin/--upload-pack=/tmp/xwould otherwise reach--upload-packand run it (reproduced; git refuses to create such a branch, so it can only come from someone typing it, but the terminator is one token).--no-write-fetch-headbecause FETCH_HEAD is the user's and a manualgit merge FETCH_HEADmust not merge fleet's fetch (it costs the feature on git <2.29, the safer of the two failures);-c gc.auto=0 -c maintenance.auto=falsebecause a fetch normally signs off by kicking automatic housekeeping, which on a large repo is a repack competing with the agent sessions already running. Only anorigin/-prefixed base is fetched — the only form fleet produces — since splitting a bare name on/would read a localfeature/fooas remotefeatureand spend the whole budget on a fetch that cannot work. Advisory, exactly like the file copies beside it, and the budget is two mechanisms rather than one:fetchTimeout5s (deliberately under the 8sgitTimeout— offline it can only ever fail, so the budget is what an offline user should wait) pluscmd.WaitDelay, without which the timeout does not bound anything.CommandContextkills git on expiry, butCombinedOutput'sWaitthen blocks until every holder of the pipe's write end exits, and a fetch over SSH hands that end to ansshgrandchild the kill never reaches — measured at 30s against a 1s budget, with theCreating…phantom spinning the whole time (TestFetchBaseRefReturnsWhenAChildLeaksThePipe, which needs a full second of budget: a shorter one kills the fake before it spawns the grandchild and then passes against the unfixed code).GIT_TERMINAL_PROMPT=0governs git's own prompts and not ssh's, which reads/dev/ttydirectly and would print over the TUI, soGIT_SSH_COMMAND=ssh -o BatchMode=yesis set too — only when the caller defines none, since overriding one carrying an identity turns a working fetch into a silently failing one; acore.sshCommandin config is the residual gap, andWaitDelaybounds it. Any failure branches from the refs already there. It runs after the dialog closes, inside theCreating…phantom's window, where a ~2s round trip is invisible — at dialog-open time it would either hold the box shut for it or move the base-branch suggestion rows under the cursor when it landed. Deliberately not periodic: measured across 10 origin groups here, the repos worktrees are actually cut from were already current (agent sessions fetch as part of the work), so a background sweep would spend ~2s per group forever to refresh what is already fresh. Skipped when the branch already exists, on both paths (git.BranchExists, promoted out ofcmd/fleet):Createretries without-b, which drops the base, so the fetch would refresh a refworktree addnever reads.F(fork) is untouched — it branches from the session's HEAD, not from origin.GetDefaultBranch's fallback had to change with it:git init+git remote addwrites norefs/remotes/origin/HEAD, so it returned a bare localmain/master, which both contradicts its own contract and misses this gate — it now prefersorigin/<name>when that ref verifies, leaving the bare name only for a repo with no remote copy at all. .fleet.json/.fleet.local.jsonin repo root (legacy.bc.json/.bc.local.jsonstill read):{"workspace": {"list": "cmd", "create": "cmd {{name}} {{branch}}", "destroy": "cmd {{name}}"}}.fleet.json/.fleet.local.jsonmay also set{"pr_checks": {"ignore": ["glob", ...]}}to drop matching CI checks from the PR-badge rollup — commit-status contexts (policy-bot, external CI) included, matched by their context name, sinceasCheckRunfolds the rollup'sStatusContextrows (context/state) onto theCheckRunshape (name/status/conclusion); fleet once read onlyname, silently dropping every commit status, so a pending policy-bot left a blocked PR green and a failed external CI never turned it red (path.Match globs; lists from both files merge additively; opt-in, empty by default).fleet.json/.fleet.local.jsonmay also set{"linear": {"team": "BRZ"}}and/or{"jira": {"project": "OPS"}}(or the plural"teams"/"projects"lists) to name the team(s) and project(s) this repo tracks. For Jira this is the gate that turns ticket features on; for Linear it is an override of the default (your own teams), and{"linear": {"enabled": false}}switches Linear off for the repo (Enabled *bool; a localenabledwins, and a localteam/teamswith no localenabledre-enables a committedfalse— naming your team is asking for Linear there)..fleet.local.jsonis usually the right home: team membership is personal and.fleet.jsonis committed. The keys merge differently, on purpose and identically for both trackers: a localteam/projectreplaces the committed one (personal membership overriding a repo default is the point), whileteams/projectslists are appended and deduped — two trackers with two sets of merge semantics would be a thing to look up rather than a thing to know. Linear falls back toteam_idin a.linear.toml. There is deliberately no per-repositefor Jira: an Atlassian API token is scoped to an account rather than a site, so a repo pointing at a second Jira has no guarantee the same token reaches it- Worktree placement (
worktree_path, issue #353):config.jsonsets it user-wide,.fleet.json/.fleet.local.jsonper repo (local replaces committed, repo beats global). A template over{{repo}}(repo folder name) and{{name}}(sanitized branch), resolved byworkspace.ResolveWorktreePath:~is home, a relative path is resolved against the repo root, and unset is../{{repo}}-{{name}}, the sibling layout fleet always produced. A template without{{name}}names a directory: the folder inside is{{name}}when the directory already carries{{repo}}("../{{repo}}.worktrees"→fleet.worktrees/feat-x) and{{repo}}-{{name}}when it doesn't ("~/worktrees"→~/worktrees/fleet-feat-x), so one shared directory can't collide two repos' branches of the same name. A path inside the repo is refused — it would sit untracked in the main checkout'sgit statusand be walked by every recursive search from there; thewdialog's→preview shows that error before Enter. When the setting is set anywhere, that preview also names the file it came from (→ ../fleet.worktrees/feat-x (from .fleet.local.json), viaWorktreePathSetting→GitWorktreeProvider.PathSource; nothing is added for the default) — three places can set it, and the preview is where "why is it going there?" gets asked. The source is the file that won: a.fleet.local.jsonthat exists without the key falls through to.fleet.json. Because providers are built byResolveProviderfrom a repo path alone andworkspacemust not importconfig, the global value is package state set once at startup (SetGlobalWorktreePath, fromNewHome,fleet worktree, and live from the Settings → Behavior "Worktree location" row) — hand-editingconfig.jsonneeds a restart; the resolved template ridesGitWorktreeProvider.PathTemplate, which is what the dialogs' per-frame preview reads (ProviderPathTemplate, no disk access).git worktree addcreates the missing parent directory itself. Placement only — existing worktrees are not moved. .fleet.json/.fleet.local.jsonmay also set{"copy_files": {"paths": ["path", "dir", "glob/*", ...]}}to copy gitignored files/dirs/globs from the source repo into each new worktree (filepath.Glob semantics, repo-relative only; lists from both files merge additively; opt-in, empty by default; applies to both git-worktree and shell providers; independent ofcopy_claude_settings)- Multi-agent: per-session agent (Claude, Codex, OpenCode, Copilot, or Antigravity), chosen at creation (
Akey picker ordefault_agentconfig used bya). Stored in SQLiteagentcolumn;internal/agentowns binary name + launch command (claude/codex resume <id>/codex fork <id>/opencode --session <id>/opencode --session <id> --fork/copilot --session-id=<id>/agy --conversation <id>). Capability gates live onagent.Type—SupportsEffort(not OpenCode),SupportsFork(not Copilot or Antigravity: launching it with the parent's id would take over the parent's conversation, sof, its menu row and theforkSessionMsghandler all refuse, andBuildLaunchCmddrops a fork id rather than resuming it),PreMintsSessionID(Copilot only). Every agent switch in fleet ends indefault:= Claude, so a new agent needs an explicit case at each one or it silently launchesclaudeand gets Claude's pane heuristics. The list of agents itself isagent.All(pickers,--agentvalidation and help viaagent.Known/agent.NameList,default_agent). - Multi-account (Claude only,
internal/claudeaccount): several Claude subscriptions, one per session, so a spent 5-hour window on one doesn't stall the fleet. The mechanism is one env var —CLAUDE_CONFIG_DIR(claudeaccount.ConfigDirEnvVar) pointing at a directory that holds that account's own claude.ai login — appended inSession.sessionEnv()(session.go), the single chokepoint already feedingStart/Restart/RespawnClaudevia tmux-e. Each session therefore authenticates exactly as a plainclaudein a terminal does: nothing is layered over anything, so claude.ai connectors, Remote Control and/api/oauth/usageall keep working. - Why not
ANTHROPIC_AUTH_TOKEN(which fleet shipped first and then replaced): it sits at auth precedence 2 and displaces the claude.ai login, so every session lost connectors and Remote Control and printed a banner saying so. Theclaude setup-tokencredential behind it is inference-only, which forced three separate workarounds — it can't name its owner (so accounts were keyedaccount-<sha256(token)[:8]>, and rotating a token minted a second identity that orphaned every session pinned to the old one), it can't read/api/oauth/usage(so quota came from a hand-rolled probe that POSTed to/v1/messagesand read rate-limit headers, spending real quota to measure quota), and it can't be verified (so a refused token scored as unknown and won everyleast_usedcomparison). All three are gone. Measured, not assumed:CLAUDE_CODE_OAUTH_TOKENis worse still — against 2.1.221 with a Keychain login present it is ignored outright. - Two config dirs hold two independent logins. On macOS the Keychain service name is
Claude Code-credentialsplus, whenCLAUDE_CONFIG_DIRis set, the first 8 hex ofsha256(NFC(dir))— derived by reading the shipped binary and confirmed against a live login (/tmp/cc-spike-a→Claude Code-credentials-5205b77d, pinned byTestKeychainServiceIsScopedToTheConfigDir). That suffix is the whole mechanism.Account.ConfigDiris therefore stored verbatim and the path is random (~/.config/fleet/accounts/<8hex>), never derived from the email or label — the Keychain item is keyed by the exact path, so deriving it from anything renameable would orphan the login. - Account dirs are provisioned on every launch, not just at add time (
Provision):projects/,skills/,plugins/,agents/,commands/,ide/are symlinked back to the real~/.claude,settings.jsonis copied (so fleet's hooks ride along, and so a future per-account setting isn't silently global), andmcpServers+ per-projecthasTrustDialogAcceptedare mirrored out of~/.claude.json. Sharingprojects/is load-bearing: it holds the transcripts--resumereplays and fleet reads for auto-naming, and it is what lets a session move between accounts and still resume the same conversation. Per-launch because the user's~/.claudekeeps moving; a dir that captured its state once would drift into a subtly different environment. Not shared: the credential (the point) andhistory.jsonl. - Account identity is read, never guessed:
claude auth statusreportsemail,orgId,orgNameandsubscriptionTypefor a real login.Emailis the key and it is an actual address.Store.Upsertstill matches onOrgUUIDfirst (indexOfLocked), which now means "logging the same subscription in twice updates the existing account" rather than papering over a fingerprint rotation. A blank org never matches; a different org is a different subscription, never a correction. - Add an account via
Ctrl+K → Manage Claude Accounts→a, which opens afleetauth_pane (deliberately not afleet_prefix, sotmux.ListSessionscan't mistake a login pane for an agent session) runningclaudewith a freshCLAUDE_CONFIG_DIR; the user runs/login. Completion is detected by pollingclaude auth status(WaitForLogin), not by scraping the pane — the old flow regex-matchedsk-ant-…off the screen, coupling fleet to Claude Code's wording and allowing a half-success (login worked, capture missed) that needed a paste fallback. There is no paste path any more;aretries (the footer advertised ap pastekey for a while after the flow was deleted — there was never a handler). An abandoned login's dir is removed rather than left forProvisionto keep refreshing. The dialog also owns the strategy:scyclesaccount_strategythroughclaudeaccount.Strategies, with the value stated above the list. It sits here as well as in Settings because the strategy governs the list below it, and because it is what makes the★legible — a marker that appears only undermanualreads as a property of the account rather than of the mode. The dialog picks the next value itself before emittingaccountStrategyMsg, so its row repaints on the keypress rather than a round-trip later. Cycling tomanualwith nothing pinned toasts a prompt to press⏎(manualNeedsDefault):Selectfalls through to the automatic modes when the pin names no configured account, so that state is not broken, it is silently not doing what the mode says. - Assignment (
claudeaccount.Select, the one place strategy lives) viaaccount_strategyconfig:least_used_weekly(default, most weekly headroom),least_used_5h(most 5-hour headroom),waterfall(configured order, skipping spent),manual(default_account, strict — it returns the chosen account even when spent, since quietly rotating away defeats the only reason to pick that mode). The least-used pair differ only in which windowpctOfreads, viarankWindow→Usage.Pct(Window). Weekly is the default because the two windows fail on different timescales: a 5-hour bucket refills this afternoon, so losing that race costs an hour, while a weekly bucket spent on Tuesday is gone until the following week — and ranking on the fast window lets every account's slow window drain in lockstep, which is the state that takes the whole fleet down at once. The pre-splitleast_usedsurvives as an alias, not a value:ParseStrategyresolves it to weekly (same as unset) andStrategies— the ordered set both pickers offer — deliberately omits it, so cycling can never land on it. Mapping it to the 5-hour variant instead was rejected: it would make the presence of the key change behaviour, so the same file would behave differently depending on whether it was ever written.StrategyLabel/StrategyLabelslive inclaudeaccountfor the same reasonWindow.Namedoes — the Settings cycler and the accounts dialog both render them, and two copies of the strings is how they stop agreeing. Selection-only: the accounts list, move picker and header readout still show the 5-hour figure regardless of strategy. Sessions are pinned at creation: Claude's prompt cache is per-account, so re-picking on every restart would drop the very thing a restart preserves. Forks inherit the parent's account (forkSessionMsg.account) — a fork resumes the parent's conversation and must authenticate as its owner. - A missing login is evidence; every other poll failure is not.
FetchUsagereturnsErrNotLoggedInfor 401/403, the poll stampsUsage.LoggedOut, andSelectdrops those accounts viadropLoggedOutahead of every strategy includingmanual. Without it an account with no login never gets a reading, sopctOfscores it atunknownPct(50) — which beats a healthy account at 59% and hands every new session the one account that cannot run, with no error anywhere. Categorically unlike spent, whichSelectstill returns (soonest to reset) because a wait ends; a missing login doesn't, so emptying the candidate list is right and the caller falls back to the ambient login.LoggedOutis live state onUsage, never persisted — an account heals the moment it is logged in again (handleAccountLoggedInreplaces the usage entry outright, so the fix isn't invisible until the next poll). Shown as✕ logged outin the accounts dialog and the header readout, which renders it even with no reading at all. - Restart heals a pin that can't run (
healAccountBeforeRelaunch, called fromrestartSessionandresumeSelected): if the pinned account was removed, is logged out, or is spent, the session is re-picked, persisted viaUpdateAccountand announced in a toast — pinning protects a prompt cache, and there is no cache worth protecting on an account that can't answer. An unpollable account is left alone: fleet failing to reach Anthropic is not evidence against the login, and healing on it would rotate the whole fleet during an outage. A heal forces the fullRestart()path, neverRespawnClaude—respawn-pane -elayers over the environment tmux created the session with, so a move to the ambient login (which sets no variable) would inherit the old dir. - Manual move:
.→ "Move to Account…" (move_account→openAccountPicker), a row-anchored dropdown (internal/ui/account_picker.go) built on the context-menu overlay pattern. Shows each account's 5-hour figure — the header is deliberately quiet because it's always on screen, but here you're choosing because one is spent. The current account and any logged-out one render dimmed with the reason and are skipped byj/k. It always relaunches, and says so in the footer: the config dir is baked into the tmux environment at launch, so a move that only rewrote the record would relabel the row while the live process ran on the old account. FollowscontextMenuTarget, not the cursor (TestPickedAccountFollowsTheTargetNotTheCursor). - Account at creation (
A→SessionCreateDialog,internal/ui/session_create.go): anAccountcycler row besideAgent, so a session starts on the right subscription instead of being created wrong and moved — the only manual control before this was "Move to Account…", which pins and relaunches an existing session.↑↓move between rows,←→cycle the focused row's value, in the Settings detail pane's idiom (renderDetail);tabtherefore means "next row" rather than the "next agent" it meant while there was one row. Options areAutofirst and preselected, then each account with its 5-hour figure. Auto ridessessionCreateMsg.account == "", which already means "let the strategy pick" — so nothing changes for anyone who just pressesA ⏎, and noaccountSetcompanion bool is needed (unlikeforkSessionMsg, where""is a live identity meaning the ambient login). Auto's label names the accountaccount_strategywould land on, resolved throughselectAccountFor, whichresolveAccountnow also calls: two hand-builtSelectOptswould drift, and a label naming a different account than the one billed is the lie the account labelling exists to stop telling (TestAutoOptionNamesTheAccountResolveWouldPick). Rows are built bysessionCreateAccountRows, modelled onopenAccountPickerminus itscurrentclause, and the dialog is a pure function of what it was handed — it never reads the store, so it tests without one. Nil below two accounts: with one or none every session runs on the same credential, so the row would be a constant — the rulepreviewAccountLabelalready applies to the preview footer, and it keepsAuntouched for the majority. On a non-Claude agent the row goes inert, not hidden (accountRowActive): hiding it would change the box height mid-keystroke, so it dims toClaude only— with the account name removed, since "yuval@brizz.ai Claude only" reads as "this session runs on yuval@brizz.ai". The selection survives the round trip andentersendsaccount: ""there regardless. A blocked account is landed on, dimmed with its reason, and refused — a cycler can only honour "a disabled option is shown with its reason" by letting you reach one, so⏎is gated bysubmitBlocker, the one function the footer also reads (thestatusReportFormshape), and the footer swaps to<reason> — ←→ pick another. It also drops its↑↓ fieldhalf whenever the Agent row is the only one that can move, so no dead key is advertised. Finally, an explicit account skipsresolveAccountand with it the per-origin allowlist, sohandleSessionCreatere-checks it at the chokepoint — the same checkresolveLaunchAccountmakes for an explicit--account, because a policy holding on one surface and not the other is worse than not having one. - Quota comes from
GET https://api.anthropic.com/api/oauth/usage— the cheap official route, available because a real login carriesuser:profile. Reading it consumes no message quota. The bearer is read out of that dir's Keychain item at poll time and never stored (accessToken,security find-generic-password -w). Values are already percent (0..100), unlike the rate-limit headers the old probe parsed, which were fractions — exactly one of the two ever needed scaling. Polled on the worker's heavy pass, throttled ≥180s per account — except across a window's own reset (Usage.StaleAfterReset), where the throttle is broken because the numbers have stopped describing the bucket they were read from: a spent account otherwise keeps reading spent for three minutes after it came back, with its countdown already at zero, which is exactly when its owner is watching. Bounded below byAttemptedAt, not simply "the reset is in the past" — a poll that fails at the boundary movesAttemptedAtpast it, so the account backs off normally instead of retrying every tick against an endpoint that just refused. Failure is recorded rather than raised, so an unpolled account reads as unknown, not spent, andleast_useddegrades into waterfall order. - The CLI ranks on the same quota (
claudeaccount.UsageForLaunch←selectLaunchAccount):fleet worktree/fleet addwith no--accountunder a least-used strategy feedSelectthe TUI's readings via~/.config/fleet/account_usage.json(0600, no credential or error text), which the TUI's poll writes. A reading attempted withinMinPollIntervalis reused (Usage.PollDue, the TUI's throttle); otherwise all candidates are fetched in parallel underCLIFetchTimeout(3s). A reading older thanUsageCacheMaxAge(2× the poll interval) stops ranking unless it shows the account spent. A quota failure never blocks a launch: stderr names each unread account and why. A re-login in the TUI replaces that account's entry with the login's own reading, or drops it (ResetCachedUsage), since the cache carriesLoggedOut.securityruns as/usr/bin/securitybecause launchd may give no PATH. GuardConflictingAuthmatters more here than it did before. A config dir's login sits at the bottom of the precedence order, so an ambientANTHROPIC_AUTH_TOKENorANTHROPIC_API_KEYinherited from the user's shell silently overrides every account at once. tmux-ecan add variables but not remove them, so a session can't scrub what it inherits — refusing loudly is the only honest answer. (fleet's own helper commands do scrub, viaconfigDirEnv: fleet is often launched from a fleet session, and an inherited credential would makeclaude auth statusreport the wrong account.)- Nothing in fleet stores a credential any more.
accounts.json(0600) holds emails, orgs and directory paths; the logins live in the Keychain.sanitizeForIssue(statusreport.go) still redactssk-ant-*at the chokepoint, guarded byTestBuildStatusReportBody_NeverLeaksAccountToken— cheap insurance, not a load-bearing defence. - Header readout (
internal/ui/accounts_header.go, Appearance cycleraccount_usage_style): per-account usage top-right, both windows every frame, 5-hour first, each carrying when that window resets — a weekly figure without its horizon is unactionable. Two styles:split(default) gives each window its own countdown (yuval 12%(2h) 34%(5d)),groupedpools them (yuval 12%/34% (2h/5d)),offhides the strip. It replaced a strip that moved on its own: the readout used to show one window at a time and swap every 6s off the wall clock, and pick one of six densities by measuring what the breadcrumb left over — so a corner of the screen changed on a timer and reshaped whenever the cursor moved to a longer session title. Nothing here reads the clock now except the countdowns (TestReadoutIsStableOverTimerenders at three offsets and demands byte-identical output). Nothing names the windows — order does, which is why 5-hour leads in every style and state; the countdowns cannot stand in for it, since a weekly window about to roll over reads3hexactly like a 5-hour one. The two styles are the same width by construction (four tokens plus five characters of glue either way), so neither is called "compact" and the fit ladder is style-independent — a narrower style would put the grouping back under the breadcrumb's control. That ladder is now two steps: drop the account names, then render nothing (it never falls back to the other style, for the same reason). A spent window is not special-cased intospent <countdown>any more —quotaStylealready paints anything atExhaustedPctred, the same thresholdSelectstops handing the account out at, and the countdown sits beside it, so the state is legible without the chip changing shape and the other window's figure survives instead of being hidden. A reset that has already passed rendersnowrather than dropping the parenthetical (100%(now)): a countdown that vanishes at the moment it reaches zero leaves a red figure with no horizon in the one state where the horizon is the whole answer, and it is the chip changing shape on a timer.nowis a claim that a fresh figure is one tick behind it, so it is gated onErr == nil && reset.After(FetchedAt)— neither the wall clock nor the reset time can promise that on their own. A failing poll advancesAttemptedAtpast the reset, which is what bounds the throttle break, so across an outage spanning a reset nothing re-polls and the strip would read34%(now) 71%(now)for its whole duration; and a poll that succeeds while returning an already-past reset (a 5-hour block is anchored to its first message, so a lapsed one can report its oldresets_atfor hours) is answering about a window it has already left. Both fall back to""— the bare figure this rendered before the countdown existed. An unknown reset drops as it always did.✕ logged outstill takes the whole chip (no numbers to show) and renders even with no reading at all. Ingroupedthe countdown parenthetical is all or nothing — pooled countdowns make12%/34% (5d)unreadable — whilesplitdrops each independently. Hidden below two accounts, or when even the nameless form would overflow and push the What's New badge off its corner.account_usage_stylesupersedes the legacyshow_account_usagebool, of which onlyfalsemigrates (→off); the Settings cycler clears it on write. - Per-origin allowlist (
allowed_accountsconfig, keyedorigin:<key>— the same keyspace ascollapsed_groups/snoozed_groups; empty = all allowed). Deliberately not.fleet.json, which is committed — account policy is personal. Chosen over a per-origin pin because it composes with rotation: a pin has no good answer when its account is spent, while an allowlist does. Edited from.on an origin header → "Allowed Accounts…" (internal/ui/allowed_accounts.go), a row-anchored checkbox dropdown on the account picker's overlay pattern. Origin rows only: the key is per-origin, so offering it from a session or worktree row would put an origin-wide rule behind a control that looks like it acts on the row you're standing on. Ticking every account deletes the key rather than storing the full list (config.SetAllowedAccounts) — the two read identically today, but a stored list silently locks out the next account added, with nothing on screen to explain it;atoggles all, so it doubles as "remove the restriction". Zero ticked is refused, not saved (same rule asSnoozeDialog's unparseable box): an empty list already means unrestricted in config, so saving it would do the opposite of what ticking nothing looks like it asks. A logged-out account stays tickable here — deliberately unlike the move picker, which can't move a session onto a dead login: this is policy, not availability, and "client work runs on the work subscription" stays true while that subscription is logged out. Rows are built fromStore.List, so an email naming a removed account has no row and is dropped on save — opening and saving heals the stale-allowlist stateresolveAccountrefuses new sessions on. That heal is why the menu guard is asymmetric:only one accountdims the row atLen() == 1only when the origin has no stored allowlist. Removing an account never prunes the allowlists naming it (accountRemoveMsgclearsdefault_accountand nothing else), so removing down to one account can leave an origin pointing at an account that no longer exists — whichresolveAccountanswers by refusing every session there, with the one UI that could clear it dimmed andconfig.jsonas the only escape. Deliberately not fixed by pruning on removal: empty is unrestricted, so pruning to empty silently widens the policy, andAllowedConfigured's doc comment names "an account since removed" as precisely the case where falling back is "the one genuinely wrong answer".openAllowedAccountsmirrors the guard exactly, so a lit row can't dead-click and a dimmed one can't be reached another way. Sessions already pinned to a now-disallowed account are left alone; the allowlist governs selection, and the prompt cache it protects is per-account. - Codex status: hook-driven with Codex-specific pane checks — Codex hooks are incomplete (a wait/approval prompt and a permission approval fire no hook), so a definite pane state overrides a stale hook (
codexPaneWaiting→waiting,codexPaneRunning→running); an at-rest pane lets the hook decide running/finished/idle, and with no hook at all it settles to idle (see the Codex branch inUpdateStatus, session.go). Same pipeline as Claude —fleet hook-handleris agent-neutral (hook_event_name/session_id/promptmatch Claude). Hooks installed to~/.codex/hooks.json(InjectCodexHooks, only whencodexon PATH). Codex has no SessionEnd →deadfrom tmux pane-death. Claude's pane heuristics never run for Codex sessions — the pane checks are Codex-specific. - OpenCode status: driven entirely by a generated TS plugin (no pane scraping); same agent-neutral
fleet hook-handlerpipeline. Unlike Claude/Codex declarative hook JSON, OpenCode's hook mechanism is a JS/TS plugin, so fleet writes~/.config/opencode/plugin/fleet-status.ts(InjectOpenCodePlugin, only whenopencodeon PATH; the resolved fleet binary path is baked in). One file serves OpenCode 1.x and 2.x through a single default export{ id, server, setup }: 1.x (1.4+) callsserver()for theeventhook, 2.x callssetup(ctx)and readsctx.event.subscribe(). Neither accepts the other's shape (2.x refuses the old namedexport const FleetStatuswith "Plugin must export a default definition with an id and an effect or setup function."; 1.x refuses a default export withoutserver()), and both read the same config dir, so picking a template byopencode --versionwould break whichever install fleet didn't probe. Events map to fleet statuses viaspawnSync(synchronous so the final status flushes before OpenCode exits, and ordering is preserved). 1.x:session.status{busy}→running,session.idle→finished,question.asked/permission.asked→waiting,question.replied/question.rejected/permission.replied→running. 2.x:session.execution.started→running,session.execution.succeeded/.interrupted→finished,session.execution.failed→error,form.created/permission.asked→waiting,form.replied/form.cancelled/permission.replied→running (verified against OpenCode 1.19.0 and 2.0.28). Both prompt families are live and are not interchangeable:question.*(1.x) orform.*(2.x) is the AskUserQuestion tool prompt,permission.*is a tool-permission prompt (only fires if the user setpermission: ask; OpenCode defaults to allow-all). Watching only one is the stuck-at-running bug — the branches are additive, never a swap. On 1.x the*.replied/*.rejectedlisteners are belt-and-braces (OpenCode publishessession.status{busy}right after a reply anyway); on 2.x they are load-bearing, since 2.x publishes nosession.statusand a busy period has exactly onestarted. Sub-agent sessions have their own ids and are ignored by a root latch (the first session id the plugin sees, kept onglobalThisbecause 2.x re-imports the file when fleet rewrites it, and a module-level latch would start over and could take a sub-agent). The latch filters lifecycle events (busy/idle/error) only: a permission or question prompt from a sub-agent, or a 2.x MCP form owned by"global", still blocks the root's turn, so it is reported under the root (reportAs) — dropping it left the row reading running while the pane waited on the user. Since that merges several sessions' prompts into one row, open prompts are counted (onglobalThis, like the latch): a reply reports running only when none is left open, busy is held back while one is (1.x re-announces busy after every reply), a reply with nothing open is dropped as stale (an interrupt can cancel a form after the turn already ended), and the turn's end clears the count.TestOpenCodePluginOverlappingPromptsruns the generated plugin undernodeto pin that sequence for both handlers. A 2.xsession.execution.failedis followed bysession.idle, as 1.x does, since nothing else ends that error. On 2.x the plugin only reports from a private server: 2.x runs plugins in a server rather than the TUI, and by default every TUI shares one background service that keeps the env of whichever client spawned it, so itsFLEET_INSTANCE_IDcan name the wrong pane.setup()stays inert unless the server is a privateserve --stdio(opencode --standalone, any client with the background service turned off,opencode run --standalone,opencode acp). That gate is load-bearing on 1.x too: 1.19's newer core loader also callssetup()next to theserver()hook, and only the missing--stdiokeeps it quiet, so never swap the gate for anything a 1.x process can satisfy or 1.x reports every status twice. Status under 2.x defaults still needs either a version-aware launch with--standalone(1.x's strict yargs root exits on unknown flags, and 2.x's root no longer takes--fork/--model) or a 2.x TUI-entrypoint plugin, which runs in the pane's own process. No dir-trust seeding needed (OpenCode has no trust gate). No SessionEnd →deadfrom tmux pane-death.UpdateStatusroutes OpenCode throughapplyHookStatus(shared with Codex); no pane heuristics run. - Copilot status (GitHub Copilot CLI,
internal/session/copilot.go,internal/hooks/copilot_hooks.go): hooks live in fleet's own file,$COPILOT_HOME/hooks/fleet.json(Copilot loads everyhooks/*.json, so install writes it whole and uninstall deletes it — never a merge intoconfig.json, which carries//comments and is rewritten by Copilot itself). The file needs a top-level"version": 1. The worker's hook-repair pass rewrites it when the fleet binary it names is gone (RepairCopilotHooks, same rule as Claude's: missing only, never merely different). Copilot's payload is camelCase and carries no event name, so each entry's command appends--agent copilot --event <name>andhandleHookHandlernormalises onto Claude's names (userPromptSubmitted→UserPromptSubmitetc.) so prompt capture andPromptCountrun unchanged; registering the PascalCase keys instead also works but registering both runs every hook twice. Subscribed:userPromptSubmitted,postToolUse/postToolUseFailure(→running: approving a permission fires no hook, the tool finishing is the first sign),notification(→waiting only fornotification_typepermission_prompt/elicitation_dialog),agentStop,sessionEnd. NeverpermissionRequest: Copilot treats a failing one as a DENY, so a moved fleet binary would refuse every tool call in every Copilot session on the machine — and it fires for auto-approved tools too, so it was never a waiting signal. NotsessionStart: it fires lazily, after the first prompt, and would flip the first turn to finished. Copilot runs hooks synchronously and for every Copilot session on the machine, so the handler returns beforedebuglog.InitwhenFLEET_INSTANCE_IDis unset (a line per tool call would flood the debug.log that bug reports paste) and skips the stale-file sweep onPostToolUse. Two gaps need out-of-band signals, both inupdateCopilotStatus: a cancelled turn (Ctrl+C mid-turn, Esc at a permission prompt) fires no hook at all, so while the hook says running/waiting the worker reads$COPILOT_HOME/session-state/<id>/events.jsonlbackwards (32KB, doubling while the window holds only bookkeeping, capped at 1MB — asystem.messageline alone measures 60–71KB) and a trailingabort(skippinghook.*/model.*/session.*/system.*bookkeeping) settles it to finished —assistant.turn_endalone is not an end, it also separates tool steps mid-turn; and/clearand/exitboth sendsessionEnd{reason:"user_exit"}, sosessionEndis neverdead— it maps to finished, and the pane decides: a hook has fired,pane_current_commandis back at a shell (tmux.IsShellCommand) and the owner Copilot process is gone → dead (the pane alone misreads a live Copilot under a tcsh respawn, Ctrl+Z, or a split window — measured). Otherwise it was/clear— or/exitwhile another conversation is open, which Copilot switches to; the pane can't tell those apart, so the id stays on the closed conversation until the user types again. The reason still marks the hook as a SessionEnd, which keeps a dead session's crash dump from re-arming. A definite pane state (a│ ↑/↓ to navigate · enter to select/enter accept · ctrl+d declinemenu → waiting — the box edge is part of the match, and footers are matched only in the last 3 non-blank lines (copilotFooterLines), so a reply quoting one can't pin the row, since/theme's picker shows the same footer words outside a box and other pickers (/resume,/model,/agent,/mcp) were checked not to match, theesc interruptworking footer → running) overrides a stale hook, Codex-style; fixtures captured from a live pane are ininternal/session/testdata/copilot/. The conversation id is minted by fleet (launchWillResumeLocked, first launch):copilot --session-id=<uuid>creates the session when it doesn't exist and resumes it when it does, so one form covers every launch andr/suspend work before any hook fires. That id is authoritative (copilotHookAccepted): Claude's same-process rotation rule does not apply, because one Copilot process holds several conversations —/newstarts a fresh one and keeps the old one open (both holdsession-state/<id>/inuse.<pid>.lock; nosessionEnd, nosession.shutdown), and the Sessions sidebar runs more side by side. What moves the session is the user typing: the hook handler records the conversation of the lastuserPromptSubmittedasprompt_session_idin the status file (kept across later events; written for Copilot hooks only, so aclaude/codexrun as a tool can't claim it), and a foreign id is adopted only when it equals that. This covers/new,/clear,/resumeand a sidebar switch, survives fleet being closed meanwhile (the file still says where the user typed), and a backgrounded conversation finishing its turn can't pull the session back. Subagents fireuserPromptSubmittedtoo, under their own id, along with their tool and stop hooks — but a subagent logs into its parent'sevents.jsonland never gets asession-state/<id>/of its own, while a real conversation always has one before its first hook runs (session.startprecedes it). SoisCopilotSubagentdrops those hooks in the handler, before they can overwrite the user's prompt (auto-naming) or read as the conversation being typed in. First prompt is--interactive="$FLEET_INITIAL_PROMPT"(the=form;-i "--x"exits with "Invalid command format").Ysends Enter alone for Copilot: its menus pre-highlight "1. Yes", and a typed letter can land in the "No, and tell Copilot…" text row.fleet send's delivery check also accepts Copilot's collapsed paste,[Paste #1 - 12 lines](matched squashed as[Paste#). - Relaunch death rattle (all agents):
r/respawn/suspend kill the old agent afterclearHookState, and its shutdown can still fire aSessionEndcarrying the same conversation id the relaunch resumes.clearHookStatekeeps the old owner's pid asretiredPIDandUpdateHookStatusdrops any hook from it — the pid is the only thing that tells it apart. Claude recovered from this on its nextSessionStart; Copilot fires none at launch, so its "hook fired + pane is a shell" rule would read it as a crash. A relaunch of an agent that never fired a hook has no pid to retire; for Copilot (which fires nothing at startup) a SessionEnd arriving before any other hook since the relaunch is that killed process's and is dropped, for 5s after the relaunch (relaunchQuietTo; the rattle lands within ~2s) — so only an/exittyped in those first seconds reads idle. The retired pid is honoured for 10s (retiredHookWindow), so a later agent the OS hands the same pid isn't silenced.RespawnClaudenever SIGHUPs a pid whose pane is already at a shell — that Copilot exited, and its pid may be someone else's now. Copilot needs one more thing on relaunch (awaitRetiredAgent, shared with Antigravity): it holds a per-process lock on its conversation, and a busy Copilot takes ~1.8s to exit after the kill (it runs itssessionEndhook on the way out), so a new one started at once opens on a "Session in use — Resume anyway?" menu.Restartwaits (capped at 5s, off the Update loop) for the old pid to exit — including, within 5s of aSuspend, the agent the suspend killed (a Copilot that has had a turn keeps its lock ~0.4–0.9s after the kill, measured;resumeWaitPID, never on the signalling respawn path);RespawnClaude'srespawn-pane -kkills and relaunches in one step, so for Copilot it first sends the old process SIGHUP itself. Both act only afterpsconfirms the pid is still acopilotbinary, since it came from a hook and could have been recycled. - Copilot trust: a folder that isn't trusted opens on a "Do you trust the files in this folder?" menu, behind which no hook fires.
EnsureCopilotDirTrustappends the realpath totrustedFoldersin$COPILOT_HOME/config.json— notsettings.json, which was verified not to work (Copilot migrates a settings entry into config.json and drops it when config.json already has the key). The file is JSONC that Copilot owns, so the file is re-serialized (values kept and written without HTML escaping, keys sorted, comments other than the//header dropped); it runs in the launch'stea.Cmd, never the Update loop, under its own mutex (not Codex'strustMu) plus Copilot's ownflock(LOCK_EX)onconfig.json.trusted-folders.lock(measured in Copilot 1.0.91; never deleted), so parallelfleet wtprocesses and Copilot itself can't drop each other's entries. Best effort: the lock is tried for 2s, and a stuck holder or a filesystem that can't lock means seeding unlocked — a lost entry shows as the trust menu, a launch that hangs doesn't show at all. The same step writes the hooks file if it's missing or stale, since startup installs it only whencopilotwas on PATH then, and the comment stripper is string-aware ("https://github.com"would otherwise be cut). Copilot's own trust propagation covers only worktrees it creates itself, so fleet seeds per session. A seed Copilot later overwrites shows as waiting (the trust menu shares the permission prompt's footer), never a silent idle. - Antigravity (Google's Antigravity CLI, binary
agy;internal/session/antigravity.go,internal/hooks/antigravity_hooks.go, handlernormalizeAntigravityEvent). Everything below was measured against agy 1.5.14 on macOS and Ubuntu, where the docs were wrong or silent. Launch:agy --settings="$FLEET_AGY_SETTINGS" [--conversation <id>] [--model m] [--effort e] [--prompt-interactive="$FLEET_INITIAL_PROMPT"]. agy parses flags with Go'sflag: an unknown flag and any stray positional exit 2 (unexpected argument … Prompts are read only from -p/--print, -i/--prompt-interactive), so-- "$P"is fatal and the prompt rides--prompt-interactive=. Trust rides--settings(session-only, never written tosettings.json— verified), carried in theFLEET_AGY_SETTINGStmux env var because it embeds the realpath'd project dir (agent.AntigravitySettings), so no trust seeding or file locking exists.--effortis a closed set (low…max): interactively agy warns and swaps in its default rather than exiting, soValidEffortrefuses at parse time. A minted--conversation <uuid>is silently ignored (new id), so ids come from hooks like Claude's; no fork flag (SupportsForkfalse). Hooks live under fleet's own keyfleet-statusin the shared~/.gemini/config/hooks.json(hooks insettings.jsonare never loaded), merged with every other key kept. Shapes are not interchangeable: tool-less events take[{"type":"command","command":…}], tool events[{"matcher":…,"hooks":[…]}], and a nested entry without a matcher makes agy skip the whole file (pinned byTestAntigravityHooksPassTheRealValidator, which runsagy plugin validate). NeverPreToolUse: a failing one blocks the tool call;PreInvocation/PostToolUse/Stopfail open. NotSessionStarteither: agy's own/hooksmanager writes it backnull. That manager also writes hooks.json back from the snapshot its session loaded, erasing an entry installed later (reproduced) —RepairAntigravityHooksrestores a missing entry on the 60s repair pass and leaves one the user switched off ("enabled": false) off.fleet hooks install|uninstall|statuscover it (uninstall regardless of PATH). The handler also drops an agy hook with noFLEET_AGY_SETTINGSin its environment — every agy session fleet launches has it, so that is anagy -pa tool ran inside another agent's session. Commands usenonFleetSessionGuard, whoseexecis load-bearing on Linux: Ubuntu's dash forks, so without it the handler's parent isshand ownership by pid inverts. Handler: payload is camelCase (conversationId,lastUserInput,invocationNum,fullyIdle). Subagents fire every hook under their own id withlastUserInput:""— dropped.PreInvocationwithinvocationNum0 isUserPromptSubmit, except a continuation (parent resuming after a subagent reports, same input, after aStop{fullyIdle:false}=hooks.EventBackgroundWait). Status is pane-led (updatePaneLedStatus, as Codex): no hook fires on a permission prompt, an Esc interrupt, a subagent's approval, or/exit. Waiting = a↑/↓ Navigatehint line directly above anesc to cancelstatus bar (command/create/edit/ask_question), a subagent's┃ … ctrl+k approvebanner above the input box, the Alt+J⚠ Approval Requiredview, or the trust / sign-in menus by wording; its own pickers (/hooks,/model) have noesc to cancelunder the hint and stay unmatched. Running =esc to cancelstatus bar, or live subagents (status barN subagent(s), dropped at ≤50 cols, or the left-aligned● Agent(…)dock rows, which survive). An at-rest pane under arunninghook settles to finished after the two-frame confirmation (settleInterruptedAntigravityTurn; a failed capture resets it rather than counting as at rest) — this also clears aBackgroundWaitwhosefullyIdle:falselied (agy sent it as a turn's final Stop with every subagent done). A one-shotfleet statusgets the second frame fromObserver.secondLook(agy only, only while that confirmation is half-built, ≤400ms), or it would report an interrupted turn as running until the next one. Dead = pane at a shell and owner pid gone (Ctrl+Z shows a shell over a live agy). Ownership: a new conversation id (/clear,/resume) is adopted only from the owner's own process (antigravityHookAccepted).Ysends Enter for agy's own prompts and Ctrl+K for a subagent banner (session.AntigravityApproveKey). Relaunch waits for the old pid (awaitRetiredAgent; a busy agy took 3.3s to exit, and two processes on one conversation get a "Conversation already open" warning). Titles:~/.gemini/antigravity-cli/annotations/<id>.pbtxt(title:"…", auto-generated and/rename). Skills:~/.gemini/config/skills, detected by binary only (~/.geminiis also gemini-cli's). The Linux installer leaves~/.local/binoff PATH, soMissingBinaryMessagenames it. - Codex trust: dir-trust pre-seeded to
~/.codex/config.toml([projects."<path>"] trust_level="trusted", viaEnsureCodexDirTrust) before launch; hook-trust is a one-time global TUI prompt the user accepts on first Codex launch (persists in config.toml[hooks.state]). - Session resume: captures the agent's session_id from hooks (Copilot's is minted by fleet), uses
claude --resume <id>/codex resume <id>/opencode --session <id>/copilot --session-id=<id>/agy --conversation <id>on restart - Editor: config.editor > $EDITOR > "code" (VS Code).
internal/editorresolves the name to a command: CLI launcher on PATH if there is one, elseopen -a <App>against the installed bundle. That fallback is what makes JetBrains IDEs (GoLand, PyCharm, IntelliJ, …) work — Toolbox doesn't installgoland/pycharmshims unless asked, so PATH-only lookup failed with "executable not found". Bundles are prefix-matched (PyCharm Community Edition.app→pycharm) across/Applications,~/Applications, and~/Applications/JetBrains Toolbox, scanned once per launch. The Settings editor cycler offers only editors this machine can actually launch (editor.Available()), so a preset can't be a dead option. Flags (code -n) are a CLI-only contract: a spec carrying them with no launcher on PATH errors rather than silently dropping them. - Themes: fleet-pink (default, flagship brand accent
#dc88c0), tokyo-night, catppuccin-mocha, rose-pine, nord, gruvbox — configurable via settings (S key) - Settings dialog: S key opens a master-detail overlay — category rail (Appearance / Behavior) on the left, that category's settings on the right;
tabswitches panes,j/kmove,←→/h/lcycle a value, auto-saves onesc. The Appearance category renders a live mock-sidebar preview (synthetic data viaRenderSidebarPreview→ the realRenderSidebar, so it can't drift) and holds: Theme, Status style (icon/bar), Agent icons, Slot badges, Account usage (split/grouped/off), PR badges, Dirty marker, Status pills, Header counts, Chevron style (triangle/plusminus), Density (normal/compact). Behavior holds editor, tick, auto-name, auto-update, copy .claude, worktree location (worktree_pathpresets: beside repo /<repo>.worktrees//~/worktrees/; any other template readsCustomand stays in the ring so an arrow can't overwrite it), confirm before restart, drawer height (rows, capped at the 14-row body max), origin forget removes worktrees, enter mode, telemetry, default agent, idle-session suspend (off/light/balanced/aggressive). - Display toggles: each Appearance toggle is a
*bool/string config field with a default-on getter (config.go) feeding a package global instyles.go(ShowAgentGlyphs,ShowStatusPills,ShowPRBadges,ShowDirtyIndicator,ShowSlotBadges,ShowHeaderCounts,ChevronStyle,SidebarDensity) — the same pattern asStatusIndicatorMode. Globals are synced from config viaApplyDisplayConfig(cfg)inNewHome(startup) and after each Appearance change; the sidebarrender*funcs read them at render time. - First-run onboarding: on first launch, after the analytics consent prompt, a one-time theme picker (
internal/ui/onboarding.go, gated bydisplay_onboarding_seenconfig flag) shows the theme cycler beside an annotated sample sidebar that teaches how to read status dots, agent glyphs, branch, worktree, dirty*, and PR badge.enterkeeps the previewed theme;s/escreverts and skips. Either way it's marked seen. - Telemetry (
internal/analytics): three modes viatelemetry_modeconfig (full/minimal/off; read throughconfig.GetTelemetryMode, which migrates the legacytelemetrybool — true→full, false→minimal). full = usage events tagged with git name/email (PostHog person profile; distinct_id = git email). minimal ("Basic" in the UI) = every event full sends, anonymously: distinct_id is the device hash, never the git email, and there is no people profile —identifyandSetUserPropertiesno-op (gated onClient.mode), and every event sets$process_person_profile=falseso the device still counts as a unique user (DAU). It used to send onlyapp_started+app_active, which left most new users unobservable at exactly the moment they left. What moved is who an event is attributed to, not the privacy line: no property may carry a file path, prompt, code, repo/branch name, email or error string — reasons are short enums, andsanitizePropertiesstill strips the blocklisted keys.editor_opened.editorpasses through a sanitizer ininternal/ui/analytics_props.go(editorName, the command's base name).error_occurred.categoryis a snake_case enum named at eachHome.setError(category, err)call site, and the guard globs the package's non-test files rather than listing them —setErroris a method onHome, so any new dialog file can call it, and an enumerated scan set would let the next one ship unchecked (thelen(seen)floor can't notice: today's callers clear it alone). It used to be derived from the message — the text before the first:, kept only when it read as fleet's own prose — which had to refuse anything carrying a digit or a punctuation mark, since a path, a branch name or a wrapped git error is made of exactly those. That refusal was doing its job and also swallowed most real failures intoother, because fleet's messages sayrestart failed: %wandslot %d was stale: a user's whole first-day error history could readotherand say nothing about what they hit. A literal at the call site is both accurate and safe by construction — no error text reaches the backend by any route, so the privacy line no longer rests on a regex being strict enough, and rewording a message can't silently retag it. The category is a parameter, not a defaulted second helper, so the compiler asks for it: a variant taking only the error would be theotherthis replaced, quietly reachable again.TestErrorCategoriesAreSnakeCaseEnumspins that every one is a string literal, snake_case, and notother(and fails if the scan stops finding call sites). Categories are what a funnel is grouped by — renaming one splits its history in two. The device hash is SHA256(IOPlatformUUID) on macOS and, on Linux, an HMAC-SHA256 keyed by/etc/machine-idover a fleet constant (machineIDHash) — never the ID or a plain hash of it, which machine-id(5) forbids because every app hashing it alike would share one value. A readable machine ID overrides thedevice_idcache, replacing the hostname + arch hash earlier Linux builds wrote (reproducible by anyone who can guess the hostname); that fallback now runs only where no machine ID is readable. off = disabled client, nothing sent.session_erroredis sent frominternal/sessiononce per move intoStatusError(newFailure): never from a session already in error, and never fromStatusStarting, where a liveness check that lands mid-launch sees a tmux session that doesn't exist yet — the launch reports its ownstart_failed/restart_failed/respawn_failed. Beside thereasonenum it carries what the death itself knows andreasoncannot.exit_reasonon a hook death: Claude Code's SessionEndreason(clear/logout/prompt_input_exit/other), threaded status file → watcher →HookStatus→Session.hookReason, and snapshotted in the sameRLockashookStatusrather than re-read later.hookStatusis what selects the death branch, and the hook path runsCapturePaneplus (rarely) a transcript walk in between;UpdateHookStatuswrites from the UI goroutine as well as the worker, so a fresh read would pair a staledeadwith a newer hook's reason — and/clearfires SessionEnd then SessionStart back to back, so the reading lost would be exactly the rotation this names. SessionEnd fires on/clearand/logouttoo, so without ithook_deadcannot tell a conversation rotation from a session that actually died — which is most of whathook_deadcounts. Stored unconditionally alongsidehookStatus, so it describes the hook being held rather than outliving it.exit_code/exit_signalon a dead pane: tmux's own#{pane_dead_status}/#{pane_dead_signal}viaexitProps, which separates a clean/exitfrom a SIGKILL the machine ran out of memory for.pane_deadonly —tmux_gonepassesniland never asks, because a gone session has no pane to report on (PaneDeadInfowould returnok=falseevery time) and the question is an uncachedlist-panescapped atlistPanesTimeout(2s). Affordable once, ruinous in the case the property exists to explain: an OOM-killed tmux server takes every session down at once, so one heavy pass would spend it per session against a 90sworkerStallThreshold. It also costs a tmux call on the branch that does ask, so it runs only on the transition (behindnewFailure).TestSessionErroredCarriesThePanesExitCodecounts the calls, since ontmux_gone"didn't ask" and "asked and got nothing" produce the same event and only the count tells them apart. Every value is an enum or a small integer tmux and Claude Code choose; an empty one is dropped, so the event is unchanged for a caller with nothing to add.startup_failed{tmux_missing}is sent frommainbefore the TUI exists, on a client it inits itself, and only for a user who has answered the consent prompt —GetTelemetryModedefaults to full, which is not an answer. First-run consent prompt (internal/ui/consent.go): accept → full, decline → minimal (the dialog's Basic line reads "anonymous usage — what's used, never who");offis Settings-only (Behavior category, 3-way cycler). EnvFLEET_TELEMETRY_DISABLED/DO_NOT_TRACKforce off regardless of mode.analytics.Heartbeat()(fired on the UI tick, rate-limited to once per calendar day in-memory) keeps DAU accurate for long-running instances that rarely restart; it runs in both full and minimal.SyncEnabledtears down + re-inits the live client when the mode changes in Settings — detaching the old client synchronously (soInitinstalls the new one) but flushing it on a goroutine, since Settings-close runs on the Update() thread. Backend is PostHog via theposthog-goSDK (built innewSink,analytics.go), which owns its own batching worker; the project (capture) API key is embedded like the old ingest token — write-only, ingest-only — withFLEET_POSTHOG_KEY/FLEET_POSTHOG_HOSTenv overrides. A build with the key stripped (projectAPIKeyblank) creates a disabled client and sends nothing. The SDK'sEnqueueblocks, soClientfronts it with a drop-on-full queue (queueSize256) drained by a background goroutine — that's what keepsTrack/Gaugesafe to call fromUpdate(); a full queue drops the event rather than stalling the UI. Quit flushes viaShutdown(bounded byshutdownTimeout, 2s). The SDK's ownDebugf/Logfare dropped, not forwarded (phLogger): they log the serialized message, whosedistinct_idis the git email in full mode, anddebug.logis what the bug-report flow pastes into a public issue — onlyWarnf/Errorf(counts + error strings, no payloads) reach the log, atWarnso broken telemetry is visible withoutFLEET_DEBUG. - First-run action trace (
internal/ui/firstrun_trace.go,onboarding_first_run_trace): the ordered list of what a newcomer did between their first launch and their first quit — one event per install, never again. Most newcomers leave inside their first few minutes and the funnel can't say why (the launchpad, a session that broke, never findingEnter, or simply not wanting it), and a TUI has no session replay, so a trace of what they pressed and what fleet showed them is the nearest thing:["0:consent_full","4:theme_keep","6:launchpad_shown","23:launchpad_enter","36:attach","40:detach_bail","145:quit"]. An entry is a second offset plus an enum from a fixed table, and that is the whole privacy contract — never a path, title, prompt, repo or branch name, error string, or typed character. It holds structurally rather than by discipline: the key hook sits inhandleKeybelow the modal / launchpad / focus / filter / drawer branches (wherenormalizeKeysits, and for the same reason — everything that owns text has already returned, andforwardKeyToPaneis never reached),recordrefuses any token outside^[a-z_]+(_x[0-9]+)?$, andTestFirstRunTraceEmitsOnlyEnumsparses every call site and both lookup tables, failing on an argument that is not a vocabulary constant or one oftraceDialog/traceCommand/traceMenu.ActionLogis deliberately untouched — it carriesdetailand serves bug reports, which stay on the machine until the user files one;h.logActionis the single funnel feeding both, andtraceForActionmaps only the actions with a vocabulary entry, so an unmapped one ("open editor","ticket jump","move account") records nothing rather than spelling its own action name. The two free-text prefixes are the exception and are safe for the same reason:"command: "/"context menu: "carry adispatchCommandid, itself an enum. Consecutivenavkeys collapse into one counted entry (nav_x12) stamped when the run began, so a scroll costs one slot of the 300-entry cap; past it the oldest are dropped and counted inentries_dropped.endedis the half that matters: newcomers close the terminal rather than quitting (we see launches with noapp_quit), so a trace living only in memory would miss exactly the runs worth reading — it is persisted to~/.config/fleet/first_run_trace.jsonon a ≥2s debounce and the next launch sends it asunclean, fromfireStartupAnalytics: the one place per launch that has a client to send with, since on a first launchInitdoes not happen until the consent prompt is answered. That write is synchronous on the Update loop — the one exception to the no-blocking-I/O rule, earned by being a few KB to a local file, at most every two seconds, during one install's first run; a goroutine would buy a write-ordering problem and a test that has to wait for it. A clean ending sends from the quit path besideonboarding_first_quit. One-shot viaMilestoneFirstRunTrace(analytics.MilestoneReachedis the read-only half — asking withMarkOnboardingMilestonewould answer the question by marking it): a launch is either the recorder or the reporter, never both, and that is enforced at both ends —firstRunTraceShouldRecordleavesh.firstRunnil atNewHomewhenever a leftover is waiting, andsendUncleanFirstRunTracereturns early wheneverh.firstRunis live. The second half is not belt-and-braces:fireStartupAnalyticsruns from theconsentResultMsghandler nine lines after it recordsconsent_full, which is the recorder's first record and so writes the file immediately (the debounce has no previous write to measure against) — without the guard the reporter reads that file straight back and the install's only event isended=unclean trace=["0:consent_full"], with everything after it unrecorded. A clean quit can also beatInit: someone who reads the consent prompt and quits never initializes a client, andTrackdrops what it can't send, soemitFirstRunTraceparks the event withanalytics.QueuePending(analytics.Initializedis the predicate) and theFlushPendingalready besideInitsends it next launch — stillended=clean, and still only once the user has answered consent. Recording stops the moment the milestone is marked, telemetryoffstill marks and deletes so an install that never reports is one-shot too, andh.firstRunis nil for every run past the first, so a regular pays one nil check per key. - Report dialog (
!): a type picker first (Wrong status / Bug / Feature), then a form sized to the kind — each files with its own label (bug/bug/enhancement) and its own body, so a feature request carries no debug log and a status complaint can't land as an undiagnosable generic bug (the #157 outcome). The picker is a stage of the existingBugReportDialog, not a new dialog, so it inherits every registration (modalOpen,routeToModal,renderBody,SetSize). Esc on a form returns to the picker; Esc on the picker closes. - Wrong-status reports (
internal/ui/statusreport.go): the capture fires at the!keypress, not at submit — status is a moving target, and by the time a description is typed the session may have self-corrected, so re-reading then would freeze a state nobody is complaining about.openBugReport(app.go) shows the dialog and returns the capturetea.Cmd; it lands viareportSnapshotMsg→SetSnapshot(ignored unless the arriving capture's session id matches the form's). The shown status and title are likewise read once at keypress. The form adds an expected-status cycler (running/waiting/finished/idle/error— notstarting, transient, norsuspended, user-initiated) that starts unset and refuses submit, same rule asSnoozeDialog's unparseable box; the footer names whichever field is missing. Body is two tiers: the signals table (hook status/event/age,pane_detectedvstui_shows, worker stalled,claude_log.advanced_past_hook) always ships and holds no user content; the screen excerpt (last 40 pane lines) plus the session-filtered debug log ship behindctrl+p, on by default, previewed in the dialog above the toggle so the default is visible rather than silent. Switching it off hides the excerpt from the preview too (a preview that outlives its checkbox is the ambiguity previewing was meant to remove) and drops the global debug log and config.json from the shared diagnostics block (FormatEnvironmentMarkdown(includeLogs)) — otherwise the toggle would remove one log and smuggle a wider one back in, and config carriesdefault_project_path, confidential in its own right when client names live in directory names. - Status-report body is built by allowlisted field reads off the snapshot map (
metaSub/metaString), neverjson.Marshalof it:snapshot.jsonembedshook.file_contents.user_prompt, the reporter's verbatim prompt, which the dialog never shows them.TestBuildStatusReportBody_NeverLeaksUserPromptguards it. Governing rule: nothing ships that the dialog didn't show or the checkbox didn't name. captureStatusSnapshot(..., persist, copyTranscript bool):Shift+Dpassestrue, true; the!path passesfalse, false.persist=falsetouches the filesystem nowhere — no dir, nosnapshot.json, and crucially nowriteGoroutineDump(runtime.Stack(all=true)pauses every goroutine, which must not sit on a hot interactive key).!fires a capture on every press, before a report kind is chosen, so persisting would fill~/.config/fleet/snapshots/with cancelled dialogs and feature requests and break the invariant thedebug-statusskill leans on: the newest dir there is a deliberateDcapture. Nothing is lost — the issue body is built from the returned values, never read back off disk, and the two files that exist only on disk (pane_raw.txt,goroutines.txt) are never published anyway.- Async capture is matched by session id, not visibility (
snapshotResult.sessionIDvsstatusReportForm.sessionID).!on A,esc,!on B are both visible status forms, so an id-blind guard lets A's slow capture land in B's form: the issue would be headed with B's title and status while every signal, the excerpt and the log came from A — publishing A's screen, which that dialog never previewed. - Submit gating runs through one function,
submitBlocker, consulted by both the Enter handler and the footer so the key can't act on a state the footer calls unready. It blocks while the capture is in flight (!captured && err == nil) — submitting then would emit "the capture failed or the session had no live tmux pane", a false cause, on exactly the undiagnosable report this flow exists to prevent. A capture that genuinely failed still submits: there the line is true. - Pane excerpts and titles truncate with
ansi.Truncate, never the byte-basedtruncateinbugreport.go. Pane lines are dense with 3-byte box-drawing runes (│ ╭ ─ ❯), so byte slicing cuts at roughly a third of the intended columns and can split a rune — the excerpt the reporter is asked to approve wouldn't match their screen, and invalid UTF-8 can reach lipgloss. sanitizeHome(statusreport.go) is the single home→~rewrite for everything bound for a public issue, including issue titles. A body that sanitizes while its title publishes/Users/<name>/…verbatim leaks on the one line GitHub shows in search results and notification mail.- Error history: ring buffer (max 50) of errors that flash for 5s — persists for bug reporting
- Action log: ring buffer (max 100) of user actions (attach, delete, restart, editor, approve, etc.) for "steps to reproduce"
- Diagnostics: app version, OS version (macOS
sw_vers; Linux distroPRETTY_NAMEfrom/etc/os-release+ kernel), tmux/claude/codex/gh versions, config, last 100 lines of debug.log; home dir sanitized to~ - Auto-naming: sessions titled from the agent's own session title (
session.ReadAgentSessionNamedispatches per agent); falls back to fleet's prompt heuristic (filler stripping, word-boundary truncation) only when the agent has written no title yet - Agent titles: Claude's come from the conversation JSONL (
ReadClaudeSessionName). Codex's come from its state DB (ReadCodexSessionName) —/renameinside Codex runsUPDATE threads SET title, and the rollout JSONL carries no title at all, so SQLite is the only source. It's read read-only at$CODEX_HOME/state_<N>.sqlite(highestNwins; Codex bumps the suffix with its schema). Codex seedsthreads.titlewith the raw, untruncated first user message, so a title still equal tofirst_user_messageis not a rename and is ignored — adopting it would swap fleet's short heuristic title for a multi-thousand-char prompt. Antigravity's come fromannotations/<id>.pbtxt(ReadAntigravitySessionName, id must be a UUID since it becomes a path). Copilot's come from$COPILOT_HOME/session-state/<id>/workspace.yaml(ReadCopilotSessionName): itsnameis model-generated after the first turn (like Claude'sai-title) and replaced on/rename(user_named: true), absent before that. OpenCode titles its sessions too; fleet doesn't read them yet. - Title precedence: manual R-key rename (
ManuallyRenamed) > the agent's own title (Claudecustom-titlefrom an in-session/rename, else Claudeai-title— auto, model-generated, evolves with the work; or a Codex/rename) > fleet prompt heuristic - Auto-naming pipeline: worker cycle re-reads the agent's title each cycle until one appears (
agentNameFreshPollWindow, so prompt pickup within ~2s), then ~every 30s (agentNameRecheckInterval) to followai-title/custom-title//renamedrift; heuristic fallback uses UserPromptSubmit hook → status file → HookWatcher → Session.FirstPrompt → naming.GenerateTitle - Manual rename (R key) sets ManuallyRenamed flag, prevents auto-rename
- Chrome tab control:
popens PR in Chrome via extension (reuses existing tab), falls back toopen <url>if unavailable - Chrome extension architecture: TUI →[unix socket]→ native host (
fleet chrome-host) →[stdio]→ Chrome service worker - Native messaging host:
fleet chrome-hostsubcommand (also auto-detected when Chrome passeschrome-extension://...arg) - Unix socket:
~/.config/fleet/chrome.sock(created by native host, mode 0600) - NMH manifest: auto-installed to
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.brizzai.fleet.tabcontrol.jsonon TUI startup - Chrome extension ID:
haphpcoecelhofejcklinnlbfijgdnih(stable viakeyin manifest.json) - Extension commands:
open_or_focus,close_tab,create_tab_group,ping - Service worker reconnects to native host on disconnect (2s delay)
- Claude Code + OpenAI Codex + OpenCode + GitHub Copilot CLI + Antigravity CLI, macOS + Linux (see
docs/linux.mdfor the platform split)