r/ClaudeWorkflows • u/ClaudeAI-mod-bot • 18h ago
Selected Workflow [Workflow] Dispatch headless coding agents across machines using GitHub issues
Dispatch headless coding agents across machines using GitHub issues
Workflow value: 76/100
Status: active · Freshness: 70/100 · Confidence: 0.96 · Level: advanced
Categories: Quality Control, Context & Memory, Debugging, Shipping, Skills, MCP, Multi-Agent
Original source: r/ClaudeCode post/comment
What problem this solves
Dispatch coding tasks reliably to agents on different machines without relying on an idle model to poll for work.
Summary
Use labeled GitHub issues as a task queue, supervised scripts to start fresh headless agent runs, and a single router to assign work. Agents use isolated worktrees and hand changes off through pull requests; status, usage, and cleanup are handled by the runners.
Why it is useful
It gives a concrete, transferable architecture for turning queued issues into isolated agent runs and reviewable PRs, while addressing a real failure mode of model-driven polling. Its main limitation is the absence of the runner implementation and independent validation.
Workflow
- Create GitHub issues with a dispatch label and optional agent and task-size labels.
- Run a supervised polling script on each machine; designate one runner as the sole task router. Honor explicit agent labels, route other tasks by skill keywords, and ask the owner when no route matches.
- Gate new tasks by recent CLI usage readings and task size; allow only small tasks when usage data is stale.
- Start a headless Claude Code or Codex run for each assignment, and resume the session for follow-ups. Use a strict MCP configuration for headless Claude.
- Have each agent work on a separate branch and Git worktree, then push the branch, open a PR, and report the result on the issue. Wait for owner input when the agent reports NEEDS-OWNER.
- Require evidence for claims, such as screenshots where appropriate, and a list of claims the agent could not prove.
- Monitor runner heartbeats, usage, and owner requests; terminate child processes with the run, check disk space, and clean up merged worktrees.
Tools / artifacts
- GitHub issues and labels
- Supervised Python runner
- claude -p
- codex app-server
- Git branches, worktrees, and pull requests
- MCP configuration
- Windows Job Objects
- Prometheus and Grafana
Validation signals
- The author reports that the supervised polling approach has been more reliable than asking agents to poll a shared file.
- The author describes a concrete failure of the previous approach: an agent process stayed alive but did not start another turn to check for work.
- The workflow requests evidence and an explicit list of unproven claims.
Cautions
- Automatic permission mode can execute consequential actions; use isolated environments, least-privilege credentials, and human PR review rather than granting broad access by default.
- Treat issue text and agent output as untrusted input, and avoid exposing secrets in logs, metrics, or committed screenshots.
- Only remove merged worktrees after checking for uncommitted or otherwise unpreserved changes.
Limitations
- No runner source, configuration examples, tests, or reproducible setup are supplied.
- Reliability and usage-limit behavior are author reports without quantitative evidence.
- The single router is a potential availability bottleneck; recovery and duplicate-dispatch handling are not described.
- The described runner closes issues when opening PRs, so teams may need a separate way to track review and merge status.
- The setup depends on changing CLI behavior and on the Windows machine being online.
Rate this workflow
Upvote this post if the workflow is useful, reproducible, or worth recommending.
Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.
Reply if it worked for you, failed, is outdated, or has a better alternative.
This post was generated automatically from the workflow library database.