forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
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
- ✅
tasktool - Spawn new agents (sync/async) - ✅
check_tasktool - 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
- list_tasks tool created
- Returns pending task IDs and completed results
- Properly filtered by session ownership
- Documentation added
- Tests added
- Fork-features manifest updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels