{"record":{"id":"b62f2f35dc3c490b","repo":"gastownhall/beads","slug":"failed-to-get-swarm-status-v","errorCode":null,"errorMessage":"failed to get swarm status: %v","messagePattern":"failed to get swarm status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/swarm_proxied_server.go","lineNumber":154,"sourceCode":"\t\t\t\t\tepic, err = uw.IssueUseCase().GetIssue(ctx, dep.DependsOnID)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"failed to get linked epic: %v\", err)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif epic == nil {\n\t\t\t\treturn nil, fmt.Errorf(\"swarm molecule '%s' has no linked epic\", issueID)\n\t\t\t}\n\t\t} else if issue.IssueType == types.TypeEpic || issue.IssueType == \"molecule\" {\n\t\t\tepic = issue\n\t\t} else {\n\t\t\treturn nil, fmt.Errorf(\"'%s' is not an epic or swarm molecule (type: %s)\", issueID, issue.IssueType)\n\t\t}\n\n\t\tstatus, err := getSwarmStatus(ctx, r, epic)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to get swarm status: %v\", err)\n\t\t}\n\t\treturn status, nil\n\t})\n\tif err != nil {\n\t\treturn HandleErrorRespectJSON(\"%v\", err)\n\t}\n\n\tif jsonOutput {\n\t\treturn outputJSON(status)\n\t}\n\n\trenderSwarmStatus(status)\n\treturn nil\n}\n","sourceCodeStart":136,"sourceCodeEnd":169,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/swarm_proxied_server.go#L136-L169","documentation":"Wrapper around getSwarmStatus failures once the epic has been resolved. Any error computing the swarm's aggregate status (dependent-issue queries, per-crew state reads) is wrapped here and then printed via HandleErrorRespectJSON.","triggerScenarios":"getSwarmStatus(ctx, r, epic) fails because dependency/state queries for the epic's children error out — DB unavailability, context cancellation, or a corrupted dependency graph beneath a valid epic.","commonSituations":"Large epics whose child queries time out; embedded Dolt DB locked by a concurrent `bd dolt` operation; running the swarm command while a sync merge is mid-flight.","solutions":["Read the wrapped %v cause and fix the underlying storage error","Retry after concurrent bd/dolt operations finish","Run `bd doctor` to validate the local database","Reduce fan-out by splitting an oversized epic into smaller swarms"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// ensure no conflicting bd/dolt process is running and DB is healthy\nbd doctor\n","typeGuard":null,"tryCatchPattern":"status, err := getSwarmStatus(ctx, r, epic)\nif err != nil {\n    if isTransientStorageErr(err) {\n        // back off and retry once the concurrent operation completes\n    }\n    return err\n}","preventionTips":["Don't run `bd sync`/`bd dolt` concurrently with swarm commands on the same DB","Run `bd doctor` if status queries start failing","Split oversized epics to keep status queries bounded"],"tags":["go","swarm","storage"],"backgroundTag":"swarm-status-computation-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}