Secondary agent shortcut
Agents: New Secondary remains available in the Command Palette and accepts a user-assigned keyboard shortcut. The extension supplies no default binding for it; Cmd/Ctrl+Shift+B opens Pages. Activation must not write user keybindings.
What this is
AGI EXT is the VS Code and VSCodium extension for agents-cli. It turns an open-source editor into an integrated agents environment: every coding agent (Claude Code, Codex, OpenCode, Cursor, Antigravity, Grok, Kimi, Droid) runs as a full editor tab, the Active Session sidebar shows what the focused agent is doing, and the Project panel lists every session of the open project on every machine you own, the ones that need you pinned first, beside the project's pull requests and tickets. The editor becomes the place you steer a fleet from, the way it used to be the place you typed code.
The extension is a presentation layer. agents-cli owns every fact (sessions, devices, accounts, attention, activity) and every mechanism (launch, placement, resume, fork, stop, scheduling, watchdog). The extension renders what the CLI streams and turns a gesture into exactly one CLI verb. That split is the product's one architecture rule and the source of almost every requirement below.
It is for developers who already run several agents at once, usually across more than one machine, and who want to see and steer that work without leaving the editor. It is a private repository shipped publicly on the Marketplace and Open VSX under the frozen identity swarmify.swarm-ext.
Summary
Open the editor, press one chord, and an agent starts on the right machine with the right account, in the folder you have open. Look at the sidebar and know what it asked, what it did, and what is left. Open the Project panel and see every agent on the project wherever it runs, reach the ones waiting on you, and start an agent on the next ticket. Close the laptop, come back, and the tabs are exactly where you left them. None of that starts a poller, parses a transcript, or invents a status.
Goals
An agent starts from the editor without a prompt. Agents: New <Harness> opens a tab and the agent is running on a fleet worker with a balanced account in the open workspace. Check: press Cmd+Shift+A on a workspace, watch the tab open with agents run <harness> --interactive --device auto --cwd <workspace> --strategy balanced --mode auto and a live prompt inside it, with no picker shown.
The editor never invents a status. Every phase, needs-you flag, label, and timeline step shown comes from a row the CLI streamed. Check: with the stream stopped, the sidebar says "Waiting for the session stream…" and names the command it expects instead of showing an empty card.
Seeing costs nothing. Selecting a Project panel card, switching tabs, and opening the sidebar spawn no process. Check: ps shows exactly one agents feed watch --json child for all windows while the Active Session sidebar or the Project panel's Sessions tab is visible, and none when neither is.
Tabs survive the editor. Reload, crash, or quit and the agent tabs come back bound to their live sessions. Check: reload the window with three agent tabs open; three tabs return with their labels, and none of the sessions were stopped.
Every session of a project is one list. The Project panel's Sessions tab shows local, remote, background, and ended sessions with the same card shape and the same needs-you rule. Check: a session of this project started on a worker box by another machine appears in the panel with its machine on the card, and focus (↗) opens it in the window that owns the project.
A person sees what is asked from where they are. A permission, question, or plan review turns its session's card red at the top of its group in the Project panel with the agent's own question (the pinned card, when it is the tab in front), and the Active Session sidebar shows the same ask under its header with Reply and Focus. Check: trigger a permission prompt in a tab; the session's card turns red with the harness's question, and it leaves only when the CLI removes the attention row.
Non-goals
No scheduler in the extension. Nothing in the extension launches, resumes, kills, injects, or rotates anything on a timer. The CLI daemon is the only scheduler. A second scheduler in a UI process caused the resume storms and the 31 percent idle CPU incident the current design exists to end.
No transcript parsing or local state reads for facts. The extension does not read ~/.claude/projects, terminal registries, or session state files to decide anything the stream can carry. Remaining readers (src/monitor/sessionParse.ts, src/monitor/readinessDetector.ts) are recorded debt, scheduled for deletion, never extended.
No second platform. The extension does not score devices or accounts, resolve project paths, decide fork identity, or reproduce resume compatibility. Each of those has one owner in the CLI and the extension calls it.
No second session preview. The Project panel is a list whose cards select; the Active Session sidebar is the one session preview. A card click points that preview at the session; it never opens the sidebar, so a closed one stays closed and shows the session when opened. The deleted Fleet dashboard's persisted detail-rail preference produced a blank third-width column on open, and two previews of one session drifted.
No Gemini integration. The extension has no Gemini launch definition, installer, watchdog registration, prewarm configuration, transcript parser, or context-file alias target. Opening a workspace never creates GEMINI.md, even when an old explicit alias mapping requests it. Existing files remain untouched. Other configured aliases still work. The CLI catalog snapshot retains legacy ids solely to match the CLI protocol, not to install or offer the retired harness.
No local-first execution path or silent fallback. A launch under the default target goes to the fleet worker pool. A missing CLI noun is an upgrade error, never a filesystem fallback.
No API keys held by the extension. Autogit generates commit messages through agents run claude --model haiku. The Foreman voice orb and its agents.openaiApiKey setting were deleted with the Fleet dashboard in 0.9.394.
Findings
Three observations from running the extension shaped these requirements more than any design preference.
An always-on session watcher was removed in August 2026 because it pinned about 31 percent of a CPU core and leaked ssh fan-out to feed a view nobody had open. Restoring it behind a demand gate, so the single producer exists only while a visible sidebar or Project Sessions tab, an open Resume picker, or an unresolved tab needs it, is what made the stream affordable again. The same month a side-channel fetch per row produced the CPU incident recorded as agi-cli#3019; that is why a missing field goes onto the CLI row and never into a client fetch.
A persisted "detail rail open" preference in the Fleet dashboard (deleted in 0.9.394) restored a blank third-width column on open with nothing selected, and two previews of one session (the rail and the sidebar) drifted from each other. Removing the rail and making the sidebar the one preview removed the whole class of defect.
Ordinary launches once resolved the workspace through agents projects view <cwd>, and the first weak match in a monorepo silently sent the terminal to a child project's default path. Emitting the exact open workspace as --cwd and reserving --project for the explicit Pick Project command fixed it, and a recovery mapping that was machine-global instead of per-workspace produced a multi-window resume storm on reload. Both are now invariants enforced in code and tests.
Start an agent in a tab
You are in a workspace and want an agent working on it now, without deciding where it runs or which account it uses.
You press Cmd+Shift+A, or pick Agents: New Claude (or any presented harness) from the palette. The extension reads the one setting that matters, agents.launch.defaultTarget, and builds one command. Under the default auto that command is agents run claude --interactive --device auto --cwd <workspace> --strategy balanced --mode auto (the tests in src/core/launchTarget.test.ts assert the same string without the workspace). The workspace is passed exactly as opened: a monorepo root stays the root and a nested project folder stays that folder, locally and remotely. A tab opens at once with the harness's logo, named Placing… while the CLI places the run on a device from the worker pool, rotating the account by usage headroom (Starting… when the launch is local or pinned to a host).
When you want to choose one axis and let the CLI balance the other, the harness has five explicit variants. (Local) emits --local --cwd <workspace> --strategy balanced --mode auto, pinning the launch to the editor’s machine regardless of the configured target. Local defaults and Pick Host’s This Machine choice also emit --local. A hostless version pin emits --local and omits --strategy; an explicit host still wins. (Pick Host) prompts for the device and emits --device <name> --cwd <workspace> --strategy balanced --mode auto. (Pick Account) emits claude@ --interactive --device auto --cwd <workspace> --mode auto, with no --strategy, so the CLI routes to a picker-eligible worker and shows that device's account picker in the tab; a signed-out account can be chosen and authenticates in place. (Auto) chooses both without a prompt, ignoring the configured target, and emits the same --device auto --cwd <workspace> --strategy balanced --mode auto as the default. (Pick Project) is the only variant that replaces the workspace: it shows a project quickpick and emits --device auto --project <slug> --strategy balanced --mode auto, and the CLI resolves the project's configured path on the chosen worker. --strategy balanced rides every automatic-placement variant; only the account picker and a pinned version drop it.
What should happen: within a second a terminal tab exists, the status bar shows the agent's label and, when it runs elsewhere, the executing host shortened to its unique suffix. The tab names the session and nothing else: the logo says which harness, so no CC or CX is written into it (owner video, 2026-10-19). Until the session has a name the tab shows where its launch is: Placing… or Starting…, then New session once the session stream lists the running harness, which agents-cli does before any prompt (formatTerminalTitle, src/core/utils.ts; advanceLaunchStages, src/vscode/extension.ts). The tab title and the status bar show one name: the CLI's resolved title, else its label (your /rename), else the topic or request (streamTitle, src/core/projectPanel.ts); the extension generates no name of its own and no longer reports a tab's title back to the CLI. The editor tab shows at most 34 characters of it, cut at the last whole word with "…" (capTabName, src/core/utils.ts); the card, the status bar and the sidebars show it whole. VS Code gives an extension no way to set a terminal tab's tooltip, so the full name is not on the tab's hover. When the CLI says what a session was started with (startedAs), its card can show it on a faint line under the title, with Settings › A card shows › First message (off by default; owner video, 2026-10-19 1:32 AM: the "started:" prefix was "pretty annoying"). Agents: Rename Session (Cmd+Shift+L) renames the session itself: it types Claude's /rename <name> into the tab, and the new name comes back through the stream; other harnesses have no rename the CLI reads, and the command says so. The picker and --strategy never appear together; --project and --cwd never appear together. These exclusions are enforced by buildAgentLaunchCommand in src/core/agents.ts.
Come back after a reload or a crash
You closed the editor, or it crashed, with agent tabs open. You want them back exactly as they were, and you want none of the agents killed by the reload itself.
You reopen the workspace. The extension reads the persisted tab metadata for that workspace (terminal id, harness prefix, session id, host, label, pinned version) and reopens each tab through the CLI's resume path. Each restored tab then rebinds from the live stream: the first row that claims the tab's terminal id on the same observer device and host is the tab's session.
What should happen: every tab returns with its label and icon; the status bar and sidebar follow the restored session once the stream reports it; the agent process was never signaled. Closing a tab by hand is different: only a real user close (TerminalExitReason.User) issues agents ps stop <id>. A reload is never treated as a close. Each window keeps its tabs in its own file, so a second window can neither resurrect a tab you closed nor erase this window's tabs; restore opens one tab per session, keeps each tab's device, and skips a session the window already shows.
Where this is still debt: src/core/prewarm.simple.ts still lists OpenCode sessions on tab open, slated for deletion once the CLI daemon owns restore.
See what an agent is doing
The active agent tab shows a copy icon and the first eight characters of its session ID. Hover exposes the full ID and remote host; clicking copies the full canonical ID. Switching to a text editor or a plain terminal clears the session tooltip. Remote attach titles omit host-only placeholders; execution host identity comes from structured stream facts, never task text.
You have several tabs and you want to know, for the one you are looking at, what you asked, what it has done, and whether it is stuck, without scrolling its terminal.
You focus an agent tab, or click a session card in the Project panel. The Active Session sidebar (the agentsPanel.terminal view) takes that session as its subject; the last of the two triggers wins. A focused tab whose harness has not reported its session id yet (Codex, Grok) is still the subject: the sidebar shows that tab, never the previously focused one, and renders its row once the stream binds the id or you set it with Set Session ID for Terminal. The sidebar renders synchronously from the warm presentation store as one card, top to bottom (owner review, 2026-10-12: fewer components, nothing important below the fold). The title line carries the harness icon, the session's title (your /rename, else the CLI's generated title) and two quick icons, each with its words in its tooltip: open its tab (↗; ▶ resume when no tab here holds it) and ⋯, a drawer inside the card with Fork (the panel's own tab forks in place, otherwise Agents: Fork (Pick Session); out of the title since the owner's 2026-10-17 video), the model, the account label, the host, the short session id (copy, and a pencil to rebind the tab, offered even before the harness reports an id), chips for project, branch, a worktree badge only when the agent works in a linked worktree, the start time, tokens, and the raw identity lines; the drawer remembers whether it is open. Under the title one line states where the session is, by who has the ball (sessionStateOf, ballOf, the same words the Project panel uses): "Asks" (an open question or permission), "Stuck" (the CLI flags a live stall or failure), "Ready for review", "Idle" (it finished its turn and asked nothing), "Running", "Waiting" (its turn ended but its own background work still runs; a slowly breathing blue dot, and under the state a "Waiting on its own work" list names each subagent, background shell and monitor with how long it has run), or "Ended" (the process exited or is gone; it says nothing about whether the work succeeded), with how long it ran, when it last moved and, quiet at the end, the account it runs on. Asks and Stuck read amber. A Running session with no activity for five minutes shows "Running, but quiet since
Since the owner's 2026-10-17 videos: the agent's newest agents feed post sits under the title in a gold box ("From the agent"), and its posts are gold in the feed; a blocked post keeps its red strip. The reply box stays at the bottom of the sidebar whatever the card's length. With a plain shell in front (SH, before an agent is adopted into it) the sidebar says "SH is a shell, not an agent session" instead of keeping the last session, and an editor-tab click moves the Project panel's This tab and the sidebar together even before the tab has a session. When the row lists a source beside its rendered page (plan.md and plan.html), Made shows the page once, marked "from plan.md". ⌘K lists sessions waiting on you first, under Needs you, so ⌘K then Enter reaches the ask; every session row carries its harness logo, its state words and its activity as a line of bars (sparkline, from the row's activityHistogram).
What should happen: switching tabs paints instantly with no await, fetch, or lazy enrichment. On an older CLI the cards degrade honestly: request falls back to the cleaned prompt and then the topic, timeline falls back to checkpoints, and the Files card does not appear. Two states are never faked: when no reset has been seen for the subject's scope the Timeline says "Waiting for the session stream…" and names the command; when the CLI reports the timeline unavailable it says so with the CLI's reason.
Manage a project from the left sidebar
You run several agents on one project and want the project's state in view while the right sidebar shows the session you are in: what is open, which sessions stopped, which PRs are ready, what is next.
VS Code's top row names the project and its milestone (owner, 2026-10-27 1:26 PM): the view's title is " / ", which VS Code writes as "AGI: RUSH / 0.2.1 - STABLE FOR RUNNING AGENTS" (the container is named AGI; VS Code always writes its name first and shows no view description in a one-view sidebar). The milestone is the one Issues lists (picked in Issues' ⇅), else the project's next unfinished milestone from one linear goals --json read (the goals of the project's Linear workspace, when the panel shows, at most once a minute, or on Refresh), matched by the project's Linear name, else the company goal, else your day goal; a failed read leaves the project's name alone. Sessions working on today's goal (its ticket id in the title, topic or latest reply) carry ☀ on their card, and ⇅ offers "Only today's goal", a remembered toggle that shows only them. The Project panel is one sidebar view with three tabs: Sessions, Issues (the project's Linear tickets) and Review (its pull requests). Settings is the gear in the view's title bar, the last of the panel's icons (⇄, pop out, then ⚙; VS Code draws its own ⛶ after them), and Refresh lives inside Settings; ⌃1 to ⌃4 switch to Sessions, Issues, Review and Settings while the panel has focus, so they never take Ctrl+1–4 from an editor or a terminal. The header is one row (owner video, 2026-10-18 8:59 PM): the goal, then the tabs as icons with the ✳ Lead first (owner video, 2026-10-22 6:42 AM), then that tab's own controls (☀ and search on Sessions; Review's ⇅ menu). Settings › Tabs turns Review and Issues off; with both off the Sessions tab hides too while Sessions shows (it stays in Settings, as the way back), and the row is the goal and its controls. The goals already sit above the tabs, so there is no Overview tab. Each tab names itself in its tooltip and the active one is tinted; a badge on the Sessions icon counts open asks (never an idle turn) as of the last time Sessions was shown (the stream runs only while Sessions is visible), arrow keys move between tabs, the panel remembers the active tab per workspace, and each tab keeps its scroll while the panel is open. Only the active tab loads. Its project is the one containing the open workspace folder (agents projects status --path <folder> --json), or the one you choose, remembered per workspace. The view's title names it with its milestone, and Switch Project (⇄ in the title bar; one agents projects list --json and one linear projects --json read when it opens) lists every live Linear project, each through the agents project that links it with its repositories (so Review works), or "tickets only, no repositories linked" when none does, then the agents projects whose Linear link is missing or gone ("Linear link gone (AGI UI)"); the shown project is checked and the one found from this folder says so. Detection can be wrong, so a pick wins and is remembered per workspace; Use detection again clears it. With nothing found the title is just "AGI" and Sessions links to Switch Project. Sessions lists every session of the project from the session stream already in memory, filtered on the CLI's confirmedProject, so it starts no process; until agents-cli resolves a renamed project's old names, a session whose checkout is one of the project's repositories (the folder's root, or the repos agents projects list names) is listed too when the CLI gave it no project or a name no registered project has (a session of another live project in the same repository stays there), and its ⋯ menu says what the CLI filed it under; Agents: Resume Session… applies the same rule; a session with a tab in this window is listed whatever project the CLI gave it, or none, since the tab is a fact of this window (owner video, 2026-10-19 12:58 AM: "there's an agent running in the shell, it's not properly recognizing it"), so this window's group is every agent tab here, while the resume picker still lists only the project's sessions; the stream is demanded only while Sessions is the visible tab, and it redraws when the stream changes. It is built to be read at a glance (AGENTS.md, Design). The tab already counts live sessions and marks the ones that need you, so the header holds only a search icon (⌘K; see below) and never changes as the list loads. A filter bar sits at the top of the list, always: typing keeps the listed cards whose title or words hold every word typed (the pinned card stays), a redraw keeps what was typed, Esc clears it, and ⌘K still searches every project (owner video, 2026-10-22 8:50 AM). The panel's header is one row, the same on every tab (owner video, 2026-10-27 1:19 PM): the tabs as icons, then 🔍 and ⇅ in the same place. 🔍 turns the row into the filter field for that tab's list (sessions, pull requests, issues or the Lead's turns) until Esc, and each tab keeps its words; ⇅ is dimmed where there is nothing to sort, and on Issues picks the milestone it lists. The ⇅ menu (owner video, 2026-10-22 6:42 AM) comes with checkmarks: Show first (Tabs in this window, tabs with no agent, ended; with it off a session whose tab is here is listed only while it asks), then Sort (Tab order, the default, which keeps this window's tabs as its tab bar has them; last active; newest; name). View has one grouping choice, Group by topic, on by default (owner, 2026-11-16): a live session joins a group named by its agents-cli workstream, the short name agents-cli's session-title job gives what it is about ("Rush Mac", "Ahrefs SEO"), in the same batched model call that writes its title, so related sessions share one name; topic groups come first. A session with no workstream yet, an Ended one, and every session with the toggle off group by where they live, and this window's tabs are headed by the editor's icon and the workspace (agi-ext 5; the icon already names the app, owner 2026-10-22 1:01 PM). The extension never names a topic itself. The menu's first section is View: Default draws full cards; Compact draws each listed card as its title row (title, state pill, age), the agent's latest line and the row of what it made, with no previews or ask box (owner, 2026-10-22 1:02 PM); the pinned card is never compact. Within a group, what asks comes first, then finished turns, then what works, then what ended, each tier in the chosen sort; Tab order keeps this window's tabs in the tab bar's order after the asks, and Name is the names alone after the asks; the choices, folded groups, the section order and hidden sessions are remembered per workspace. Each section moves with ↑ ↓ on its header (owner, 2026-11-16 2:43 AM); a section the viewer has not placed keeps its own slot, and Settings > Sessions > Section order resets it. ⇅ > Sections (and Settings > Sessions > Order) picks Needs you first, the default, or Your order: under Needs you first every section holding a session that asks moves above the rest, the one whose most pressing ask leads first (urgency, then longest wait), and its header says how many need you; Favorites stay on top and the other sections keep your order (owner video, 2026-11-24 5:00 PM). Dragging a listed live card onto another topic's section moves the session there: the target section shows a dashed outline, the drop runs agents ps topic <id> <topic> --json once (agents-cli stores it on the machine that owns the session, and its title job never changes it back), and the card moves when the stream reports the new topic; "Moved to " floats at the panel's foot, with Undo when the card came from another topic, and a refusal shows the CLI's words (PHNX-4676). A header click always folds its section, even the one holding the front tab's session, which the pinned card shows (2:44 AM). Ended sessions are off unless Settings > Sessions > Ended sessions asks for the last 10, the last 25 or all; a capped Ended says how many older ones it leaves out, and ⌘K finds every one. Settings is one page in six titled sections (Sessions, Cards, Header, Shortcuts, Pull requests, pages and more, Devices) under a row of jump buttons. Ended sessions are shown by default in a folded Ended group, so a session to resume is one unfold away; preferences saved before this default get it too, unless they had turned Ended on or group by Machine or None, which have no Ended group and keep Ended off. Only a real ask is your move (owner recording, 2026-10-13: 11 of 12 Your move cards were idle). The front tab's session is pinned above everything, opened up (owner, 2026-10-18), and its card also keeps its own place in this window's group with the selected rail, so switching tabs never reorders or removes a card (owner video, 2026-10-19 1:32 AM: "this tab should still be showing here… the tab completely vanishes"); its answer buttons are on the pinned card only, and the listed card shows the question. It has no ‹ › since 2026-11-07: it follows the front tab and nothing else. Since 2026-11-12 (the owner's 2026-11-07 5:56 AM video, 3:37: "do some kind of scroll here and then that moves to the next session") a two-finger sideways swipe over it moves the front tab: forward (fingers to the left) does what Agents: Next Agent That Needs You does, back fronts the session tab that was in front before, one further back on each swipe without bouncing between two (it skips a tab since closed), and the card follows the tab it lands on, sliding in from that side for 150 ms (not under reduced motion). A swipe counts once its sideways travel passes 60 px and more sideways than down, then the card ignores the trackpad's momentum until the wheel is quiet for 300 ms, except that 200 ms after a swipe a finger swiping again (faster, or turned back) is the next swipe at once, so swipes can follow each other without a pause (owner, 2026-11-12); the page holds it, so the editor never goes back a page, except over a row inside that can still scroll that way (the Made shelf, a chip row), which scrolls. With nowhere to go the status bar says so ("Nothing needs you: every other agent is working", "No earlier agent tab in this window"). Agents: Next Agent That Needs You fronts an open ask you have not had in front since it asked (by the CLI's urgency, then the longest wait), then a tab whose turn finished after you last had it in front (newest first), then the other asking and idle tabs, the one you saw longest ago first, never one that is working or waiting. Each arrow names its target in its tooltip ("Next that needs you: tab 8 ·