Summary
pi-herdr-subagents fails to spawn subagents on Herdr ≥ 0.7.5 (current Homebrew stable). The extension calls a CLI shape that existed in 0.7.1–0.7.4 but was removed in 0.7.5.
Error when invoking the subagent tool:
Failed to start herdr pane for "<name>": unknown option: --cwd
Herdr itself is fine (HERDR_ENV=1, socket reachable). This is an API mismatch, not a Herdr outage.
Environment
- Herdr: 0.7.5 (Homebrew stable, macOS Apple Silicon)
- pi-herdr-subagents:
main @ 2026-07-22 (pre-fix)
- pi: running inside a Herdr pane
- OS: macOS
Steps to reproduce
- Install Herdr 0.7.5 (
brew install herdr or install script on stable channel).
- Start pi inside a Herdr pane with
pi-herdr-subagents enabled.
- Invoke
subagent (e.g. spawn a reviewer agent).
- Observe spawn failure with
unknown option: --cwd.
Expected behavior
Subagent pane opens; wrapper script runs; orchestrator receives lifecycle events.
Actual behavior
Spawn fails immediately. No pane is created.
Root cause
src/herdr/client.ts → agentStart() builds:
herdr agent start <name> --cwd <path> [--tab …] [--split …] [--env …] --no-focus -- bash <wrapper.sh>
Herdr 0.7.5 (release notes) replaced this with a live-agent facade:
herdr agent start <name> --kind <KIND> --pane <PANE_ID> [-- <agent-args>]
Topology (--cwd, --tab, --split, --env) is no longer accepted on agent start. Layout must be created separately via herdr pane split, then an interactive agent kind is started in that pane.
Subagents are not interactive agent kinds — they launch a bash wrapper that exports env and execs pi. So the 0.7.5 agent start --kind path is the wrong primitive anyway.
Proposed fix
Keep the public agentStart() interface; change implementation to:
herdr pane split --current --direction right|down --cwd <cwd> [--env K=V] --no-focus
- Parse
result.pane.pane_id from JSON envelope
herdr pane run <pane_id> bash <wrapper.sh> …
This matches Herdr's current SKILL.md guidance for non-agent commands and argv launches.
Scope of change
| File |
Change |
src/herdr/client.ts |
Rewrite agentStart() (~30 net LOC) |
test/herdr-client.test.ts |
Expect split + run instead of agent start |
README.md, docs |
Note 0.7.5 migration; bump minimum Herdr version |
No changes needed to index.ts, launch.ts, or the watcher — contract is preserved.
Version compatibility
| Herdr |
agent start --cwd |
Works with current extension? |
| 0.7.1 – 0.7.4 |
✅ |
✅ |
| 0.7.5+ |
❌ removed |
❌ (without fix) |
README currently says herdr ≥ 0.7.1, which implies 0.7.5 works — it doesn't.
Suggested follow-ups
Workarounds (until fixed)
- Downgrade Herdr to 0.7.4 (last release with legacy API)
- Local patch to
client.ts as described above
- Reinstalling Herdr via install script on stable still yields 0.7.5 — won't help
Summary
pi-herdr-subagentsfails to spawn subagents on Herdr ≥ 0.7.5 (current Homebrew stable). The extension calls a CLI shape that existed in 0.7.1–0.7.4 but was removed in 0.7.5.Error when invoking the
subagenttool:Herdr itself is fine (
HERDR_ENV=1, socket reachable). This is an API mismatch, not a Herdr outage.Environment
main@ 2026-07-22 (pre-fix)Steps to reproduce
brew install herdror install script on stable channel).pi-herdr-subagentsenabled.subagent(e.g. spawn arevieweragent).unknown option: --cwd.Expected behavior
Subagent pane opens; wrapper script runs; orchestrator receives lifecycle events.
Actual behavior
Spawn fails immediately. No pane is created.
Root cause
src/herdr/client.ts→agentStart()builds:Herdr 0.7.5 (release notes) replaced this with a live-agent facade:
Topology (
--cwd,--tab,--split,--env) is no longer accepted onagent start. Layout must be created separately viaherdr pane split, then an interactive agent kind is started in that pane.Subagents are not interactive agent kinds — they launch a bash wrapper that exports env and execs
pi. So the 0.7.5agent start --kindpath is the wrong primitive anyway.Proposed fix
Keep the public
agentStart()interface; change implementation to:herdr pane split --current --direction right|down --cwd <cwd> [--env K=V] --no-focusresult.pane.pane_idfrom JSON envelopeherdr pane run <pane_id> bash <wrapper.sh> …This matches Herdr's current SKILL.md guidance for non-agent commands and argv launches.
Scope of change
src/herdr/client.tsagentStart()(~30 net LOC)test/herdr-client.test.tsREADME.md, docsNo changes needed to
index.ts,launch.ts, or the watcher — contract is preserved.Version compatibility
agent start --cwdREADME currently says herdr ≥ 0.7.1, which implies 0.7.5 works — it doesn't.
Suggested follow-ups
tabIdin launch plan is ignored on 0.7.5+ (pane split --currentonly)herdr agent start --helplacks--cwdbut code path hasn't been updatedWorkarounds (until fixed)
client.tsas described above