Skip to content

Add pi agent support - #28

Open
kleb wants to merge 1 commit into
unclebob:mainfrom
kleb:add-pi-support
Open

Add pi agent support#28
kleb wants to merge 1 commit into
unclebob:mainfrom
kleb:add-pi-support

Conversation

@kleb

@kleb kleb commented Jul 1, 2026

Copy link
Copy Markdown

Add pi agent support

Adds pi as a supported agent backend alongside claude, codex, copilot, and grok.

Changes

  • Added "pi" to agent validation set
  • Added pi case to agent launch command
  • Updated README prerequisites list

Testing

Production tested with four-pack workflow on C++ project.

Usage

window coder pi coder
window architect pi architect batch --model claude-opus-4 --thinking high

@RicJMC

RicJMC commented Sep 3, 2026

Copy link
Copy Markdown

Tested this PR locally (two-pack on a small Python toy repo, pi 0.84.4 as backend for both roles, a flash-tier model via --model). Full cycle closed without intervention after the initial task: coder TDD commit → git_handoff (priority 50) → cleaner (batch) merge + hardening → reverse handoff (priority 00) → coder merge → tests green. ~$0.02 and ~4 minutes for the closed cycle.

Three findings from our first (failed, documented) run, all small:

  1. ./swarm silently re-downloads swarmforge/scripts/ from main when scripts/shared-articles/ is missing — this clobbered the local "pi" patch on first boot ("Unsupported agent 'pi'"). Workaround: create scripts/shared-articles/ before first boot. Might be worth warning instead of silently overwriting modified scripts.

  2. handoffd.bb notify! sends the wake text + C-m + C-j. In the pi TUI, C-m does not submit the input (4/4 controlled failures); tmux send-keys Enter does (2/2). One-line patch: C-mEnter in notify!.

  3. Conf order is semantic, not cosmetic: require-master-worktree! needs exactly one master worktree window (so coder pi coder will not boot), and the last window is the "role terminal" its inbound git_handoffs are marked non-forwarding, and the helper refuses any git_handoff from whoever is processing one. With cleaner, coder order, the cleaner's return handoff (00) is refused and its commit is orphaned on its branch. The two-pack default order (coder first, cleaner last) is load-bearing worth a line in the README.

Report from a scripted two-run experiment, agent-assisted;
Happy to share the patch diffs if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants