Stop prompting, start orchestrating
Building AI agent teams with terminal coding agents
Bharadwaj Pendyala
Bharadwaj
Pendyala
Tech Lead at Salesforce. I work on enterprise workflow systems and the tooling around agents.
I use several coding agents together in my daily work.
- Slidesbharad.dev/talks
- LinkedInin/bharadwajpendyala
- GitHubbharadwaj-pendyala
- X@bharadwaj_py
The plan for the next 35 minutes
No setup needed to follow along. Links at the end.
Six words for today
One instruction you type to an AI.
An AI that reads files, runs commands, and checks its work until a task is done.
A short plan: what to build, and how we will know it works.
A second opinion on the work, like a teammate reading your code.
Give each agent a job and decide the order the work moves in.
Build, review, fix, review again. Repeat until the reviewer agrees.
An agent works in a cycle
Like running a notebook cell, reading the output, and choosing the next cell. The agent repeats until the task is done.
Today, you are the loop
You carry every step
- You ask, read, and spot the mistake.
- You paste the error back in.
- The same AI checks its own work.
You make the decisions
- You approve the plan.
- Agents build, review, and fix.
- You approve what ships.
Prompting compared with orchestrating
| Prompting | Orchestrating | |
|---|---|---|
| Who moves the work | You, every step | The agents, between your decisions |
| Where the plan lives | In your head | In a spec file every agent can read |
| Who checks the work | The same AI, then you | Tests, a second agent, then you |
| Your job | Typing the next prompt | Approving the plan and the result |
What if agents worked as a team?
One builds. Another reviews. You decide what ships.
Every team needs roles
You
Say the idea. Approve the spec and the result.
Claude Code
Drafts the spec, writes the code, runs the tests, and runs the loop.
Codex
Reads the change and argues against it. Never edits.
Herdr
Runs the agents side by side and shows who is working.
Start with the roles. Any terminal agent can fill any of them.
The tools at a glance
| Tool | What it is | Get it |
|---|---|---|
| Claude Code | Anthropic’s coding agent for the terminal | npm install -g @anthropic-ai/claude-code |
| Codex CLI | OpenAI’s coding agent for the terminal | npm install -g @openai/codex |
| Herdr | Runs several terminal agents side by side | herdr.dev |
Each agent needs an account with its provider.
Why a different agent reviews
- The builder shares its own blind spots when it checks its own code.
- A different agent, on a different model, starts fresh and has nothing to defend.
- The reviewer only reports. It never edits, so each change has one owner.
Same reason people review each other’s code. The second reader only has to be different.
Build, review, repeat
Write a spec the agents can check
# Export tasks to CSV Goal: a user can download their tasks as a CSV file. In scope: an "Export CSV" button. Columns: title, done. Out of scope: filters, Excel format, scheduled exports. Done when: - The file opens in Excel or pandas, one row per task. - A title with a comma stays in one cell. - The existing tests still pass.
Out of scope tells the builder what not to add. Done when tells the reviewer what to check.
One file of house rules for every agent
- How to run the app and the tests.
- Code style and naming.
- What must never change.
One AGENTS.md, read by every agent. Write it once per project.
# House rules Run: npm start Test: npm test # must pass before review - Keep changes inside the spec. - Match the existing code style. - Never change the database schema without asking.
Claude briefs the reviewer
You are the reviewer. Do not edit any file. Read .agent-team/spec.md, AGENTS.md and git diff main...HEAD. Check the change does what the spec says, and nothing more. For each problem, give the file, the line, and the problem. End with exactly one line: VERDICT: APPROVE or VERDICT: REQUEST CHANGES
A fixed verdict line lets Claude decide the next step without you.
One screen, many agents
- One tab per feature.
- Builder and reviewer side by side.
- Live status for every agent.
- Each feature on its own branch, in its own copy of the repo.
One command starts the team
# human in the loop: stops for the spec and the PR /herdr-demo "Let me export my tasks to a CSV file." # autonomous: idea in, draft PR out /herdr-demo "Add a search box that filters tasks." --auto
Claude makes a worktree, opens Codex to its right, and runs the loop. You show up at the gates.
What is inside /herdr-demo
- A skill is one markdown file Claude loads when you type its name.
- The description says when to use it. The body says what to do.
- The skill lives in the repo, next to the code it works on.
About 75 lines. No framework, no SDK.
--- name: herdr-demo description: Run an agent team on one idea inside herdr. Use for /herdr-demo "<idea>" [--auto] --- ## 1. Set up the lane worktree, port, Codex pane ## 2. Plan spec.md, gate 1 ## 3. Build code, Playwright tests, commit ## 4. Review with Codex brief Codex, wait for VERDICT ## 5. Loop fix and resend, max 3 rounds ## 6. Finish app URL, gate 2, draft PR ## Rules never push main, never merge
Claude drives Codex through Herdr
# open a pane to the right and start the reviewer herdr pane split <claude> --direction right herdr pane run <codex> "codex --sandbox workspace-write" # hand over the review, then wait for the verdict herdr agent send <codex> "Read .agent-team/review-request.md. Round 1." until grep -q '^VERDICT:' .agent-team/review-1.md; do sleep 3; done # REQUEST CHANGES? fix, commit, send round 2. Max 3 rounds.
Claude writes the instructions. Herdr carries the message. A file carries the verdict back.
Two modes, one loop
You approve each gate
- You approve the spec.
- You can watch every round.
- You open the pull request.
Start here. Use it for anything that matters.
Idea in, draft PR out
- One sentence starts it.
- The agent writes its own spec.
- A draft pull request comes back.
For small, well understood changes.
Same tools, same loop. The difference is where it waits for you. A person still merges.
Where the automation stops
- Human in the loop: you approve the spec and the pull request.
- The loop stops after 3 rounds and asks you.
- The reviewer reports. It never edits.
- Each feature stays on its own branch. Agents never push to main or merge.
DEMO
Both modes, live.
What you just saw
In human in the loop mode you approved two gates. In autonomous mode you only read the draft PR.
What can go wrong
A wrong spec gets built and approved. Fix: you approve the spec.
Each round costs time and money. Fix: stop after 3 rounds.
Agents add things nobody asked for. Fix: an out of scope list the reviewer checks.
Agents read what is in the folder. Fix: sample data, no production keys.
From one feature to several
- A worktree is a second working folder for the same repo, on its own branch.
- One feature, one worktree, one Herdr tab.
- Get one loop working before you run three.
# one folder and branch per feature
git worktree add ../app-csv -b feat/csv-export
git worktree add ../app-search -b feat/search
git worktree add ../app-dark -b feat/dark-modeIt works for data work too
Spec: expected result
Name the output on a small sample table. The reviewer checks joins, nulls, and duplicates.
Spec: same numbers
Turn cells into functions. The reviewer checks the outputs match before and after.
Spec: a quality check
Add a rule such as no negative amounts. The reviewer looks for the edge cases it misses.
Start small tomorrow
- Ask for the plan before the code. Read it.
- Ask a different assistant to review the change against the plan.
- Paste the review back to the builder.
- When the manual loop works, automate the paste.
Do it by hand for a week. Then automate.
Take the laptop out of the loop
- The same loop, on GitHub Actions instead of your laptop.
- No terminal for the person with the idea.
- The draft PR carries the evidence: checks and a short video.