Releases: tmustier/pi-agent-teams
Release list
v0.5.4
Highlights
Fixes
- Clean branch-mode worker sessions — teammates spawned with
contextMode=branchnow branch from the last stable pre-turn boundary, replay the active user request, preserve compaction entries, and materialize user-only fallbacks. This fixes idle/blank child sessions caused by inheriting the leader’s in-progress tool-use turn. (#35, #36) - Accurate quality-gate completion notices — leader completion and batch-complete messages now mention running quality gates only when hooks are actually enabled, instead of inferring that from an internal callback being wired. (#37)
Validation
npm run typechecknpm run lintnpm run smoke-testnpm pack --dry-run
v0.5.3
0.5.3
Fixes
- Inherited parent-team attach warnings — forked/branched child sessions now silently detach back to their own session team when they briefly inherit a parent team id without any attach claim. This removes the noisy warning seen in subagent-style flows while preserving normal
not_ownerwarnings for real claim conflicts.
v0.5.2
Fixes
- Pi 0.62 metadata compatibility — updated tool metadata wiring for recent Pi releases so teams tools continue to render the right prompt snippets/guidelines and stay compatible with current core APIs.
- Non-interactive exit hang — leader polling timers now call
unref()so print/json child sessions can exit cleanly instead of hanging after the agent finishes. This fixes subagent and other nested Pi flows that load the teams extension in the background.
v0.5.1
What's new
Automatic startup GC
On session start, silently removes stale team directories older than 24h. Fire-and-forget — never blocks startup. Reuses the existing gcStaleTeamDirs() with age + state checks (online workers, in-progress tasks, attach claims). Excludes the current session's own team.
Thanks @RensTillmann (#8)
Exit cleanup of empty team dirs
On session shutdown, deletes the session's own team directory if it has no tasks in any namespace, no active teammates (RPC or manual), and no attach claim from another session.
Thanks @RensTillmann (#8)
Fixes
- Added
excludeTeamIdsparameter togcStaleTeamDirs()to prevent startup GC from removing the current session's team (important for resumed sessions older than 24h).
v0.5.0
What's new
DM routing to leader LLM context
Teammate DMs are now injected into the leader's conversation via sendLeaderLlmMessage instead of only showing in the TUI. The leader can now act on DM requests autonomously.
Batch-complete auto-wake
DelegationTracker tracks task ID batches from delegate() calls. When all tasks in a batch complete, the idle leader is automatically woken to review results and continue orchestrating. Quality-gate aware — warns when hooks may still change task states.
Thanks @RensTillmann (#7)
Worker completion messages in leader context
Per-task completion/failure notifications injected into the leader LLM conversation with task subject, result summary, and progress counters. All-done detection warns when quality gates are still running. (#13)
Ergonomic worker status
Real-time time-in-state, stall detection, last message summary, and model-per-worker in panel detail. member_status tool action for agent-driven orchestration. (#10)
/team done + auto-done detection
/team done ends a run (stops teammates, hides widget, notifies with summary). Widget auto-detects when all tasks complete. (#16)
Tool call content in transcript
Worker transcript view shows tool arguments inline: file paths, commands, patterns. Errors marked with ✗. (#18, #21, #23)
Other
- Hook/model policy visible in panel/widget (#20)
- Model, thinking level, and task shown in spawn/panel/transcript (#19)
- Urgent message interrupts via
--urgentflag (#15) - Hook contract versioning and compatibility policy (#24)
- Worktree/branch auto-cleanup on shutdown (#14)
See the full CHANGELOG.
v0.4.0
v0.4.0 (stable)
Highlights
- Agent-first teams orchestration improvements across attach/join, task-centric panel workflows, and agent-invocable lifecycle/task operations.
- Hooks/quality-gate hardening:
- stable hook context contract (
PI_TEAMS_HOOK_CONTEXT_VERSION=1,PI_TEAMS_HOOK_CONTEXT_JSON) - autonomous remediation policies (
warn,followup,reopen,reopen_followup) - reopen caps and follow-up owner controls.
- stable hook context contract (
- Runtime policy control from
teamstool:hooks_policy_get,hooks_policy_setmodel_policy_get,model_policy_check.
- Model safety guardrails:
- deprecated Sonnet 4 family blocked for teammate inheritance/override (except Sonnet 4.5 variants).
- New integration coverage:
- spawn override integration test
- hooks remediation end-to-end integration test.
- CI update:
- optional workflow_dispatch job for hooks remediation integration (
run_integration_hooks_remediation=true).
- optional workflow_dispatch job for hooks remediation integration (
Notable behavior updates
- Attach claim lease + heartbeat + takeover (
/team attach <teamId> [--claim]) with safer detach behavior. - Task-centric panel shortcuts and in-panel task mutations/reassignment with conflict-safe keybindings (
t/shift+t). - Agent-invocable teams actions now cover tasks, dependencies, messaging, lifecycle, plan governance, hooks policy, and model policy.
Validation status before stable cut
npm run check: passnpm run smoke-test: passnpm run integration-spawn-overrides-test: passnpm run integration-hooks-remediation-test: pass- CI on
main: green
Follow-up items (post-stable)
v0.4.0-beta.3
What’s new
This beta advances the agent-first orchestration path with runtime policy control and model safety.
Runtime hooks policy (agent-invocable)
- Added new
teamstool actions:hooks_policy_gethooks_policy_set
- Added per-team hooks policy overrides in team
config.json(hooks):failureAction(warn/followup/reopen/reopen_followup)maxReopensPerTaskfollowupOwner(member/lead/none)
- Leader now resolves hooks policy as:
- team config override first
- environment fallback second
Model safety / deprecation guard
- Teammate spawn now blocks deprecated Sonnet 4 non-4.5 family model IDs.
- Explicit deprecated
--modeloverrides are rejected. - Deprecated leader model inheritance is prevented for teammates.
- Sonnet 4.5 variants remain allowed.
Docs and tests
- Updated README, parity docs, and skill docs for runtime hooks policy actions.
- Expanded smoke coverage for:
- hooks policy config update/clear
- model deprecation policy behavior
- docs/help drift assertions
Validation
npm run check✅npm run smoke-test✅- CI ✅
v0.4.0-beta.2
What’s new
This beta focuses on agent-first quality-gate remediation and tighter hooks parity.
Hooks / quality gates
- Added a standardized hook context contract for scripts:
PI_TEAMS_HOOK_CONTEXT_VERSION=1PI_TEAMS_HOOK_CONTEXT_JSON
- Extended failure policy handling with autonomous remediation controls:
PI_TEAMS_HOOKS_FAILURE_ACTION=warn|followup|reopen|reopen_followupPI_TEAMS_HOOKS_MAX_REOPENS_PER_TASK(default3,0disables auto-reopen)PI_TEAMS_HOOKS_FOLLOWUP_OWNER=member|lead|none
- On hook failure, leader now supports agent-first remediation behavior:
- auto-reopen (with cap)
- auto follow-up task creation and assignment by policy
- teammate remediation notification via mailbox
UX / visibility
- Inline quality-gate surfacing from prior beta kept and extended:
- task metadata state
- widget warning summaries
- task panel/task detail visibility
Docs
- Updated README and parity docs with new hook context + policy env vars.
- Added repo-level
AGENTS.mdclarifying the project’s agent-driven operating intent.
Validation
npm run check✅npm run smoke-test✅- CI ✅
v0.4.0-beta.1
@tmustier/pi-agent-teams v0.4.0-beta.1 (pre-release)
This beta focuses on quality gates/hooks, lifecycle language customization, and release hardening.
Highlights
Hooks / quality gates (new)
- Added optional leader-side hook runner for:
idle(on_idle)task_completed(on_task_completed)task_failed(on_task_failed)
- Hooks are opt-in via:
PI_TEAMS_HOOKS_ENABLED=1
- Hook scripts are discovered under:
<teamsRoot>/_hooks/(default:~/.pi/agent/teams/_hooks)
- Supported script forms:
.js/.mjs(run withnode).sh(run withbash)- executable file (run directly)
- Hook runs are serialized and logged under:
<teamDir>/hook-logs/*.json
- Hook timeout is configurable:
PI_TEAMS_HOOK_TIMEOUT_MS(default60000)
- Optional quality-gate task creation on hook failure:
PI_TEAMS_HOOKS_CREATE_TASK_ON_FAILURE=1
Style / lifecycle copy improvements
- Lifecycle text is now style-configurable (not just role naming):
- shutdown requested/completed/refused copy
- abort requested copy
- shutdown summary templates
- Built-in pirate lifecycle wording improved:
- e.g. kill copy uses "walked the plank"
- Consistent warning-level kill notifications in panel/commands.
CI / docs
- CI now supports manual trigger via
workflow_dispatch. - Parity doc refreshed with current status and P2 roadmap.
- README updated with hooks configuration + behavior.
Also included
- Per-spawn model and thinking override support in teams spawn flow.
Full diff: v0.4.0-beta.0...v0.4.0-beta.1
v0.4.0-beta.0
@tmustier/pi-agent-teams v0.4.0-beta.0 (pre-release)
This is a pre-release focused on the "special modes" / style system and a few UX + test hardening improvements.
Styles (terminology + naming)
- Added built-in
piratestyle (Captain / Matey) - Styles are now extensible:
PI_TEAMS_STYLE=<name>//team style <name>- Custom styles via
~/.pi/agent/teams/_styles/<style>.json /team style listto discover built-in + custom styles/team style init <name> [extends <base>]to scaffold a custom style template
- Manual workers now prefer the persisted team config style (leader-controlled) over env defaults.
UX
- Widget hides automatically when there are no active workers and no non-completed tasks (prevents it lingering after
/team shutdown). - Leader row label now shows "Leader (control)" / "Chairman (control)".
/teamsubcommand parsing is more robust to repeated whitespace.
Tests
- Smoke test:
pi --versioncheck is best-effort (skips if missing/hanging). - Smoke test: added a small guard against drift:
- custom style resolution works
/teamhelp text + README mention key style commands
- Integration harness: worker spawner accepts arbitrary style ids.
Full diff: v0.3.1...v0.4.0-beta.0