Repository navigation
v1.14.0
GitHub source release at 8b8852c (#52). Update with pi update git:github.com/alsevilla/agent-harness and /reload (wait until the footer shows no running jobs), or pin @v1.14.0.
Worker cost
Threshold-triggered worker masking with budget fallbacks. Claude Haiku 5.5 prices a request over 100k input tokens at 5x. From about 80k estimated tokens (system prompt included) a worker's request is shortened step by step, re-measured after each, until it fits a 95k budget: main's stable batching, then every older large output, then large outputs except the latest bounded to head and tail; if it is still over, the host is asked to compact once. Best effort, not a hard bound. Tune with PI_SUBAGENT_WORKER_MASK_TOKENS (0 off) and PI_SUBAGENT_WORKER_TOKEN_BUDGET.
Measure it. /subagent usage now shows each role's peak request (provider input + cache read + cache write) and how many requests were over 100,000.
Tool discipline for workers (from Claude Code's working rules): independent calls in one turn, partial reads with offset and limit, the read/grep/find tools instead of shell cat/grep, no sleep polling, no interactive commands, no files the task does not need.
Reloads and sessions
Stopped jobs are named. A /reload or session change aborts running background jobs; the harness now records them per originating session and the next session (the same one after /reload, or its successor after /new, resume or fork) shows a notice, tells main in its state card that no result will arrive, and explains the job on result instead of a bare "epoch mismatch". Parallel Pi sessions never touch each other's records.
Verification and limits
npm test: 961 passed, 0 failed, 7 skipped. With a Pi 1.5.0 host: 1527 passed; the 11 failures need the owner's installed setup (subscription connector, Ponytail, Serena/Graphify integrations, a git identity) and match the previous release. The masking estimate is approximate (characters / 4) and has not yet been measured against real runs; compare /subagent usage peak requests before and after. Source release only: no npm publication.