gastownhall/beads · error

resolving parent %q: not found

Error message

resolving parent %q: not found

What it means

In the proxied-server label path, after GetIssueOrWisp returns storage.ErrNotFound the error is normalized to `resolving parent %q: not found`, meaning the parent issue ID supplied to the label command does not exist (or is not visible through the server).

Source

Thrown at cmd/bd/label_proxied_server.go:154

	label := strings.TrimSpace(args[1])
	if label == "" {
		return HandleErrorRespectJSON("label cannot be empty")
	}
	if strings.HasPrefix(label, "provides:") {
		return HandleErrorRespectJSON("'provides:' labels are reserved for cross-project capabilities. Hint: use 'bd ship %s' instead", strings.TrimPrefix(label, "provides:"))
	}
	if uowProvider == nil {
		return HandleError("proxied-server UOW provider not initialized")
	}

	var (
		children []*types.Issue
		parentID string
	)
	err := uow.RunTx(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (string, error) {
		parent, _, rerr := workapi.GetIssueOrWisp(ctx, workapi.NewUOWDetailSource(uw), args[0])
		if errors.Is(rerr, storage.ErrNotFound) {
			return "", fmt.Errorf("resolving parent %q: not found", args[0])
		}
		if rerr != nil {
			return "", fmt.Errorf("resolving parent %q: %w", args[0], rerr)
		}
		parentID = parent.ID

		page, err := uw.IssueUseCase().SearchIssues(ctx, "", types.IssueFilter{ParentID: &parentID})
		if err != nil {
			return "", fmt.Errorf("searching children of %s: %w", parentID, err)
		}
		children = page.Items
		if len(children) == 0 {
			return "", nil
		}
		// THE ONE SURVIVING WISP SWITCH, and it is named rather than hidden.
		// This is the same four-way shape ga-26w10 deleted from `bd label` and
		// ga-2ltro.12 deleted from `bd tag`, `bd set-state` and the molecule
		// port — the branch a front door can get backwards and put a wisp's

View on GitHub (pinned to 71377f2769)

Solutions

  1. Verify the parent exists: bd show <parent-id> (or bd list).
  2. Correct the ID and retry the label command.
  3. Confirm the CLI is connected to the server/database that actually contains the issue.

Example fix

// before
bd label add bd-999 mylabel   // bd-999 not found
// after
bd label add bd-123 mylabel   // verified to exist
Defensive patterns

Strategy: validation

Validate before calling

bd show "$PARENT_ID" >/dev/null 2>&1 || { echo "parent $PARENT_ID not found" >&2; exit 1; }

Try / catch

out=$(bd label add "$PARENT_ID" "$LABEL" 2>&1) || {
  case "$out" in *": not found"*) echo "verify id: $PARENT_ID" >&2;; *) echo "$out" >&2;; esac
  exit 1
}

Prevention

When it happens

Trigger: `bd label <sub> <parent-id> ...` against a proxied server where args[0] matches no issue: mistyped ID, issue deleted, or the wisp/issue is not visible to the current connection.

Common situations: Stale IDs cached in scripts after an issue was deleted; pointing at the wrong database via server config; case/prefix mistakes in the ID.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/1deb2a920c5f870e. Report an issue: GitHub.