$ cat herdr-app-agent-workspace.md
Modding the herdr Desktop App Into My Agent Workspace
In the last post I used herdr in the terminal to let one coding agent drive a few others. Since then I’ve moved to herdr-app, the herdr desktop app, and spent three days and a lot of agent time making it my main work environment. The config folder went from the shipped defaults to about 70 commits and more than a dozen mods of my own.
It’s not one big feature but a set of pieces that work together:
- A work board that mirrors my Azure DevOps board and starts Claude Code or GitHub Copilot on a card, in the right repo and branch, then tracks the agent, its PR, CI and token use.
- Andrejka, a scheduled bot on a VM that does read-only jobs like my morning recap and reports back.
- A transcript viewer that shows every tool call and command an agent ran, live.
- A review inbox for PRs that wait for my review, with drafts written by an agent and posted only by me.
- Standup notes that write themselves at 9:50 every workday.
- A janitor that cleans up the branches, worktrees and clones agents leave behind.
- Smaller things: a file tree with viewers, a project launcher, git and plan-limit chips in the status bar.

This is what it looks like today: spaces and agents in the sidebar with Andrejka below them, the board in front, and my own buttons and chips in the tab bar and status bar. I blurred a few work repos in the sidebar.
This post walks through how herdr-app mods work, what I built, and the mistakes I made along the way.
herdr-app in two minutes
herdr-app is two programs:
- herdr-core (
hc) runs every terminal and agent. They keep running when the window closes or the app updates, and I can drive them from the CLI (hc run,hc send,hc wait,hc read). herdr-appis the window: spaces, tabs, panels and layouts.
The part that got me hooked is that the whole interface is a folder of files: ~/.config/herdr-app. Layouts are JSON, keys are JSON, and every panel, menu, dialog and notification is a mod: a folder with a mod.json and a main.js. The app redraws itself from these files while it runs, so a change shows up within a second. The sidebar, agents list and tab bar that ship with the app are built from the same parts I get to use.
The app writes an AGENTS.md into that folder on every start that explains all of this to a coding agent. So most of my work looked like this: open Claude Code in ~/.config/herdr-app, describe what I want, and watch the window change.
herdr-app also has commands that make this loop work for an agent:
herdr-app check mods/board # load a mod once and report errors
herdr-app shot /tmp/window.png # screenshot of the window, so the agent can see its work
herdr-app do mod.open '{"name":"trace"}' # run any app command
herdr-app commands # list every command and its arguments
shot is the one that matters most. The agent checks its own layout instead of asking me what it looks like.
What a mod looks like
Mods are plain JavaScript (no Node, no HTML or CSS) that build UI with a small element API, a bit like SwiftUI. Here is a small status bar chip that counts agents waiting for me:
import { View, div } from "gpui-kit";
import { h_flex } from "gpui-base";
import { agents, theme } from "herdr";
export default class NeedsYou extends View {
render() {
const t = theme();
const blocked = agents().filter(a => a.status === "blocked").length;
return h_flex().size_full().px(14).gap(6).items_center().bg(t.chrome).text_color(t.muted)
.child(div().size(6).rounded(3).bg(blocked ? t.blocked : t.dim))
.child(blocked ? `${blocked} agent(s) need you` : "all agents busy or done");
}
}
The herdr module gives a mod the state of the app (spaces, tabs, agents and their status) plus a few tools: exec(cmd, argv, {cwd, on, timeout}) runs a program, readTextFile/writeTextFile, shared/setShared for state between mods, openOverlay for popups and dialogs, notify for toasts and run for any app command. exec takes on: "<machine>", so the same call runs on one of my VMs instead of the Mac.
A mod can be shown in many places. The board mod, for example, is the full board in a tab, the card editor in a dialog, a right-click menu in a popup and a small chip in the status bar, depending on the props it was opened with.
I keep the folder in a private git repo with an allow-list .gitignore (ignore everything, then !/mods/board/ and so on), so the files the app writes itself stay out. Shipped mods I wanted to change (files panel, sidebar lists) are cloned under a my- name. A small drift check compares my clones with the shipped originals after each app update, so I know when upstream changed something I copied.
The basics first
Before the board, I fixed the everyday things:
- Gruvbox theme with an orange accent, and unfocused panes dimmed a bit.
- A file tree with Material icons. Clicking a
.mdfile opens a live Markdown preview, a.pdfopens a PDF viewer (rendered with macOS PDFKit throughosascript, no installs), anything else opens nvim in a new tab. Right click gives copy, paste, rename and move to Trash. - A small built-in editor for quick edits, with
Cmd-Sand a reload/overwrite prompt when the file changed on disk. - A git chip in the status bar: branch, ahead/behind and changed files for the focused pane’s repo, with Pull and Push buttons.
Cmd-Oproject launcher: fuzzy search over every repo under~/Git. Enter opens a space with Claude Code on the left and a shell on the right.- Plan limits chip: my Claude Max 5-hour and weekly usage in the status bar, amber at 80 %, one toast at 90 %. Claude Code’s status line gets
rate_limitsin its JSON input, so a tiny wrapper script saves that to a file and the chip reads it.
The work board

