Skip to content

Comments

feat(daemon): keep tasks pending until an agent is available#11

Merged
pmarsceill merged 1 commit intomainfrom
feat/task-queue-pending-until-agent-available
Jan 21, 2026
Merged

feat(daemon): keep tasks pending until an agent is available#11
pmarsceill merged 1 commit intomainfrom
feat/task-queue-pending-until-agent-available

Conversation

@pmarsceill
Copy link
Owner

Summary

  • Tasks now remain in PENDING state until an available agent can handle them
  • Added ProcessPendingTasks() method to TaskRouter that assigns pending tasks to available agents
  • Added callback mechanism in ProcessManager to trigger task processing when agents become available (spawned or finish a task)

Closes #10

Test plan

  • Submit tasks when no agents exist - verify they stay pending
  • Spawn an agent - verify pending tasks get assigned automatically
  • Submit multiple tasks with one agent - verify they're processed one at a time
  • Verify make test passes
  • Verify golangci-lint run passes

🤖 Generated with Claude Code

Tasks now remain in the queue until an available agent can handle them.
When an agent becomes available (spawned or finishes a task), pending
tasks are automatically assigned in FIFO order.

Closes #10

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pmarsceill pmarsceill merged commit f4305c5 into main Jan 21, 2026
5 checks passed
@pmarsceill pmarsceill deleted the feat/task-queue-pending-until-agent-available branch January 21, 2026 20:06
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.

Keep tasks in the queue until there is an available agent

1 participant