gastownhall/beads · error

title does not support %s operator

Error message

title does not support %s operator

What it means

Title comparisons support contains (via substring match on the lowercased title) and NotEquals (negated contains). Any other operator falls through to the default branch of buildTitlePredicate and returns this error. Title matching is substring-based, not exact.

Source

Thrown at internal/query/evaluator.go:861

		}, nil
	default:
		return nil, fmt.Errorf("label does not support %s operator", comp.Op.String())
	}
}

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

func (e *Evaluator) buildDescriptionPredicate(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.Description == "" }, nil
		}
		return func(i *types.Issue) bool {
			return strings.Contains(strings.ToLower(i.Description), strings.ToLower(value))
		}, nil
	case OpNotEquals:
		if isNone {
			return func(i *types.Issue) bool { return i.Description != "" }, nil
		}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Use the contains operator (the one handled for title, typically the default/contains form) for substring search.
  2. Use `!=` to exclude titles containing the text.
  3. For exact-title lookup, prefer `bd show <id>` or filter results in a script.

Example fix

// before
bd list --query "title >= fix"
// after
bd list --query "title contains fix"
Defensive patterns

Strategy: validation

Validate before calling

// Go: title supports contains and != only
if !isContainsOp(comp.Op) && comp.Op != query.OpNotEquals {
    return fmt.Errorf("title supports only contains and !=, got %s", comp.Op)
}

Try / catch

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

Prevention

When it happens

Trigger: A query filter like `title = "exact"` if equality is not in the handled cases, or `title >= foo` — an operator outside the contains/not-equals set.

Common situations: Assuming exact-match semantics for titles; reusing field=value patterns that work elsewhere; users familiar with SQL's = on text columns.

Related errors


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