Skip to content

[Gastown] PR 10: Multiple Polecats per Rig #216

@jrf0110

Description

@jrf0110

Parent: #204 | Phase 2: Multi-Agent Orchestration

Revised: Polecats now run as separate Kilo CLI processes in the shared Town Container instead of separate cloud-agent-next sessions. Git worktrees provide filesystem isolation.

Goal

Support N concurrent polecats working on different beads in the same rig.

Changes

  • sling tRPC mutation supports creating multiple beads + agents
  • Rig DO manages agent name allocation (sequential names: Toast, Maple, Birch, etc.)
  • Each polecat gets its own git worktree and branch: polecat/<name>/<bead-id-prefix>
  • All polecats run as separate Kilo CLI processes inside the same Town Container
  • Dashboard shows all active agents with their streams
  • Rig DO enforces single-writer per agent (no two processes for the same agent)

Agent Name Allocation

The Rig DO maintains a name pool and assigns names sequentially to new polecats. Names are recycled when agents complete work and are deregistered.

Branch Naming

polecat/toast/abc123      # polecat "Toast" working on bead abc123...
polecat/maple/def456      # polecat "Maple" working on bead def456...

Container Impact

The shared container model makes this natural — adding a polecat is just spawning another Kilo CLI process, not provisioning another container. Each polecat gets:

  • Its own git worktree (isolated filesystem)
  • Its own Kilo CLI process
  • Its own JWT for DO auth
  • Its own heartbeat reporting

Resource contention is managed by the container's vCPU/memory limits. Polecats are mostly I/O-bound (waiting on LLM responses), so CPU sharing works well.

Dependencies

Acceptance Criteria

  • Agent name allocation in Rig DO
  • Support for N concurrent polecats as separate container processes
  • Each polecat gets isolated git worktree and unique branch
  • sling mutation updated to handle multiple concurrent assignments
  • Dashboard updated to show all active agents with streams
  • Single-writer enforcement per agent (Rig DO rejects duplicate dispatch)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions