Skip to content

feat(task-queue): add task queue system for orchestrating Claude prompts#5

Open
StanGirard wants to merge 1 commit intomainfrom
session/BrainStorming--brave-eagle-42
Open

feat(task-queue): add task queue system for orchestrating Claude prompts#5
StanGirard wants to merge 1 commit intomainfrom
session/BrainStorming--brave-eagle-42

Conversation

@StanGirard
Copy link
Collaborator

Summary

Implements a global task queue system for orchestrating multiple Claude prompts with:

  • Three execution modes: print (-p background), interactive, and trust (--dangerously-skip-permissions)
  • Sequential dependencies: Task chains (1 → 2 → 3) where each task waits for the previous one
  • Session isolation: Each task creates its own tmux session
  • Failure handling: Retry/Skip/Stop options when a task fails

Backend Changes

  • SQLite migration v7 with tasks and task_templates tables
  • tasks.ts database module with CRUD operations, batch creation, dependency management
  • TaskQueueExecutor service that polls for ready tasks and executes them
  • REST API endpoints: /api/tasks, /api/tasks/batch, /api/tasks/:id/retry, /api/tasks/:id/skip, etc.
  • WebSocket events for real-time task updates (task-created, task-started, task-completed, task-failed)

Frontend Changes

  • TaskQueuePanel: Linear-style compact UI in the sidebar with progress bar
  • TaskCard: Sortable cards with drag-and-drop (@dnd-kit) for reordering
  • TaskCreator: Modal for single task or batch (task chain) creation
  • FailureDialog: Dialog for retry/skip/stop decisions on failed tasks
  • useTaskQueue: Hook for state management and WebSocket integration

Design Inspiration

Test plan

  • All existing tests pass (359 tests)
  • Build succeeds
  • Manual: Create single task and verify execution
  • Manual: Create task chain (3 tasks) and verify sequential execution
  • Manual: Force a task failure and test Retry/Skip/Stop buttons
  • Manual: Test drag-and-drop reordering
  • Manual: Test all 3 execution modes

🤖 Generated with Claude Code

Implement a global task queue system that allows orchestrating multiple Claude prompts with:
- Three execution modes: print (-p), interactive, and trust (--dangerously-skip-permissions)
- Sequential dependencies (task 1 → 2 → 3)
- Each task creates its own session
- Retry/Skip/Stop handling for failed tasks
- Drag-and-drop reordering with @dnd-kit

Backend changes:
- Add SQLite migration v7 with tasks/templates tables
- Create tasks.ts database module with CRUD operations
- Create TaskQueueExecutor service for task execution
- Add REST API endpoints for task management
- WebSocket events for real-time task updates

Frontend changes:
- TaskQueuePanel component with Linear-style compact UI
- TaskCard with status icons and mode badges
- TaskCreator modal for single/batch task creation
- FailureDialog for retry/skip/stop decisions
- useTaskQueue hook for state management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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