Skip to content

feat: add native persistent agent teams - #39523

Closed
em1315 wants to merge 9 commits into
anomalyco:devfrom
em1315:spark-agent-teams
Closed

feat: add native persistent agent teams#39523
em1315 wants to merge 9 commits into
anomalyco:devfrom
em1315:spark-agent-teams

Conversation

@em1315

@em1315 em1315 commented Jul 29, 2026

Copy link
Copy Markdown

What changed

  • add a persistent SQLite domain for agent teams, named members, messages, and shared tasks
  • run teammates in independent V2 sessions so different sessions execute concurrently
  • expose typed /api/team routes and regenerated Promise/Effect clients
  • register native team_create, team_spawn, team_status, team_message, and team_task tools
  • add lead/writer/reviewer permission profiles and preserve leaf-level OpenCode agent permissions
  • add a live original-UI sidebar for member status, TPS, context, reasoning, tool/result/error state, tasks, and messages
  • recover interrupted teammates after restart and persist a system-to-lead recovery notice
  • include Windows safe-install tooling and operator documentation

Why

OpenCode subagents currently run as a foreground handoff workflow. Two independent local model endpoints cannot continuously implement and review in parallel while sharing durable task/message state or recovering after a host restart. This adds that orchestration as native OpenCode primitives rather than an external terminal wrapper.

Validation

  • full 36-package workspace typecheck passed, including uncached Core, Server, and OpenCode checks
  • 8 focused AgentTeam service/tool tests passed
  • production Web UI build passed
  • Windows single-platform embedded binary build and smoke test passed
  • both DGX OpenAI-compatible endpoints passed parallel tool-call probes
  • native Mark1/Spark 1 and Spencer2/Spark 2 sessions completed concurrently through the team API
  • forced process termination was recovered as an interrupted teammate with durable error state

Notes

The implementation keeps one OpenCode host process and one persistent session per teammate. Model execution remains endpoint-local; this is concurrent agent orchestration, not tensor parallelism.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found related PRs that address similar agent team functionality:

Potential Related PRs:

  1. PR feat: add agent team core — Team namespace, messaging, recovery, and events #12730 - feat: add agent team core — Team namespace, messaging, recovery, and events

    • Related because it implements core team functionality (messaging, recovery, events) which this PR builds on
  2. PR feat: add team TUI integration — sidebar, header, sync, and team dialog #12732 - feat: add team TUI integration — sidebar, header, sync, and team dialog

    • Related because it adds the UI components for agent teams that this PR likely integrates with

These aren't exact duplicates of PR #39523, but they appear to be companion/related features for the agent teams system. PR #39523 seems to be the broader implementation that includes persistent storage, concurrent V2 sessions, and API routes, while #12730 and #12732 handle the core team domain logic and UI integration respectively.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 29, 2026
@github-actions github-actions Bot closed this Jul 29, 2026
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