gastownhall/beads · error
no storage available
Error message
no storage available
What it means
withStorage is a helper that obtains a store (e.g. an open read-only store or the active one) and runs a callback with it; every fallback path failed to produce a store, so it returns the plain 'no storage available' error. Commands like list/where rely on it to read issues.
Source
Thrown at cmd/bd/list.go:34
// storageExecutor handles operations that need a store connection
type storageExecutor func(store storage.DoltStorage) error
// withStorage executes an operation with either the direct store or a read-only store
func withStorage(ctx context.Context, store storage.DoltStorage, dbPath string, fn storageExecutor) error {
if store != nil {
return fn(store)
} else if dbPath != "" {
// Open read-only connection using repo metadata when available so
// helper paths keep the correct Dolt database and server endpoint.
roStore, err := openReadOnlyStoreForDBPath(ctx, dbPath)
if err != nil {
return err
}
defer func() { _ = roStore.Close() }() // Best effort cleanup
return fn(roStore)
}
return fmt.Errorf("no storage available")
}
// issueSnapshot builds a comparable string from issue IDs, statuses, and
// update times so we can detect when the result set has changed.
func issueSnapshot(issues []*types.Issue) string {
var b strings.Builder
for _, issue := range issues {
fmt.Fprintf(&b, "%s:%s:%d;", issue.ID, issue.Status, issue.UpdatedAt.UnixNano())
}
return b.String()
}
// skipLabelsIssueView wraps IssueWithCounts so the JSON encoder always emits
// `labels: []` regardless of the omitempty tag on Issue.Labels. AD-02 contract:
// with --skip-labels, every issue's labels field is present and empty.
type skipLabelsIssueView struct {
*types.IssueWithCounts
Labels []string `json:"labels"`View on GitHub (pinned to 71377f2769)
Solutions
- Run `bd init` in the project or cd into the repository containing the .beads database
- Ensure the bd daemon is running (`bd daemon` status; restart if needed) and BD_DAEMON points at it
- Check file permissions on the .beads directory and database files
Example fix
// before $ bd list --json Error: no storage available // after $ bd init $ bd list --json
Defensive patterns
Strategy: validation
Validate before calling
if _, err := os.Stat(filepath.Join(".beads")); err != nil {
return fmt.Errorf("no bd storage here; run 'bd init' first")
} Try / catch
out, err := runList(ctx)
if err != nil && strings.Contains(err.Error(), "no storage available") {
// fallback: ensure daemon up, or run 'bd init' then retry
} Prevention
- Initialize bd (`bd init`) before running read commands in a new repo
- Check daemon connectivity when using daemon mode
- Verify .beads directory exists and is readable by the bd process
When it happens
Trigger: Running a command that needs storage (getHierarchicalChildren, findAllDescendants, the `where` command path) when no embedded store can be opened, no daemon store is connected, and no ro-store could be created.
Common situations: Running bd outside an initialized repo (no .beads database); daemon not running; BD_DAEMON/whoami misconfiguration; database file missing or permissions deny opening it.
Related errors
- database not available: %w
- ErrExec
- database %q not found on Dolt server at %s:%d
- database not available: %w
- not using Dolt backend (configured backend %q)
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/0816ca229fc4082b.
Report an issue: GitHub.