The board is a mod with two boards: Company, which mirrors my team’s Azure DevOps board lane by lane, and Personal, for my own GitHub projects. The data is a Markdown file, one card per line, with the fields in an HTML comment and the notes indented under it:
## Ready for implementation
- [ ] Upgrade ingress controller chart <!-- id:12 type:story pri:2 ado:123456 who:claude repo:~/Git/platform/ingress -->
Notes, agent summaries and the Azure DevOps description live here.
Being a Markdown file means agents can read it, I can grep it, and git shows every change.
Azure DevOps both ways
Every 10 minutes the board pulls the work items assigned to me and turns them into cards. Each card lands in the lane that matches its board column in Azure DevOps. It also brings:
- the description and acceptance criteria, converted from ADO’s HTML to Markdown, as two separate sections in the card notes,
- the latest discussion comments,
- the parent item, iteration, area, effort and tags,
- linked items (blocked by, related, child) and linked PRs with their state.
Cards get small chips for these: ⛔ when an open “blocked by” item exists, ◆ for the parent, ◷ for the iteration (green when it’s the current sprint). A header pill hides everything that isn’t in the current iteration. The card dialog got long with all this, so ADO sections fold.
It works the other way too. When a card moves (by drag and drop or automatically) the board updates the work item’s state and board column through the REST API, with a JSON Patch test on the revision so it never overwrites someone else’s change. The one lane it never writes is Closed: closing items is my team’s call in the board review.
The personal access token lives in the macOS Keychain. A small ado.sh reads it and passes the auth header to curl on stdin, so it never shows up in a process list. The status bar warns me 7 days before the token expires, and tells me which scope is missing when a call gets a 403.
Starting an agent from a card
Right click a card, choose Start with Claude (or Copilot, or Crew), and the board:
- Picks a branch: the card’s own, or
feature/<AB#>-<title>for ADO items. - Prepares the repo. If the repo is clean and no other agent works in it, it switches the branch there. If it’s busy or dirty, it creates a git worktree for the card instead, so two agents never share a folder.
- Opens a tab in that folder and starts the agent with the card as its task: title, description, acceptance criteria and notes, plus “reference AB#123456” so commits link to the work item.
- Gives the session a fixed id (
claude --session-id <uuid>), so the card can resume it later withclaude --resume.
Text that comes from Azure DevOps (descriptions, comments) is labelled for the agent as context written by the team, not as instructions to follow. That’s a small thing, but work items are written by many people and I don’t want a line in a comment to steer the agent.
A card can also pick a skill (the board suggests one from the title, like my Helm upgrade skill for chart upgrades), start in plan mode, or run on one of my remote VMs instead of the Mac. There’s an auto-start switch too: cards in Ready that are assigned to an agent start on their own, up to a limit of running agents (two by default).
The board moves itself
A background copy of the board mod sits in the status bar and does the bookkeeping:
- Agent finished → the card moves from Doing to Review (my turn). Working again → back to Doing. A blocked agent gives the card a red border.
- Summary: when the agent stops, the board reads the session transcript and appends the agent’s last message to the card notes. When a plan-mode session finishes its plan, the plan goes into the notes and the card shows “plan ready · approve in tab”. The board never answers an agent’s prompt itself.
- Pushed but no PR → a chip and a menu item that opens a draft PR (GitHub, GitHub Enterprise or Azure DevOps), with the agent’s summary as the body.
- PR opened → Review. PR merged → Released.
- Review comments: new comments on the card’s PR show as ”💬 3 to address”. One click sends them to the agent: typed into its tab if it’s idle, or by resuming its session if the tab is gone.
- CI: a chip with the checks for the PR or branch (GitHub Actions or Azure Pipelines). When it fails, ”⤷ to agent” sends the failed job logs to the agent, trimmed to the last lines of each failing step.
- Time and tokens: on each finish the board reads the transcript and shows
⏱ 42m · 1.3Mon the card: active minutes (gaps over 5 minutes don’t count) and tokens.
A second opinion before the PR
Each card can have an optional review before PR by the other model: Claude reviews Copilot’s work, or the other way round. When the agent finishes with new commits, the board builds the diff itself and hands it to a reviewer that can only read files. Claude runs with Bash, Edit, Write and web tools denied. Copilot runs with shell, write and URL tools denied. Neither can read ~/.ssh, the gh config or the agent configs. The findings show as a chip (”🔍 3 findings”) and one click sends them to the working agent.
I didn’t take “read-only” on faith. I tested it with a hostile diff that asked the reviewer to write a file and read a secret, and checked that nothing was written.
Moving a session to a VM and back
I have three Linux VMs for agents: one in Azure and two in VirtualBox on the Mac. A card’s agent can start there, and a running Claude session can move: the board commits work in progress, sends the branch’s commits as a git bundle over scp (nothing gets pushed), sets up the same branch on the VM, copies the session transcript into the VM’s ~/.claude and resumes it there. Moving back does the same in reverse and only fast-forwards the Mac’s branch, so if both sides changed, it stops instead of guessing.
Andrejka: a scheduled bot
Not every job needs an agent I watch. Andrejka is a small bot for the read-only ones: it runs Claude Code on a schedule on my Azure VM (and on the other VMs or the Mac when I pick them) and leaves a report.
A task is a Markdown file. The header says when it runs and which tools it gets, and the rest is the prompt:
<!-- title: Morning recap -->
<!-- schedule: weekdays 08:30 -->
<!-- tools: web github -->
Summarise my GitHub notifications, new CVEs for the tools in my stack
and what the board says is waiting on me. Keep it short.
A deploy script turns schedule: into a systemd timer on Linux or a launchd job on the Mac. One-off and “run now” tasks go through systemd-run. The tool presets are fixed in the runner script and all read-only: web is search and fetch, github is a list of read-only gh subcommands, mail is read-only Gmail and Calendar, repos gives shallow clones to read. Edit and Write are always denied, and so is reading ~/.claude, ~/.ssh and the gh config. mail and web never go together, so a mail can’t talk the bot into sending its contents to a website.
In herdr-app, Andrejka is a block in the sidebar under the agents list: tasks with their next run, a + Task dialog (recurring, once or run now), and the latest reports. A new report gives a toast and a Dock badge and opens in the Markdown preview. A health check on each VM (token, timers, failed runs, disk, missed runs) shows up as an amber line when something is wrong.

