Skip to main content
Beads includes a full dependency system for ordering work and a gate system for bridging external conditions (PR merges, CI runs, timers) into the dependency graph.

Adding Dependencies

When issue-1 is open, issue-2 won’t appear in bd ready. Once issue-1 is closed, issue-2 unblocks automatically. To add dependencies while creating an issue, bd create --deps and the ### Dependencies (or ### Deps) section of a bd create --file batch take the same entries:
  • a bare id, depends-on:id or blocked-by:id: the new issue depends on id
  • blocks:id: id depends on the new issue
  • any other type from the table below, written type:id
In a file, entries are separated by commas, spaces or newlines, so write no space after the colon:

Removing Dependencies

Dependency Types

Dependencies have a type that determines whether they block work. Blocking types (affect bd ready): Non-blocking types (graph annotations only): Specify with --type:

Finding Ready Work

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

Viewing Blocked Issues

Shows every blocked issue and what blocks it. Use after closing an issue to see what just unblocked.

Visualizing Dependencies

Dependency Tree

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

Cycle Detection

Beads also rejects cycles at write time — bd dep add checks for cycles before committing.

Cross-Repo Dependencies

Dependencies can reference issues in other beads rigs:
Configure the project path under external_projects, then label a target project issue provides:checkout-ready. The dependency blocks until an issue with that label is closed. bd ready, bd blocked, and bd dep tree resolve the capability at query time; an unconfigured or unavailable project remains blocking. A bare ID whose prefix names another rig (bd dep add bd-abc gt-123) is stored even when bd cannot find it in this database or through routes. bd dep add then warns on stderr that the ID was not found, or says why it could not be verified (the lookup itself failed, or the routed rig matches it only to other IDs), and prints the bd dep remove command that deletes the edge if the ID was a typo (--quiet silences the warning). Prefix routing cannot open a rig in proxied-server mode yet (#5861), so bd cannot check an ID routed to such a rig and stores it without a warning. bd doctor cannot check such an edge either: it counts it as a cross-repository edge not verifiable here instead of reporting it as an orphaned dependency, and bd doctor --fix keeps it. An edge whose target is under this database’s own issue_prefix or allowed_prefixes and is gone is still reported and removed.

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 (server or embedded), 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, waiting for PR review:
With file-based storage (JSONL), issue updates land atomically with code in the same commit. 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 into Dependencies

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

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.

Listing and Inspecting Gates

Manual Resolution

For human gates or overrides:

Discovering CI Run IDs

When you create a gh:run gate before the run starts, bd gate discover matches gates to GitHub Actions runs using heuristics (commit SHA, branch, timing):

Automating Gate Checks

Run bd gate check periodically to auto-close resolved gates:
  • 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

Recipes

PR Merge Gate (Common)

Agent A finishes work, opens PR, creates a gate so Agent B waits for merge:

CI Gate Before Deploy

Epic with Ordered Phases

See Also