gastownhall/beads · error

issue %s not found

Error message

issue %s not found

What it means

Error "issue %s not found" thrown in gastownhall/beads.

Source

Thrown at cmd/bd/comments_proxied_server.go:157

	if err != nil {
		return nil, nil, fmt.Errorf("adding comment: %w", err)
	}
	return result.Comment, issue, nil
}

// resolveCommentTargetProxied resolves the anchor and applies the CLI's own
// pre-flight policy. It reads in a unit of work of its own and writes nothing,
// so the role's request stays the whole of the transaction.
func resolveCommentTargetProxied(ctx context.Context, id string) (*types.Issue, error) {
	uw, err := proxiedOpenReadUOW(ctx)
	if err != nil {
		return nil, err
	}
	defer uw.Close(ctx)

	issue, _, err := workapi.GetIssueOrWisp(ctx, workapi.NewUOWDetailSource(uw), id)
	if errors.Is(err, storage.ErrNotFound) {
		return nil, fmt.Errorf("issue %s not found", id)
	}
	if err != nil {
		return nil, fmt.Errorf("resolving %s: %w", id, err)
	}
	if err := validateIssueUpdatable(id, issue); err != nil {
		return nil, err
	}
	return issue, nil
}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Verify the issue ID with bd show and correct it if wrong
  2. Create the issue before adding comments to it
Defensive patterns

Strategy: validation

Validate before calling

bd show "$ID" >/dev/null 2>&1 || { echo "issue $ID does not exist"; exit 1; }

Try / catch

out=$(bd comment "$ID" ... 2>&1) || {
  case "$out" in *"not found"*) echo "bad ID: $ID";; esac
}

Prevention

When it happens

Trigger: Thrown at cmd/bd/comments_proxied_server.go:157 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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