Skip to content

M28-E: Background sub-agent execution #714

@bug-ops

Description

@bug-ops

Parent: #709

Summary

Support background (non-blocking) sub-agent execution, allowing the main agent to continue interacting with the user while sub-agents work concurrently.

Scope

  • Background spawn: returns immediately, sub-agent runs on separate tokio task
  • Concurrent sub-agent limit (max_concurrent in SubAgentManager)
  • Status polling from main agent loop
  • Result notification when background sub-agent completes
  • Cleanup on main agent shutdown (cancel all background sub-agents)

Acceptance Criteria

  • Background sub-agent does not block main agent conversation
  • max_concurrent enforced (spawn returns error if limit reached)
  • Main agent can poll status of background sub-agents
  • Completion notification delivered to user
  • All background sub-agents cancelled on main agent shutdown
  • CancellationToken propagated correctly to background tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions