Table of Contents

With several coding agents running at once, I need to know which task each session belongs to and who’s waiting for an answer. When a change is ready, I want to read the diff without piecing together what happened from the chat.

I call this setup the Tripple H stack: Herdr to manage the agent sessions, Hunk to review changes with them, and Heft to set up each task’s workspace and tidy up afterward.

I built Heft and covered its setup and commands in the introduction to Heft. A lot of its value for me comes from scripting: scheduled scripts find work and start agents in the background while I’m doing something else.

Keeping track of the agents

An agent harness is the tool I talk to, such as Claude Code or Codex. Herdr runs those tools in their own terminals and groups them into workspaces. I can use different harnesses across projects and keep track of them in one place.

Herdr shows which agents are working, idle, or blocked. If one needs an answer, I can find it without checking every terminal. The others can keep working while I deal with it.

Two agents editing the same checkout can still get in each other’s way. Heft gives them separate working files.

Giving each task a place to work

Each task gets a Git branch, a worktree, and a Herdr workspace. The worktree isolates its files from other tasks in the repository. Project configuration determines which agent and shell tabs open, so the setup is the same each time.

For example, with Heft initialized and a recognized agent configured:

heft work fix/search-empty-state --prompt="Fix the empty search results view and run the relevant checks"

That starts the task in its own workspace and sends the agent the prompt. I can start another task without switching branches underneath the first one. The Heft intro covers configuration and what happens when a branch or worktree already exists.

Letting scripts start the work

My scheduled scripts check for PRs waiting for review and kick off Heft to have an agent do the initial pass. They use --no-focus, so the new workspace opens in the background without pulling me away from what I’m doing.

The same option works with the search task above:

heft work fix/search-empty-state --no-focus --prompt="Fix the empty search results view and run the relevant checks"

The command returns once Herdr accepts the prompt. The agent keeps working in its workspace, so the script doesn’t have to wait for it to finish.

Other scripts look for Jira issues to work on, or Fizzy cards for my non-work projects. Those scripts find the work and supply the task context. They all use Heft to launch the agent, whether the task is a bug fix or an article.

By the time I sit down with a PR, the agent may already have findings for me to check against the diff. I can return to its session in Herdr and use Hunk if we need to go through something together.

Reviewing with the agent

I usually configure Heft to open Hunk in a tab with a diff against the base branch. For a repository using main, that’s:

hunk diff main

That puts the review alongside the agent in the task’s workspace. I can also review just the uncommitted changes from a shell in the worktree:

hunk diff

If the agent has already committed its work, hunk show opens the latest commit. Hunk also supports comparisons against a branch or other target.

A straightforward change may only need a read-through. When I have questions, Hunk lets me leave a note on a hunk, and the agent can add explanations beside the changes. The comments documentation describes both kinds of notes.

Suppose the search fix adds a fallback that also hides an error. I can point to it in the diff and ask the agent to preserve the error state. It can inspect the review and explain why it used the fallback before making the correction. I can then check the revised code against the case I meant.

To set up that exchange, I keep the Hunk window open and ask the agent to run hunk skill path, read the returned skill file, and use it for the review. The agent works through non-interactive session commands from its own terminal. Hunk’s agent review guide covers the workflow.

Finishing the task

After review and the relevant checks, a PR is opened. When it’s time to clean up, I only use:

heft prune

It checks for uncommitted changes, whether the branch is merged, and whether the worktree is safe to remove. Cleanup is a mindless operation for me: run heft prune and let it remove what it safely can.

Scheduled scripts can leave me with a growing list of workspaces I never opened by hand. With heft prune, I don’t have to check each one by hand to clear that list either.