The contributor problem
You fork an OSS project that uses beads. Every planning bead you create writes to the fork’s.beads/ data, and your fork’s issue database now diverges from
upstream in every PR you open. What you want is to plan freely about the
project without planning in the project.
Routing solves this by detecting your role and redirecting bd create to a
separate planning repository (~/.beads-planning by default) that is never
pushed upstream.
How routing decides
When you runbd create, the target repository is chosen in strict
precedence order:
--repo <path>— explicit override, always winsrouting.mode: auto— route by detected role (maintainer or contributor)routing.default— everything else (defaults to., the current repo)
bd list and bd ready
read from the routed repository, and ID lookups like bd show fall back to
the routed repository when a bead isn’t found locally. Commands that change an
existing bead (bd update, bd close, bd comment, bd unclaim,
bd mol bond and the like) follow every route, contributor, maintainer and
default alike, opening the routed repository for writing so the change commits
there. A routed write never creates the routed repository’s database: if that
repository has not been bootstrapped yet, the write fails until you run
bd bootstrap there. A routed write also refuses a repository whose
.beads/metadata.json is unreadable or names no dolt_database, instead of
guessing which database to write. Through these routes a repository with no
metadata.json at all, such as a planning repository nothing has been created
in yet, opens the one embedded database it holds, or its default database when
it holds none or several; a prefix route in an orchestrator’s routes.jsonl
always needs the target’s dolt_database, for reads as well as writes.
On a proxied-server launcher, bd mol bond looks an operand up in the served
database first and then through its prefix route, so a formula can be bonded
to a molecule that a routed rig holds. Both operands must live in the same
place: the bond is written in the rig’s own database when both are there (or
one is a formula), and in the served database when both are there. A bond
across the served database and a rig, or across two rigs, is refused; run it
from the rig that owns both. A rig that is itself a proxied-server workspace
cannot be opened through a route, so bond in that rig directly.
Looking up a bead in another store by prefix
A workspace can also send lookups to another store by ID prefix, through aroutes.jsonl file in its .beads/ directory. This is how a seat attached
to one store reads a bead that lives in a sibling store on the same server,
such as a rig seat reading the town’s hq- beads:
bd show hq-gea4h run from the rig finds no hq-gea4h in
the rig’s store, follows the route, and reads the bead from the town’s store,
which is opened read-only for the lookup. How the lookup works:
- Only the resolved workspace’s
routes.jsonlis read: the.beads/directory the command runs against, after any.beads/redirectis followed. bd does not search parent directories for routes, and does not discover other databases on a shared Dolt server. - A route’s
prefixmust end in-; an entry without the trailing hyphen matches nothing. When several routes match, the longest prefix wins (hq-cv-overhq-). pathis relative to the directory that contains the resolved.beads/(the rig directory above, so..is the town). The target’s.beads/may itself be a redirect, which is followed.- The target’s
.beads/metadata.jsonmust name itsdolt_database. - A route whose
pathis.names the current store, so it sends the lookup nowhere new. - Routes apply to commands that change an existing bead (
bd update,bd close, …) too, which open the routed store for writing. Adding a route is broader than a shortcut forbd show.
issue_prefix and allowed_prefixes), bd show says
so instead of suggesting the bead never existed:
bd serve over HTTP, prints
the general not-found hint instead.
Role detection
The role that drives auto mode comes from git config —beads.role is the
source of truth:
beads.role is unset, bd prints a warning and falls back to a
deprecated remote-URL heuristic:
SSH does not reliably indicate push access — fork contributors often clone
over SSH. Set
beads.role explicitly and the heuristic (and its warning)
never runs.Setup
Contributors
- Creates the planning repository (
~/.beads-planningby default) as its own git repo with a.beads/directory - Sets
routing.mode: autoandrouting.contributorto the planning repo - Adds the planning repo to
repos.additionalso routed beads stay visible (see hydration) - On forks, points sync at the
upstreamremote sobd dolt pullfetches issue data from the source repo rather than your fork
bd init also detects the fork pattern (an upstream remote that
differs from origin) and applies the same contributor configuration
automatically; pass --role maintainer to opt out.
Teams
Configuration reference
Set these withbd config set <key> <value>; see the
configuration reference for storage locations.
Verify the effective configuration and where each value comes from:
Overriding per bead
--repo bypasses routing entirely for one bead:
Discovered work stays with its parent
A bead created with adiscovered-from dependency inherits its parent’s
source_repo, so work discovered while executing a task stays attributed to
the same repository as that task — regardless of your role:
--repo to override the inheritance.
Multi-repo hydration
Routing writes beads to another repository — which means your current database doesn’t contain them. Hydration imports beads from other repos into your database, each tagged with itssource_repo, so bd list and
bd ready show one unified view.
Configure it by listing the other repos in repos.additional:
bd repo sync reads each additional repo’s .beads/issues.jsonl export and
imports the beads with their original prefixes and source_repo set,
skipping repos whose export hasn’t changed. bd init --contributor wires
hydration up automatically; bd doctor warns when routing targets are
missing from repos.additional.
Once hydrated, beads from other repos are ordinary rows in your database —
filter by provenance or link them with normal dependencies:
bd dep add also accepts external:<project>:<capability> targets —
see bd dep.
One agent, many projects
An AI agent working across several repositories should run a single beads MCP server instance:.beads/embeddeddolt/ by
default; server mode uses .beads/dolt/). Running one MCP instance per
project invites operations landing in the wrong database.
To share one Dolt server across all projects instead of embedded per-project
storage, initialize with bd init --shared-server (or set
BEADS_DOLT_SHARED_SERVER=1): projects share a server at
~/.beads/shared-server/ while staying isolated in per-project databases
named after their issue prefixes. See MCP Server
for installation and client configuration.
Troubleshooting
Beads land in the wrong repository
bd config set beads.role maintainer),
forcing the target for one bead (--repo .), or disabling role detection
entirely (bd config set routing.mode explicit).
Routed beads don’t appear in bd list
The routing target isn’t being hydrated. Add it and sync:bd doctor catches this misconfiguration.
bd show says an ID’s prefix is not among this store’s prefixes
The ID belongs to a store this workspace did not search. Run the command from a workspace attached to the store that issues the prefix, or add a prefix route to this workspace’sroutes.jsonl (see
Looking up a bead in another store by prefix).
The hint is not printed when a route or auto-route did search another store
and missed there too.
Discovered beads appear in the “wrong” repo
Intentional — beads with adiscovered-from dependency inherit the parent’s
source_repo. Override with --repo at creation time.
Planning beads show up in upstream PRs
The planning repo must be a separate git repository, never committed to the fork:Role warning on every bd create
bd warns when it falls back to the URL heuristic. Silence it permanently:
Related pages
- Multi-Repo Migration — full setup walkthroughs for contributor, team, and multi-phase workflows
- Agent Coordination — assigning and claiming work between agents
- Federation — peer-to-peer sharing of beads across repos and organizations
bd init,bd config,bd repo,bd create— command reference