Expand description
Subtask abstraction — async spawn/join integrated with ThreadManager.
This module provides the unified mechanism for running concurrent work:
- Subagents spawned by the main agent (joinable, return a result)
- Background tasks (long-running, may not return)
- One-shot tasks (quick async work that returns a result)
All subtasks:
- Run as tokio tasks
- Create a thread entry in ThreadManager on spawn
- Update thread status on completion/failure
- Support cancellation via CancellationToken
- Support agent-settable descriptions (shown in sidebar)
Structs§
- Spawn
Options - Options for spawning a subtask.
- Subtask
Handle - Handle to a running subtask. Allows joining, cancelling, and updating status.
- Subtask
Registry - Registry of active subtask handles for a session.
Enums§
- Subtask
Result - Result of a completed subtask.
Functions§
- spawn_
background - Spawn a long-running background thread.
- spawn_
subagent - Spawn a subagent as an async subtask.
- spawn_
task - Spawn a one-shot background task.