It’s tied into the board in two ways. The board writes a short “Board” section for the morning recap: what’s waiting on me, open PRs, failing CI and yesterday’s agent time. And I can give any card to Andrejka: it runs the card as a task and the report shows up on the card when it’s done.
Review inbox
PRs that wait for my review now show up in a strip above the lanes, from GitHub, our GitHub Enterprise and Azure DevOps. Each has Draft · Claude and Draft · Copilot buttons. The draft is written by a model with no tools at all (claude --tools ""), with the PR text and diff passed in as untrusted text. A PR is written by someone else, and I don’t want a crafted PR description to make an agent read my files into a comment I post. I edit the draft in the built-in editor and post it with Post…, which shows the full text in a confirm popup first. Nothing gets posted without that click.
Standup notes
We have a daily standup at 10:00. At 9:50 on workdays the board writes my notes, copies them to the clipboard and lights a dot on the Standup button in the tab bar:
- Yesterday: cards that moved to Review or Done, agent runs, and my commits per repo since the previous workday (Friday on Mondays).
- Today: what’s in Doing, the top three in Ready, and PRs waiting for my review.
- Blockers: blocked agents, blocked work items, failing CI, changes requested, reviews waiting more than two days.
It only uses company work: the Company board, commits in Azure DevOps and GitHub Enterprise repos, and company review requests. My weekend side projects stay out.

Transcript viewer
The Transcript button opens a picker of running agents. Picking one opens a tab with every step of its session: prompts, tool calls, shell commands with their output, subagents nested under the call that started them, and token use. It follows the session live. Claude transcripts can get big (one of mine was 185 MB), so it reads from the end of the file in batches and keeps the last 5,000 steps.

Janitor
Agents leave things behind: merged branches, worktrees, clones on the VMs. The janitor scans the Mac and every VM and lists what can go. Merged branches are ticked by default. Branches whose remote is gone (often squash-merged) aren’t, since they might hold commits that exist only locally. Dirty worktrees are listed but never offered for deletion. Anything a card in progress still uses is skipped. Before deleting, it checks every item again. The first scan found 296 merged branches.
Lessons and gotchas
A few things cost me time, so here they are in case you write mods too:
- Write
mod.jsonbeforemain.js. If the app seesmain.jsfirst, it treats the folder as a block and adds it to your layout. I found a stray panel in my main layout once and had to restore the layout from git. - Closing an overlay cancels its tasks. A popup that starts a long
execand then closes kills it. Long work goes through a shared queue that the always-loaded status bar copy of the mod picks up. - Mods can’t import from another mod’s folder. Shared data (like my VM list) is generated into each mod that needs it.
- The JS engine is QuickJS.
toLocaleDateStringignores its options, so dates are formatted by hand."transparent"isn’t a valid colour,#00000000is. exectakes argv, not a shell string. That turned out to be a gift: nothing is ever passed through a shell, so a branch name or a PR title can’t inject a command. Where a value does end up in a remote shell (scp host:path), it’s checked against a strict regex first.- Treat everything from outside as untrusted. Work item text, PR descriptions, review comments and CI logs all go to agents wrapped and labelled as data. Agents that only need to read get no write tools, and anything that posts or deletes asks me first.
- Have the agent screenshot its work.
herdr-app shotplus “look at the screenshot” catches overlapping text and dialogs that don’t fit the window long before I do.
Wrapping up
Three days ago herdr-app was a nice terminal window. Now it’s where my work items, agents, PRs, reviews and standup all live, and most of it was built by Claude Code working in the config folder while I described what I wanted and tested the result. The board is a few thousand lines of JavaScript and a couple of Python helpers, and I understand all of it because I reviewed every change.
What I want to try next: a secret scan before the board opens a PR, card templates for common work like chart upgrades, and a weekly sprint summary built from the same data as the standup.
If you use herdr-app, the AGENTS.md in your config folder is the best place to start. Open an agent there and ask for the panel you’ve always wanted.
$ comments --thread