Skip to content

feat(pi-agent-team): separate team and round lifecycle - #2

Merged
geminixiang merged 3 commits into
mainfrom
agent-team-lifecycle-core
Aug 20, 2026
Merged

feat(pi-agent-team): separate team and round lifecycle#2
geminixiang merged 3 commits into
mainfrom
agent-team-lifecycle-core

Conversation

@geminixiang

Copy link
Copy Markdown
Owner

Summary

  • Separate the stable retained team handle (teamId) from per-objective round execution (roundId / roundIndex).
  • Expose explicit team lifecycle and current/latest RoundRun state while preserving backwards-compatible flat round fields and stable tool handles.
  • Retain bounded terminal round summaries and member session identities across continuation rounds.
  • Make cancellation terminalize the current round without destroying the retained team, and prevent late completion from contaminating a successor round.
  • Include explicit team handle, round identity, objective, and outcome in the foreground manifest.

Evaluation-first

The lifecycle evaluation specification was frozen before implementation. Production code and lifecycle tests were then implemented separately and cross-validated against the frozen acceptance suite, including cancellation races, continuation session stability, bounded history, privacy, wait transitions, and foreground observability.

Before / after

Before: one run identity and status surface conflated the retained team with its latest objective execution; cancellation left continuation semantics ambiguous; rounds had no first-class identity or bounded history.

After: teamId is a stable retained handle, each objective is an explicit RoundRun with a unique roundId and monotonic roundIndex, team lifecycle is distinct from round status/outcome, cancellation returns the team to available, and continuation reuses the same member sessions.

Verification

  • npm test --workspace @geminixiang/pi-agent-team: 149/149 passed
  • npm run check --workspace @geminixiang/pi-agent-team: TypeScript passed

Scope boundaries

This change intentionally does not include:

  • game or scenario domain logic
  • cross-process durability or recovery
  • typed claim namespaces
  • block-reason privacy redesign
  • wait-abort wording changes
  • semantic or idempotent group aliases

@geminixiang
geminixiang merged commit e4f0659 into main Aug 20, 2026
1 check passed
@geminixiang
geminixiang deleted the agent-team-lifecycle-core branch August 20, 2026 07:05
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.

1 participant