Skip to main content
Beads includes a comprehensive dependency system for ordering work, tracking relationships, and managing external conditions through gates.

Adding Dependencies

Create a dependency relationship between two issues:
When issue-1 is open, issue-2 won’t appear in bd ready. Once issue-1 closes, issue-2 unblocks automatically.

Removing Dependencies

Dependency Types

Dependencies have a type that determines whether they block work:

Blocking Types

These affect what appears in bd ready:

Non-Blocking Types

These are graph annotations only (informational):

Finding Ready Work

bd ready shows issues with no open blocking dependencies:
An issue is ready when ALL of its blocking dependencies are closed.

Example Output

Viewing Blocked Issues

See what’s blocked and why:
Shows every blocked issue and what blocks it. Use after closing an issue to see what just unblocked.

Example Output

Visualizing Dependencies

Dependency Tree

View hierarchical dependency structure:

Dependency Graph

Visualize the entire dependency graph:
The graph organizes issues into layers:
  • Layer 0: No dependencies (can start immediately)
  • Layer 1: Depends on layer 0
  • Higher layers: Depend on lower layers
  • Same layer: Can run in parallel

Dependency List

Simple text list of dependencies:

Cycle Detection

Beads prevents circular dependencies:
Beads rejects cycles at write time — bd dep add checks for cycles before committing.

Cross-Repo Dependencies

Reference issues in other beads rigs:
External dependencies always block. When the remote issue closes, bd ready reflects the change (checked at query time).

Gates

Gates are special issues that block dependent work until an external condition is met. They bridge the gap between beads (which tracks work) and external systems (which track code, CI, or time).

The Problem Gates Solve

When you use Dolt, issue state is decoupled from code state. Closing a beads issue means “work is done” but the code may still be on a feature branch: With file-based storage (JSONL), issue updates land atomically with code. With Dolt, they don’t. Gates solve this by making the dependency wait for the external condition — not just the beads issue status.

Gate Types

Creating Gates

Wiring Gates

A gate is an issue. Wire it into the dependency graph:

Checking Gates

bd gate check evaluates all open gates and closes resolved ones:
Escalation marks gates whose conditions failed (e.g., PR closed without merge, CI run failed) so they surface for attention.

Manual Resolution

For human gates or overrides:

Automating Gate Checks

Run bd gate check periodically:
  • CI step: Add to your GitHub Actions workflow
  • Cron: */5 * * * * cd /path/to/repo && bd gate check
  • Agent hook: Run at session start or after PR operations

Common Patterns

PR Merge Gate

Agent finishes work, opens PR, creates a gate so follow-up work waits for merge:

Epic with Ordered Phases

Parallel Work Streams

Best Practices

Only use blocks when work truly cannot proceed. Overuse creates unnecessary bottlenecks.
After closing an issue, run bd blocked to see what just unblocked.
Don’t close issues before code is merged. Use gates to wait for PR merge or CI success.
Run bd graph --all before major dependency changes to understand impact.

Architecture

Understand the two-layer data model

Workflows

Learn about contributor, stealth, and maintainer modes

CLI Reference

Complete command documentation

Gates Deep Dive

Advanced gate patterns and automation