gastownhall/beads · error
error finding descendants: %v
Error message
error finding descendants: %v
What it means
After verifying the parent exists, getHierarchicalChildren calls findAllDescendants to recursively collect all children/descendants. If that recursive traversal fails (storage error, query failure), the underlying error is wrapped with this message.
Source
Thrown at cmd/bd/list_show_filter_modes.go:71
var err error
parentIssue, err = s.GetIssue(ctx, parentID)
return err
})
if err != nil {
return nil, fmt.Errorf("error checking parent issue: %v", err)
}
if parentIssue == nil {
return nil, fmt.Errorf("parent issue '%s' not found", parentID)
}
// Use recursive search to find all descendants using the same logic as --parent filter.
// The parent itself is NOT included in the result set — only actual children and
// their descendants. This matches the behavior of --json and --flat (GH#3349).
allDescendants := make(map[string]*types.Issue)
err = findAllDescendants(ctx, store, dbPath, parentID, baseFilter, allDescendants)
if err != nil {
return nil, fmt.Errorf("error finding descendants: %v", err)
}
if len(allDescendants) == 0 {
return nil, nil
}
// Include the parent as the tree root only when descendants exist,
// so the tree renderer can draw the hierarchy with the parent at the top.
allDescendants[parentID] = parentIssue
treeIssues := make([]*types.Issue, 0, len(allDescendants))
for _, issue := range allDescendants {
treeIssues = append(treeIssues, issue)
}
return treeIssues, nil
}
View on GitHub (pinned to 71377f2769)
Solutions
- Re-run the command — transient storage errors often clear on retry
- Check the wrapped error text for the underlying storage cause
- Run `bd doctor` to validate the local database
- Restore/repair the beads database if corruption is reported
Defensive patterns
Strategy: try-catch
Try / catch
out, err := exec.Command("bd", "list", "--parent", parentID).CombinedOutput()
if err != nil {
if strings.Contains(string(out), "error finding descendants") {
// retry or run `bd doctor` to check storage health
}
return err
} Prevention
- Run `bd doctor` periodically to catch storage issues early
- Keep hierarchies shallow or paginate large graphs
- Retry transient storage failures once before escalating
When it happens
Trigger: Any error surfaced from findAllDescendants while expanding `bd list --parent <id>` or the watched-issues hierarchy: database query failure, malformed baseFilter, storage-layer connectivity problems, or a corrupted dependency graph row.
Common situations: Embedded Dolt database locked or corrupted; I/O errors reading the store; failure happens only for large/deep hierarchies when a query times out; regression after a schema change.
Related errors
- resolving ID %s: %w
- failed to check parent issue: %w
- canonical issue not found: %s
- failed to add supersede link: %w
- batch create: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/a2f47fb7f2b0b666.
Report an issue: GitHub.