agentduo for VS Code
The agentduo channel in a VS Code sidebar. Codex plans and reviews
the code, and Claude Code critiques the plan and implements it. The extension runs the same engine as the duo CLI and
uses the same configuration, run directory, conversations and lock. duo, this extension and the desktop app can be open
on one workspace together: each takes the workspace only while its work runs, and a conversation or a run started in one
goes on in another (see "Working from several windows" in the main README).
Requirements
- VS Code desktop 1.95 or later, with a local, trusted folder, or no folder at all: then agentduo works in your home
folder, and its conversations and config go to
~/.agentduo, as duo started there does. Questions and discussions
work in any folder. The Pipeline needs git, but no repository: in a folder without one, a run keeps its snapshots in
a repository of agentduo's own, outside the folder (see "Folders without a git repository" in the main README). In
the home folder it asks you to open a project folder.
- Node 22.12 or later. VS Code's own Node is not used. The extension takes the first suitable
node on the
PATH VS Code sees, or the path in the agentduo.nodePath setting.
- Codex CLI and Claude Code CLI, installed and signed in. Set
codex.bin / claude.bin in .agentduo/config.yaml
when VS Code's PATH differs from your terminal's. This often happens on macOS when VS Code is opened from the Dock.
The npm package agentduo does not need to be installed, because the VSIX carries its own engine.
Install a local build
npm ci
npm run package:vscode # writes apps/vscode/agentduo-vscode-<version>.vsix
code --install-extension apps/vscode/agentduo-vscode-*.vsix
To develop it, open the repository in VS Code and press F5 (Run agentduo extension). The launch builds the
extension and opens an Extension Development Host on the repository.
Using it
Click the agentduo button in an editor's title bar (beside Claude Code's and Codex's), or run agentduo: Open Chat.
- Each conversation is an editor tab. The first one opens beside your editors, and its tab is named after its first
message. In a tab's title bar:
- + (or
/new in the composer) opens a new conversation in a tab of its own; the other tabs keep theirs;
- Resume and Settings;
- the
⋯ menu opens the run's plan, changes and report, and Usage.
- Tabs work independently. You can ask in one tab while another is still answering. A workspace runs one pipeline at
a time, so
/pipeline or /resume in another tab says which conversation's run is going. Settings (models, effort,
mode, permissions) are the workspace's, so a change in one tab applies to every tab. Who a message goes to is each
tab's own.
- Conversations last. After a reload or a restart, VS Code reopens the tabs: each shows what it showed, and its next
question still carries what was said before. An answer that was still going when the window closed has stopped, as Esc
would stop it. Conversations live under the runs directory (
.agentduo/runs/conversations/).
- agentduo in the Activity Bar has two views:
- Account & Usage: the accounts of both Claude Code and Codex (plan and email), and how much of each plan's limits
is used, a meter per limit with when it resets, as
/usage shows them (claude -p /usage and claude auth status,
Codex's app server; no model call, about two seconds). It looks them up when it shows (again once they are a minute
old), on ↻, every 5 minutes while it shows, and after an answer or a run in any tab, at most once a minute; a
collapsed or hidden view looks nothing up. If one agent cannot say, only its part says why. View details opens
the tab's Usage panel, with Claude's "What's contributing to your limits usage?".
- Conversations lists the workspace's conversations, newest first: open ones, and closed ones you can open again
to go on. + starts a new one, and a badge counts the questions waiting for you.
- Opening a tab starts nothing but the worker, which only reads: it reads the latest run, so it can offer Resume. The
first task you send starts a run in the chosen folder. In a multi-root window you choose the folder first
(agentduo: Choose Workspace Folder); until then, the Account & Usage view asks with your home folder's config.
- While a run goes on or waits for you, a line at the top of its tab shows its stages and rounds.
- The composer works like the terminal chat: a three-way conversation with Claude Code and Codex. The chip under the
input says who a message goes to and on which model (Codex at first). Its menu switches between Codex and
Claude, or makes the next message a question to Discuss (that agent answers, the other reviews, until they
agree, as
/discuss does) or a task for the Pipeline. A discussion shows each turn as it ends, with the
reviewer's verdict; once it is over its turns fold into one row and the agreed or final answer follows, whole. A slash command typed in the composer always wins
over the chip. The chip's tooltip and menu also tell what "default" currently means (for example
default → gpt-5.5 (codex doctor), or a Claude settings alias awaiting confirmation). The / button lists the
commands, and typing / shows the same list with a description for each entry.
- Usage (or
/usage in the composer) opens a panel above the composer, as /usage opens one in the terminal chat:
each agent's account, how much of their plans' limits Claude Code and Codex have used, a meter per limit, then Claude's "What's contributing
to your limits usage?". Each part fills in as its agent answers. Refresh looks again; Esc or ✕ closes it, and
an answer under way goes on. A permission prompt or a decision goes before it.
- @ to tag files. Type
@ in the composer to list the workspace's files and folders; typing more narrows the list,
best match first. ↑↓ choose, Tab opens a folder or puts a file in, Enter puts the path in, Esc closes the list; a click
works as Tab. The agents get the tagged paths to read with their own tools (nothing is copied), as in the terminal
chat.
- Attached files. The paperclip under the input picks any files (images, PDFs, text, code…). You can also paste an
image (Cmd/Ctrl+V), or hold Shift while you drag files from Finder or Explorer onto the composer: VS Code needs
Shift to let a webview take a drop. A drag from VS Code's own Explorer or an editor carries no file the tab can read,
so use the paperclip for those. The files wait above the input, with a thumbnail for an image, until you send them
with your next message, question, discussion, task or note (Send with an empty input sends the files alone, also as
a note while the pipeline runs: the send button stops the run only when there is neither text nor a file); ✕
removes one. Files keep the order you gave them in, and a message waits until each is attached. A pasted or dropped
file goes to the extension host, which writes it to a file of its own and hands the engine its path; the engine
copies it into the conversation (
.agentduo/runs/conversations/<id>/attachments/).
Sent files stay in the timeline, also after a reload; a copy that is gone shows a warning in place of its thumbnail.
Files waiting to be sent go away with /new and when the tab closes. A decision never takes them: send them with a
message first, or choose Decide later, then /resume with a note. Limits, the images sent as images and what
that costs are as in the terminal chat (see the main README).
- Settings changes what the chat's settings commands change, and applies each choice at once. Model, effort,
mode, reasoning and permissions are pickers: a click drops the list down. Codex's models are the ones its own
/model offers (read with codex debug models), and its reasoning levels are those the chosen model takes. Claude's
models are Claude Code's aliases (Fable, Opus, Sonnet, Haiku, their 1M-context variants, Best, Opus Plan). Claude's
allowed and denied tool rules and its extra directories are tags: type one and press Enter to add it, and the × on a
rule removes it. A box below saves the changes to .agentduo/config.yaml, another to ~/.config/agentduo/config.yaml
for every workspace (as --save and --global do).
- Each answer and each pipeline step is drawn on a line of dots, as in VS Code's own chat views: one row per tool the
agent used (Bash, Read, Edit…), folded once it is done, then the answer. Answers are shown whole, with Claude's or
OpenAI's logo and the model they ran on. Their Markdown (headings, lists, code, tables, quotes) is rendered as text
elements, never as HTML, and links show their target as a tooltip without opening it. Each code block, and each
command an agent ran (the whole command, not only the first line its row shows), has a Copy button that appears on
hover or focus.
- agentduo: Open Chat puts the cursor in the composer. Enter sends and Shift+Enter starts a new line; while an IME
is composing, Enter only commits the word. The mode chip opens Claude Code's mode menu (Manual, Edit automatically,
Auto), for Claude in the chat and as the pipeline's implementer; Shift+Tab in the composer switches to the next mode,
as in Claude Code, so there it does not move the focus back. While a pipeline step runs, what you type is a note for the next step.
While something runs and the input is empty, the send button becomes Stop (Esc in the composer does the same): it
interrupts the answer or the step. A stopped step continues with
/resume [note] (or Resume), and an empty Enter
only reminds you of it.
- The sidebar keeps up to 400 entries and about 2,000,000 characters of answers. Older turns (a message and what
followed it) are dropped whole and a notice says where the full logs are; the newest answer and its question always
stay, however long.
- HUMAN_REVIEW decisions (resume, revise, abort, defer, with a note) and Claude's permission requests (allow once,
always allow, deny) appear above the composer. They stay there when you hide the sidebar. Always allow saves
Claude's rule to
.claude/settings.local.json, the same file the CLI uses.
- Questions from the agents. When something only you know would change the result, an agent asks with annotated
choices (see the root README's Questions from the agents). Claude's
AskUserQuestion, in any Claude turn
(including the Claude turns of /discuss), and the pipeline planner's questions between its turns appear above the
composer as a form: each question's header, every option with its description, one choice or several, and your
own words. Nothing is preselected, and Submit answers stays off until every question has an answer. There is no
always allow: an answer is information, not a permission. A reply names its tab, request and call, so a second click,
a late answer or another tab's question changes nothing. Answer later puts a planner's question off, saved, and
/resume asks it again; for a Claude question it ends the call, since Claude cannot wait. Codex's turns have no
form: Codex asks in text and you answer in your next message. The questions and answers stay in the conversation
when you reopen it; one that was still open when the window closed is shown as interrupted, never as a form (answers you had given in a turn that then failed or was stopped still reach the agents). In a pipeline run, a Claude question you put off stays yours: the run waits (clarification_required), asks it again as a form (without Don't answer) on /resume, and runs the step again with your answer.
- The
⋯ menu and the links under each step open the plan, review, feedback and report of the run in an editor. Changes lists the files
the run changed and opens them in VS Code's diff editor. The diff goes from the run's baseline snapshot to its latest
snapshot, so edits you made before the run are not included. Opening Changes again after another round shows that
round's snapshot. A diff that is already open keeps the snapshot it was opened at. A run in a folder without a git
repository is read from its own repository, also after a reload or a later git init.
- agentduo: Doctor checks Node, the CLIs, the configuration and the workspace, and writes the results to the
agentduo output channel. agentduo: Open Configuration opens
.agentduo/config.yaml.
Agents, models, flags and gates are configured as for the CLI. The extension adds no permission rules or flags of its
own. Claude's permission requests come to the sidebar only while it can answer them. Questions are a separate setting,
clarification.enabled (default on, from the next call), independent of claude.permission_prompts: turning one off
does not turn the other off.
Reloading the window or closing VS Code stops the current step, as Esc does in the terminal. Pending decisions are
deferred, unanswered permission requests are denied, an open Claude question ends its call (a chat turn's is saved as interrupted;
a pipeline step's, like a planner's, stays pending, to be asked again), the lock is released (it is held only while work
runs anyway), and the run stays resumable. The engine
gets 4 seconds to do this, even when it is still starting, and is then stopped outright. The extension never restarts
a task on its own. It offers Resume instead.
Limits of this version
Desktop VS Code with a local folder (or none, for your home folder) only. There is no web build, and Remote SSH, WSL and containers are not
supported. Each window has one session; its tabs answer side by side, but run one pipeline at a time. While duo or
another window works in the workspace, a banner says so and a message you send comes back to the composer, to send again
once it is done; work that is running is never moved between windows. There is no browser for older runs: Resume
continues the latest run, as /resume does in the CLI.
Credits
The icons are Codicons by Microsoft, licensed under
CC BY 4.0 and bundled unchanged (dist/webview/codicon-LICENSE.txt).
The Claude and OpenAI logos are trademarks of Anthropic and OpenAI, shown only to say which agent answers; agentduo
is not affiliated with either company. Claude's comes from Simple Icons (CC0) and OpenAI's
from Lobe Icons (MIT, © 2023 LobeHub).
| |