{"record":{"id":"1e6940ef1d673be4","repo":"gastownhall/beads","slug":"s-is-not-an-epic-or-swarm-molecule-type-s","errorCode":null,"errorMessage":"'%s' is not an epic or swarm molecule (type: %s)","messagePattern":"'(.+?)' is not an epic or swarm molecule \\(type: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/swarm_proxied_server.go","lineNumber":149,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"failed to get swarm dependencies: %v\", err)\n\t\t\t}\n\t\t\tfor _, dep := range deps {\n\t\t\t\tif dep.Type == types.DepRelatesTo {\n\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","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/swarm_proxied_server.go#L131-L167","documentation":"Thrown when the requested issueID is neither an epic nor a molecule — the swarm command only operates on epics and swarm molecules. The message includes the actual IssueType for diagnosis.","triggerScenarios":"Passing a plain task/bug/feature ID to the swarm status command; passing an ID that exists but has IssueType set to something other than epic or molecule (e.g. a chore or a raw task).","commonSituations":"Typo or copy/paste of the wrong issue ID into `bd swarm <id>`; assuming any issue works with the swarm command; legacy issues created before molecule typing existed.","solutions":["Confirm the issue type with `bd show <issueID>` and use an epic or swarm molecule ID instead","If it should be an epic, set its type: `bd update <issueID> --type epic`","For molecule types, recreate with `bd mol create` so IssueType/MolType are set correctly"],"exampleFix":"// before\nbd swarm bd-456        // bd-456 is a plain task\n// after\nbd swarm bd-100        // bd-100 is the epic\nbd swarm bd-456-m      // or its swarm molecule","handlingStrategy":"validation","validationCode":"// check the issue type before invoking the swarm command\nif issue.IssueType != \"epic\" && issue.IssueType != \"molecule\" {\n    return fmt.Errorf(\"%s is a %s; swarm requires an epic or swarm molecule\", issueID, issue.IssueType)\n}","typeGuard":"func isSwarmTarget(issue *types.Issue) bool {\n    return issue.IssueType == types.TypeEpic || issue.IssueType == \"molecule\"\n}","tryCatchPattern":null,"preventionTips":["Verify with `bd show <id>` before passing IDs to `bd swarm`","Only convert types via `bd update --type` and understand the consequences","Use tab-completion / `bd ready` output rather than hand-typed IDs"],"tags":["go","swarm","cli-usage"],"backgroundTag":"wrong-issue-type","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}