Skip to content

fix(agents): wire persistent teams and repair worker lifecycles - #950

Merged
ericleepi314 merged 5 commits into
mainfrom
fix/multi-agent-e2e-runtime
Sep 23, 2026
Merged

ericleepi314 merged 5 commits into
mainfrom
fix/multi-agent-e2e-runtime

Conversation

@ericleepi314

@ericleepi314 ericleepi314 commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Completed background workers previously could appear to resume without starting a model loop, and the team tools had no production path for persistent teammate execution. This change connects those lifecycles end to end: workers process follow-ups with their history, teammates remain available for assignments, and explicit messages reach the correct peer or leader.

The implementation also:

  • Shares admission, progress, transcript persistence, session/parent notification routing, and bounded shutdown across local, team, and workflow workers.
  • Implements leader/member identity, mailbox consumption, dependency-aware task pickup, completion-hook veto, matching plan/shutdown decisions, and interruption of pending permission requests through the WebSocket server.
  • Fixes concurrent name claims, late-message completion races, workflow startup/stop races, budget accounting and replay checkpoints.
  • Honors Git worktree isolation, fails when isolation cannot be created, preserves edits/commits, and retains a checkout still used by a background descendant.
  • Repairs four existing Windows test-fixture assumptions (UTF-8, literal CRLF, unreadable-directory setup, and native home-directory environment) identified in the prior main-branch CI run. Assertions are preserved.

Validation and the comparison with the Claude Code reference are documented in docs/multi-agent-runtime-verification.md. New end-to-end tests execute real query loops, tools, files, registries and WebSocket connections with a scripted external provider. A separate live DeepSeek smoke run passed background Read, same-ID resumption, peer-to-leader delivery, and approved shutdown/deletion.

Validation:

  • Final GitHub Actions run: all 8 checks passed, including Python on Linux (10,755 passed; 19 skipped) and Windows (10,725 passed; 48 skipped), desktop on both platforms, web and Harbor.
  • Full Python suite: 10,758 passed, 16 skipped, 340 passing subtests (316.14 s, final revision).
  • Portable Windows fixture group: 144 passed locally.
  • Bridge/error-propagation regression: 51 passed. Heartbeat assertions await the persisted refresh; the mocked connection-error test retains retries without real network-backoff sleeps.
  • Team/task regression: 163 passed, with 20 independent passes of the automatic-claim/durable-snapshot trace.
  • Thread-aware admission and end-to-end regression: 54 passed. Admission tests use elapsed-time waits, thread-safe events, and teardown joins; the admission suite also passes with asyncio debug enabled.
  • TUI typecheck and all 65 agent-tree/task-output tests pass.
  • Black/isort applied; git diff --check passes. Four new runtime modules pass targeted mypy. Full mypy has 395 baseline diagnostics vs. 397 before, with zero added diagnostics after line-number normalization.
  • The unchanged TUI's broader suite has 1,896 passed, 8 failed, 4 skipped. Seven failures reproduce on the untouched starting commit; the cursor-layout timeout passes on isolated rerun. These pre-existing display/configuration failures are documented, not reported as green.

Scope: persistent teams are in-process, and local worker continuation is session-owned. Remote/pane/UDS backends and automatic crash recovery are not included. Observed token budgets gate new work; already-running requests can exceed the threshold. These limits and stale-roster handling are documented.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Test Results

     5 files   1 021 suites   20m 24s ⏱️
16 031 tests 16 009 ✅ 22 💤 0 ❌
32 032 runs  31 961 ✅ 71 💤 0 ❌

Results for commit 99d6c49.

♻️ This comment has been updated with latest results.

@ericleepi314
ericleepi314 merged commit 84dd0dd into main Sep 23, 2026
8 checks passed
ericleepi314 added a commit that referenced this pull request Sep 23, 2026
The news item and README highlight for the multi-agent refactor (#915,
#950); the version bump across pyproject, the package fallback,
install.sh, install.ps1 and uv.lock; and the changelog cut. The
Unreleased block, backfilled with the PRs since v1.6.0 it had missed
(nano among them), becomes 1.7.0, dated today, and the compare-link
ladder gains 1.7.0.

docs/NEWS.md gains the three items it had fallen behind on (v1.6.0 and
both 2026-08-09 entries); the ZH README syncs to the EN top 10. The
nano copy now reports both of its latest full-suite runs and drops the
cost ratio until the pricing basis of the 08-16 run is checked;
RUN_NANO_TB21.md records the round-3 (#900) run. The Bash pipe-drain
fix that shipped with nano is listed under Fixed, since it changed
every mode.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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