Summary
Currently, we have task and check_task tools, but no way to list all running/pending tasks. We need a list_tasks tool to get an overview of all background tasks.
Current State
- ✅
task tool - Spawn new agents (sync/async) - ✅
check_task tool - Check individual task status by ID - ❌ No way to list all tasks without knowing their IDs
Proposed Solution
Add a new list_tasks tool that exposes the existing internal listBackgroundTasks() function from packages/opencode/src/session/async-tasks.ts.
Use Cases
- Track multiple concurrent tasks
- Get overview of running/pending/completed tasks
- Find task IDs without having saved them
- Debug task scheduling issues
Implementation Notes
- Internal function
listBackgroundTasks() already exists - Returns
{ pending: string[], results: Record<string, BackgroundTaskResult> } - Need to add tool wrapper with proper parameters and documentation
- Should filter to only show tasks accessible to the caller session
Acceptance Criteria
Summary
Currently, we have
taskandcheck_tasktools, but no way to list all running/pending tasks. We need alist_taskstool to get an overview of all background tasks.Current State
tasktool - Spawn new agents (sync/async)check_tasktool - Check individual task status by IDProposed Solution
Add a new
list_taskstool that exposes the existing internallistBackgroundTasks()function frompackages/opencode/src/session/async-tasks.ts.Use Cases
Implementation Notes
listBackgroundTasks()already exists{ pending: string[], results: Record<string, BackgroundTaskResult> }Acceptance Criteria