gastownhall/beads · error

assignee does not support %s operator

Error message

assignee does not support %s operator

What it means

The `assignee` field only supports Equals and NotEquals. buildAssigneePredicate handles empty/none/null semantics specially (matching unassigned issues), but any other operator falls to the default branch and returns this error.

Source

Thrown at internal/query/evaluator.go:800

	}
}

func (e *Evaluator) buildAssigneePredicate(comp *ComparisonNode) (func(*types.Issue) bool, error) {
	value := comp.Value
	isNone := value == "" || strings.ToLower(value) == "none" || strings.ToLower(value) == "null"
	switch comp.Op {
	case OpEquals:
		if isNone {
			return func(i *types.Issue) bool { return i.Assignee == "" }, nil
		}
		return func(i *types.Issue) bool { return strings.EqualFold(i.Assignee, value) }, nil
	case OpNotEquals:
		if isNone {
			return func(i *types.Issue) bool { return i.Assignee != "" }, nil
		}
		return func(i *types.Issue) bool { return !strings.EqualFold(i.Assignee, value) }, nil
	default:
		return nil, fmt.Errorf("assignee does not support %s operator", comp.Op.String())
	}
}

func (e *Evaluator) buildOwnerPredicate(comp *ComparisonNode) (func(*types.Issue) bool, error) {
	value := comp.Value
	switch comp.Op {
	case OpEquals:
		return func(i *types.Issue) bool { return strings.EqualFold(i.Owner, value) }, nil
	case OpNotEquals:
		return func(i *types.Issue) bool { return !strings.EqualFold(i.Owner, value) }, nil
	default:
		return nil, fmt.Errorf("owner does not support %s operator", comp.Op.String())
	}
}

func (e *Evaluator) buildLabelPredicate(comp *ComparisonNode) (func(*types.Issue) bool, error) {
	value := comp.Value
	isNone := value == "" || strings.ToLower(value) == "none" || strings.ToLower(value) == "null"

View on GitHub (pinned to 71377f2769)

Solutions

  1. Use the exact name with = or != : `assignee = alice`.
  2. To find unassigned issues, use `assignee = none` (empty, "none", or "null" all work).
  3. If unsure of the exact name, list issues and inspect the assignee field first.

Example fix

// before
bd list --query "assignee ~ ali"
// after
bd list --query "assignee = alice"
Defensive patterns

Strategy: validation

Validate before calling

// Go: assignee supports only = and != (incl. none)
if comp.Op != query.OpEquals && comp.Op != query.OpNotEquals {
    return fmt.Errorf("assignee supports only = and !=, got %s", comp.Op)
}

Try / catch

// Go
pred, err := e.buildComparisonPredicate(node)
if err != nil {
    return fmt.Errorf("assignee filter invalid: %w", err)
}

Prevention

When it happens

Trigger: A query filter like `assignee ~ alice` or `assignee > bob` — comparison on assignee with any operator besides = and !=. Note `assignee = none` and `assignee != none` are valid for unassigned/assigned.

Common situations: Trying substring/contains matching on assignee names; assuming ordering over usernames; forgetting that partial-name matching is not supported and the full (case-insensitive) name is required.

Related errors


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