The Problem
Traditional sequential IDs (#1, #2, #3) break when:
- Multiple agents create issues simultaneously
- Different branches have independent numbering
- Forks diverge and later merge
The Solution
Beads uses hash-based IDs:- Globally unique (content-based hash)
- No coordination needed between creators
- Merge-friendly across branches
- Predictable length (configurable)
How Hashes Work
IDs are generated from:- Issue title
- Creation timestamp
- Random salt
Hierarchical IDs
For epics and subtasks:- Clear parent-child relationship
- No namespace collision (parent hash is unique)
- Up to 3 levels of nesting
ID Configuration
Configure ID prefix and length:Collision Handling
While rare, collisions are handled automatically:- On import, if hash collision detected
- Beads appends disambiguator
- Both issues preserved
Working with IDs
bd comment and bd delete require the full id
Every command above resolves an abbreviation the same way, with two deliberate
exceptions: bd comment <id> "text" (and its bd comments add twin) and
bd delete accept only a full, exact id, never an abbreviation. This is a
policy trade for an agent fleet, not an oversight: an abbreviation that happens
to be a leading-prefix match for the wrong issue would land the write there
instead of erroring. A comment write has no confirmation step to catch it, and
a deletion cannot be undone.
For bd delete the wrong match is easy to reach by accident. The id of an
issue that is already gone is still the start of other ids — its child’s
(bd-a3f8e9.1 after bd-a3f8e9 is deleted), or a longer hash that happens to
begin with it — so retrying a delete or re-running a --from-file list would
otherwise reach an issue nobody named. The refusal says delete needs the full
id and names the ids the input matches.
Reads and every other mutation (show, close, update, …) keep accepting
abbreviations as documented above.
list, add, rm, delete) as bd comment’s id
positional is refused the same way, for a related reason: bd comment list "text" almost always means the caller confused the singular shorthand with the
plural bd comments list/bd comments add <id> "text", not that an issue is
literally named list.
Migration from Sequential IDs
If migrating from a system with sequential IDs:Best Practices
- Use short references -
bd-a1b2is usually unique enough, except onbd commentwrites andbd delete, which require the full id (see Working with IDs above) - Use
--jsonfor scripts - Parse full ID programmatically - Reference by hash in commits -
Fixed bd-a1b2in commit messages - Let hierarchies form naturally - Create epics, add children as needed