Skip to main content
Advanced beads functionality.

Issue Rename

Rename issues while preserving references:
Updates:
  • All dependencies pointing to old ID
  • All references in other issues
  • Comments and descriptions

Prefix Rename

Change the issue prefix for every issue in the database — for example, shortening knowledge-work- to kw-:
The rename updates all issue IDs and all text references across all fields. Prefixes are lowercase letters, numbers, and hyphens, must start with a letter, and must end with a hyphen. If a corrupted database contains issues with multiple prefixes, bd rename-prefix <prefix> --repair consolidates them: each off-prefix issue keeps its suffix under the new prefix (cre-db-c2a becomes kb-c2a) when that destination is free, and a family whose destination is taken — by a live issue, a retired id, or another family in the same repair — moves whole to a generated id, dotted child paths intact, with every such collision reported. Run it with --dry-run --json first to preview the complete rename list and every collision before anything is written. A repair rewrites text references inside the renamed issues only; issues already on the target prefix keep their text. Dependencies follow the renames: an edge between two prefixes is re-pointed by removing and re-adding it, so it records the repair’s actor and time, and one that storage refuses to re-add is left as it was and reported. To change only the prefix new issues mint, leaving existing IDs alone, use bd rename-prefix <prefix> --mint-only. A dependency between an old-prefix and a new-prefix issue then does not block: storage keeps an edge between two prefixes as a reference to another repository, so bd ready lists the dependent. A later --repair consolidates the prefixes and re-points those dependencies. See bd rename-prefix.

Duplicate Detection and Merge

Find issues with identical content (title, description, design, acceptance criteria) and consolidate them:
Issues are grouped by content hash, and only when their statuses match (open with open, closed with closed). The merge target is the most-referenced issue in each group, falling back to the smallest ID. For each group, --auto-merge:
  • Re-parents children of the duplicates onto the target
  • Closes the duplicates with reason Duplicate of <target>
  • Links each duplicate to the target with a related dependency
To mark a single known duplicate manually:
Closing is permanent, but Dolt version history preserves the original state. Verify results with bd show bd-41 and bd dep tree bd-41.

Database Compaction

Reduce database size by compacting old issues:
When to compact:
  • Database > 10MB with old closed issues
  • After major milestones
  • Before archiving project phase

Restore from History

Recover the pre-compaction content of a compacted issue:
If no archived snapshot exists, bd restore falls back to a best-effort reconstruction from Dolt version history, which can only be displayed, not applied.

Database Inspection

bd sql requires Dolt server mode (bd dolt start, see Performance Tuning below); it is not available against the default embedded-mode database.

Database Redirects

Multiple git clones can share one beads database — useful when several agents or checkout directories work the same issues. Create a .beads/redirect file in the secondary clone containing a single path (relative or absolute) to the target .beads directory:
Check which database is actually in use:
Limitations and guidance:
  • Redirect chains are not followed — only a single level works, so a redirect must point directly at the real .beads directory.
  • The target directory must exist and contain a valid database.
  • Give separate projects and long-lived forks their own databases instead of redirects.
  • Git worktrees don’t need redirects — linked worktrees discover the repository’s .beads workspace automatically. See Git Worktrees.

Extensible Database

For Dolt-backed projects, keep extension state outside the beads database and connect it to beads through stable CLI surfaces:
Custom tables through direct storage access are a legacy SQLite-only pattern. See the bd-example-extension-go example only if you are maintaining a SQLite-backed extension.

Audit Data

Beads records issue lifecycle events in the database for audit and recovery workflows. This is the human-facing history — for the machine-facing feed of committed mutations, see the Events Journal. Inspect current issue state through JSON output, or query the audit tables directly when needed:
Events:
  • issue.created
  • issue.updated
  • issue.closed
  • dependency.added
  • sync.completed

Batch Operations

Create Multiple

Bootstrap a new database from a JSONL export:
Importing records whose IDs already exist updates those issues in place — hash IDs are content-derived and stable, so a matching ID is an update, not a collision.

Update Multiple

Close Multiple

Integration Access

Use the CLI as the supported integration boundary:
The storage packages under internal/ are not a public Go API. The MCP server is a stateless adapter over the same boundary: it translates MCP calls into bd CLI invocations and routes each call to the correct .beads workspace based on the working directory. It never caches or stores issue data itself.

Performance Tuning

Large Databases

Many Concurrent Agents

Beads uses Dolt server mode to handle concurrent access from multiple agents. The server manages transaction isolation automatically.

CI/CD Optimization

In CI/CD environments, beads uses embedded mode by default (no server required):