Shard, an open-source Python tool published to PyPI as shard-code by developer nihalgunu, takes aim at one of the more frustrating realities of AI-assisted coding: waiting in line while a single agent works through a complex task sequentially. The project, shared as a Show HN post, decomposes a natural language coding prompt into a Directed Acyclic Graph of parallel sub-tasks and dispatches multiple AI coding agents concurrently — with each agent working in its own isolated git worktree. Claude Code is the recommended backend, though Aider and Cursor CLI are also supported. Planning is handled by a configurable LLM backend, defaulting to Anthropic's claude-sonnet-4-20250514, with OpenAI models available as an alternative.

The architectural centerpiece is Shard's use of git worktrees for agent isolation. Rather than cloning the repository multiple times or relying on file locking — both of which carry significant overhead or serialization costs — each agent gets its own complete working directory on a dedicated branch, all sharing a single .git folder. <a href="/news/2026-03-14-codelegate-keyboard-driven-agent-orchestrator-tui-for-mac-linux">Codelegate</a> employs a similar isolation strategy. This sidesteps file conflict and race condition problems cleanly, and means four agents can simultaneously edit four different parts of a codebase without coordination overhead. Once agents complete their assigned tasks, Shard's Aggregator stage merges branches in topological order, with automatic resolution of common structural conflicts in files like package.json or requirements.txt.

The five-stage pipeline — Plan, Partition, Dispatch, Aggregate, Self-Heal — closes the loop with a TDD-oriented self-healing mechanism. After merging, Shard runs the configured test suite (pytest is the default, with structured output via pytest-json-report) and maps failures back to the responsible sub-tasks, re-dispatching agents with failure context in a bounded retry loop. Configuration via shard.toml gives operators fine-grained control over concurrency, per-task and global timeouts, retry budgets, and hard cost caps in USD — parallel agent runs can accumulate API spend quickly, and the caps are there to prevent surprises.

Where Shard differs from OpenHands, the more established multi-agent coding project, is in its isolation model. OpenHands runs agents inside sandboxed Docker containers; Shard bets on git worktrees, which require no container runtime and keep the full repository history immediately accessible to each agent. The tradeoff is that worktree isolation is filesystem-level, not process-level — a misbehaving agent can still write outside its assigned scope. Shard is an early-stage solo project, and the README is candid about that. Checkpoint-based resume means interrupted runs can pick up mid-DAG rather than restarting from scratch, which matters once you're running five agents across a 40-task graph and one API call times out.