Skip to content

feat(assistant): add durable multi-agent collaboration and live task views - #4438

Open
lyingbug wants to merge 6 commits into
mainfrom
feat/assistant-agent-collaboration
Open

lyingbug wants to merge 6 commits into
mainfrom
feat/assistant-agent-collaboration

Conversation

@lyingbug

@lyingbug lyingbug commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

The assistant can delegate work to existing agent templates and collect their results in the same conversation. This adds the six collaboration tools (spawn_agent, list_agents, send_message, followup_task, interrupt_agent, wait_agent) with durable scheduling, mailbox delivery, parent wakeup and child approval forwarding.

  • Persist task state, ownership leases and safe wait checkpoints, including delivered child messages and their transcript positions. Mailbox delivery is acknowledged durably before execution; failed or panicking runs only queue undelivered follow-ups, including after approval recovery. Cancellation fences prevent late results or approval decisions from reviving canceled runs; uncertain executions are not replayed.
  • Separate progress from final answers, retain complete child results for final synthesis, and deliver runtime notices without rewriting the stable request prefix.
  • Show compact child task cards, live detail tabs and synchronized approval history. Approval streams identify their continuation generation so reconnects retain prior steps without duplicating the resumed suffix. Parent and child views preserve reading position during streaming and thought folding.
  • Remove the superseded trial-agent flow. New agents default to a larger output budget and unlimited iterations. The built-in WeKnora assistant explicitly uses 24,576 completion tokens and unlimited iterations.

Includes PostgreSQL and SQLite migrations (PostgreSQL collaboration migration is 000124, after the current main migration) and design documentation. Compatibility: try_agent is removed in favor of the collaboration workflow.

Type of Change

  • ✨ New feature
  • 🐛 Bug fix
  • 🎨 Refactor
  • 🧪 Test
  • 📚 Documentation update

Testing

  • Local frontend: npm test — 1819 passed, 1 existing skipped; type-check and npm run build passed.
  • Backend: core agent/collaboration/HITL suites passed with -race; targeted collaboration service and handler suites passed three consecutive race runs. GitHub App, Frontend, Docker image, Go lint and repository scan checks passed on b6d77477b.
  • Race checks: collaboration runtime suite, plus delegated/collaboration service and HITL tests passed.
  • golangci-lint run --new-from-merge-base=origin/main ./... — 0 issues.
  • git diff --check origin/main...HEAD passed.
  • New regression coverage: parent restart retains consumed child results and references (including legacy checkpoints); approval recovery preserves delivery order without duplicate messages; panic/missing-result and failed approval continuation cannot replay delivered follow-ups; cancelled panics cannot queue new runs; same-request approval resumes preserve timelines through repeated approvals, reconnects and steering; failed follow-ups do not repeat completed effects; stream reconnect avoids duplicate output; open child tabs follow steering, approval and later runs.
  • Scroll regression coverage includes an upward gesture racing queued output, layout changes while reading, hidden child tabs, explicit return to bottom, and deferred completion folding.

Local test environment: LOG_FORMAT=json is interpreted as a literal log template, so it was unset for log assertions.

An additional full-service -race run found existing races in API-key, sandbox-config and skill test fixtures. The same failures were reproduced on the pre-fix commit 846ecf506; the collaboration-specific race suites pass.

Checklist

  • Changed source files are formatted
  • Targeted tests and full-repository checks passed
  • Diff-scoped lint and whitespace checks passed
  • Added regression coverage and design documentation
  • Compatibility change called out above

Screenshots / Recordings

The parent/child stream and reading-position behavior were checked with a local browser fixture. Live workspace screenshots contain internal article content and are not included in this public PR.

@lyingbug
lyingbug force-pushed the feat/assistant-agent-collaboration branch from 552e976 to 846ecf5 Compare October 17, 2026 14:39

This branch has not been deployed

No deployments
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