gastownhall/beads · error
no auto-routed store available
Error message
no auto-routed store available
What it means
Inside bd close's routing logic, ensureShared lazily opens an auto-routed shared Dolt store. If the routed store was already attempted once and failed/absent, subsequent calls short-circuit with 'no auto-routed store available'. This prevents repeatedly retrying discovery that already failed.
Source
Thrown at cmd/bd/close.go:718
// no-op for routed-via-shared-handle entries because they don't own the handle.
func resolveCloseTargets(ctx context.Context, localStore storage.DoltStorage, ids []string) ([]*RoutedResult, func(), error) {
results := make([]*RoutedResult, 0, len(ids))
var sharedRouted storage.DoltStorage
var sharedRoutedTried bool
cleanup := func() {
for _, r := range results {
r.Close()
}
if sharedRouted != nil {
_ = sharedRouted.Close()
}
}
ensureShared := func() (storage.DoltStorage, error) {
if sharedRouted != nil {
return sharedRouted, nil
}
if sharedRoutedTried {
return nil, fmt.Errorf("no auto-routed store available")
}
sharedRoutedTried = true
rs, routed, _, err := openRoutedReadStore(ctx, localStore)
if err != nil {
return nil, err
}
if !routed {
return nil, fmt.Errorf("no auto-routed store available")
}
sharedRouted = rs
return rs, nil
}
for _, id := range ids {
// Local first.
if r, err := resolveAndGetFromStore(ctx, localStore, id, false); err == nil {
results = append(results, r)
continue
} else if !isNotFoundErr(err) {View on GitHub (pinned to 71377f2769)
Solutions
- Ensure the repo has a valid routed/shared database configuration (check .beads routing config and `bd dolt` setup).
- Fix the underlying openRoutedReadStore error surfaced earlier (sync/remote availability).
- Close issues one at a time locally if no shared store is intended.
Example fix
// before: no routing configured bd close bd-1 bd-2 # no auto-routed store available // after bd dolt push # or configure shared routing first, then close
Defensive patterns
Strategy: fallback
Validate before calling
bd doctor 2>/dev/null | grep -i rout # or check .beads routing config before batch closes test -f .beads/config.json && jq -e .routed .beads/config.json
Try / catch
if err := runClose(...); err != nil {
if strings.Contains(err.Error(), "no auto-routed store available") {
// close locally one issue at a time, or configure routing and retry
}
} Prevention
- Set up shared routing before team workflows
- Run bd sync/doctor after cloning
- Don't rely on routed lookups in isolated clones
When it happens
Trigger: Closing multiple issues in one invocation where closing the first attempt triggered ensureShared, openRoutedReadStore failed or wasn't routed, and a later issue again needs the shared store — the cached failure is re-reported.
Common situations: Working in a repo without a shared/remote Dolt routing configuration; offline with routing configured but unreachable; .beads routing metadata pointing nowhere.
Related errors
- ErrExec
- database not available: %w
- not using Dolt backend (configured backend %q)
- no storage backend is open
- storage backend does not support backup operations
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/1bf620f15ab57f8a.
Report an issue: GitHub.