Herdr WorkbenchGit worktrees and persistent CLI agents, together in VS Code. Herdr Workbench brings multiple Git projects, their worktrees, and CLI coding-agent sessions into one Visual Studio Code window. Select a worktree to make it your active editing context, start an installed agent in that checkout, and follow its progress alongside sessions running in other projects. VS Code provides the Explorer, search, tasks, Source Control, diff editors, and integrated terminals. The herdr backend owns the agent processes and reports their status, so agents can keep working after you close their terminal view or the VS Code window. Clicking a session reconnects its terminal to the existing process. This is an independent extension for herdr. It uses herdr's CLI and socket API; its terminal user interface is not opened or embedded.
Track working agents, input requests and unread completions across projects. Screenshots show real VS Code windows with local demo repositories and an offline fixture agent. What you can do
For example, you can leave an agent working on a feature in one project, switch to another project's checkout, and work there. The first session stays in the Herdr tree. Selecting it later activates its worktree and opens a terminal connected to the same agent. Native Git and terminals
Review the selected checkout with native Git views and diffs. Worktree and session navigation stays in the sidebar.
Open a session's terminal alongside its source files. Close the terminal to leave the agent in the background, then click the session in the Herdr tree to reconnect. Requirements
Install Git, herdr, and the agent CLIs on the machine running the VS Code workspace extension host. If herdr is outside the executable search path, set The installed extension runs directly in VS Code without a separate build or runtime npm dependencies. The offline packager requires Node.js and Python 3; Marketplace packaging uses the official InstallationInstall Herdr Workbench from the Visual Studio Marketplace, or search for Herdr Workbench in VS Code's Extensions view. Git, herdr and your chosen agent CLIs must also be installed on the extension host. To create an installable extension package from source, run this command in the repository:
The current package is written to To try the source in a separate development window instead, see Development. Maintainers: see Publishing to the Marketplace for publisher setup and the validated release package, and Screenshot workflow to reproduce the documentation scenes. First session
You can repeat these steps to add more projects and start more sessions. Multiple sessions in the same worktree share the same files. Use separate worktrees when the sessions need separate working directories. Projects, worktrees, sessions, and terminals
The sidebar has three views:
Projects and sessions are stored per VS Code workspace. Adding a project to this catalog does not immediately add all of its worktrees to the Explorer. Switching your active worktreeWith the default Starting or opening a session also selects its worktree. The folder icon and In Explorer action select the worktree and open its Explorer. The Source Control action selects it and opens VS Code's built-in Git view, where you can stage, commit, and inspect changes normally. For a workspace managed this way, Herdr sets workspace-level The Git view is kept focused on the selected repository. Herdr preserves separate commit-message drafts when you switch between checkouts. Changes on disk remain in their respective worktrees; switching does not copy, stash, commit, or merge them. Workspace files and extension restartsReplacing the first workspace folder can cause VS Code to restart its extensions. Herdr saves its catalog, selection, commit drafts, and any pending session-opening action before making that switch. The action can then complete after activation. When switching away from a normal single-folder window, Herdr converts it into an initially untitled workspace and transfers its catalog. Save it with File → Save Workspace As… so you can reopen the same workspace later. If you start from an empty window, Herdr creates a workspace file in its VS Code storage directory. Existing named workspaces retain their workspace file while their folder selection changes. Keeping a manually managed multi-root workspaceSet this option if you want to control workspace folders yourself:
Herdr will still select the worktree's Git context, but leave the workspace folder list in your control. In Explorer adds the selected worktree as another workspace folder. Agent sessions still start in their assigned worktree directory. Creating and deleting worktreesCreate a worktreeClick the branch icon on a project, or run Herdr: Create worktree with a new branch.
Herdr asks Git to create the worktree and new branch from the selected commit, then refreshes the project tree. Remote branches are read from the repository's existing refs; this action does not fetch them automatically. Delete a worktreeClick the trash icon on a linked worktree in the sidebar or dashboard. After confirmation, Herdr removes the checkout directory and its worktree registration through The main checkout has no worktree trash action. Deletion is also blocked while the target has running sessions, including background sessions, unsaved editor documents, Git changes, or a worktree lock. Stop the sessions and save, commit, or otherwise preserve the changes first. Git's normal removal checks apply; the extension does not force removal. To remove a project from Herdr's catalog, use Herdr: Remove project from overview in the project's context menu. This removes the catalog entry rather than deleting its files. Connected sessions must be stopped first. Managing sessionsTerminal views and background sessionsClosing a session's terminal immediately removes it from the dashboard's Open filter and from the open-session count. Its agent continues running in herdr. The session remains in the sidebar and under All, with a Background label while the backend is connected. Click the session in either sidebar tree, or use Open terminal, to open a terminal view connected to the same process. Reopening a session does not run its launch command again. With automatic workspace switching enabled, its worktree also becomes active.
The session remains available under All and in the Herdr tree. The open-terminal count drops as soon as its terminal closes. Session actions
Stopping or deleting one session leaves the other sessions running. If the backend is unreachable, Herdr retains sessions that might still be running until their state can be checked again. Dashboard filters
The status bar's session count also counts attached terminals. Its working, question, and completion indicators can still reflect sessions running in the background. Agent status indicatorsThe sidebar and dashboard use the same status information:
An open session can be idle. Finishing an agent turn does not necessarily end its CLI session. An unread completion indicates that a turn ended; it is not a judgment about the quality of the result. Manual input/review flags take precedence over the automatic indicator until you clear them. They also affect attention filtering and session ordering. When herdr cannot supply a state, the extension shows an unknown or disconnected label rather than assuming the agent is working or finished. Pi status integrationFor Pi sessions, the extension adds For other agents, status comes from herdr's integrations or detection. The accuracy of working and input-waiting states depends on the corresponding agent integration. Herdr Workbench does not globally install additional hooks for those CLIs. CLI discovery and custom profilesUse Herdr: Detect installed agents to see the available profiles. Discovery is repeated when starting a session. The extension searches The built-in catalog includes Pi, Claude Code, Codex, OpenCode, Gemini CLI, GitHub Copilot CLI, and Cursor Agent, among others. The complete executable-to-agent mapping is in Default profiles are discovered automatically. Add custom executable paths or arguments with
Profile IDs must be unique and contain only letters, numbers, underscores, or hyphens. An ID matching a detected default replaces that default. A command must be a single line starting with an executable name or an absolute executable path; arguments can follow it. Quote paths containing spaces. Shell aliases and functions cannot be reliably discovered as installed CLIs. The agent Settings
Session status is updated separately through backend events and polling. Persistence and process ownershipThe first session starts a herdr server in the background when needed. Each VS Code workspace has a saved backend name such as Project registrations, session identifiers, the selected worktree, and commit-message drafts are stored in VS Code's workspace state. Reopening the same saved workspace restores that catalog and checks the existing backend sessions. A terminal can then be attached to a process that is still alive. The server and its agents can survive closing the VS Code window. Reconnection never replays a saved launch command. The extension does not implement automatic process recovery after a computer restart or backend shutdown. It reconnects to surviving processes; an ended session remains history, and you can start a new session when needed. Terminals created by earlier versions that launched agents directly remain usable while connected. Their running processes cannot be transferred into the backend. New sessions use herdr's process management. Unrelated terminals and sessions outside this extension's recorded catalog are not adopted. Troubleshooting
Open the Herdr Workbench output channel in VS Code's Output panel for extension error details. Backend server logs are kept in the extension's VS Code storage directory under DevelopmentJavaScript runs directly in the extension host; no compilation or runtime dependency installation is required. Run
The launcher opens VS Code normally, then attaches the debugger to its running extension host on port The development window uses its own profile, extensions directory, and workspace under Pressing F5 again reconnects to the existing development window. Shift+F5 detaches the debugger and leaves that window and its terminals open. The debugger can reconnect after extension-host restarts; the launcher checks ownership before reusing an inspector. An unrelated process using port You can also start the development window without attaching a debugger:
The development launcher supports Checks and tests
The backend and VS Code integration tests use an installed herdr build, a separate test backend, temporary repositories, and a local offline fixture agent. Those tests make no model API calls. The optional Pi test also uses isolated configuration to exercise a real CLI prompt. |



