gastownhall/beads · error
failed to get swarm dependencies: %v
Error message
failed to get swarm dependencies: %v
What it means
Thrown by the swarm command's epic-resolution path when reading the dependency records of a swarm molecule fails. The wrapper calls r.GetDependencyRecords(ctx, issue.ID); any storage/DB error surfaces wrapped here. It is a passthrough wrapper — the underlying cause is the %v payload.
Source
Thrown at cmd/bd/swarm_proxied_server.go:132
issueID, err := utils.ResolvePartialID(ctx, r, args[0])
if err != nil {
return nil, fmt.Errorf("issue '%s' not found: %v", args[0], err)
}
issue, err := uw.IssueUseCase().GetIssue(ctx, issueID)
if gateProxiedNotFound(err) || (err == nil && issue == nil) {
return nil, fmt.Errorf("issue '%s' not found", issueID)
}
if err != nil {
return nil, fmt.Errorf("failed to get issue: %v", err)
}
var epic *types.Issue
if issue.IssueType == "molecule" && issue.MolType == types.MolTypeSwarm {
deps, err := r.GetDependencyRecords(ctx, issue.ID)
if err != nil {
return nil, fmt.Errorf("failed to get swarm dependencies: %v", err)
}
for _, dep := range deps {
if dep.Type == types.DepRelatesTo {
epic, err = uw.IssueUseCase().GetIssue(ctx, dep.DependsOnID)
if err != nil {
return nil, fmt.Errorf("failed to get linked epic: %v", err)
}
break
}
}
if epic == nil {
return nil, fmt.Errorf("swarm molecule '%s' has no linked epic", issueID)
}
} else if issue.IssueType == types.TypeEpic || issue.IssueType == "molecule" {
epic = issue
} else {
return nil, fmt.Errorf("'%s' is not an epic or swarm molecule (type: %s)", issueID, issue.IssueType)
}View on GitHub (pinned to 71377f2769)
Solutions
- Inspect the wrapped %v cause in the message and fix the underlying storage error first
- Run `bd doctor` to check the local Dolt database health
- Re-open the workspace / retry after the DB lock or transient I/O error clears
- If the DB is corrupted, restore from .beads/issues.jsonl export or git history
Defensive patterns
Strategy: retry
Validate before calling
// verify the DB is reachable before invoking the swarm command
if err := db.Ping(); err != nil {
return fmt.Errorf("beads DB unavailable: %w", err)
} Try / catch
deps, err := getSwarmDeps(ctx, issueID)
if err != nil {
var transient *StorageUnavailableError
if errors.As(err, &transient) {
// retry with backoff
}
return err
} Prevention
- Run `bd doctor` before long swarm sessions
- Avoid deleting or locking .beads/ while bd runs
- Keep bd and Dolt versions aligned
When it happens
Trigger: Calling the swarm command against an issue whose IssueType=="molecule" && MolType==MolTypeSwarm while the dependency-row query fails: database unavailable, corrupted beads DB, closed/stale storage handle, or context cancellation mid-query.
Common situations: Running `bd swarm` against a repo where .beads/Dolt DB is locked by another process or partially synced; disk/network failure opening the embedded database; querying a molecule in a workspace where the DB was deleted or corrupted.
Related errors
- failed to get swarm status: %v
- no store is open for this workspace
- not found
- db: ChildCounterSQLRepository.NextChildID: parentID must not
- db: DependencySQLRepository.Insert: dep must not be nil
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/e388023d30c3e2fd.
Report an issue: GitHub.