gastownhall/beads · error
ambiguous ID: %s matches %d issues
Error message
ambiguous ID: %s matches %d issues
What it means
resolvePartialIDDirect resolves a partial wisp ID by prefix search. If the prefix matches more than one issue, bd refuses to guess and reports the match count so the caller can supply a longer, unambiguous prefix.
Source
Thrown at cmd/bd/wisp.go:383
// resolvePartialIDDirect resolves a partial ID directly from store
func resolvePartialIDDirect(ctx context.Context, partial string) (string, error) {
// Try direct lookup first
if issue, err := store.GetIssue(ctx, partial); err == nil {
return issue.ID, nil
}
// Search by prefix
issues, err := store.SearchIssues(ctx, "", types.IssueFilter{
IDs: []string{partial + "*"},
})
if err != nil {
return "", err
}
if len(issues) == 1 {
return issues[0].ID, nil
}
if len(issues) > 1 {
return "", fmt.Errorf("ambiguous ID: %s matches %d issues", partial, len(issues))
}
return "", fmt.Errorf("not found: %s", partial)
}
var wispListCmd = &cobra.Command{
Use: "list",
Short: "List all wisps in current context",
Long: `List all wisps (ephemeral molecules) in the current context.
Wisps are issues with Ephemeral=true in the main database. They are stored
locally but not synced via git.
The list shows:
- ID: Issue ID of the wisp
- Title: Wisp title
- Status: Current status (open, in_progress, closed)
- Started: When the wisp was created
- Updated: Last modification timeView on GitHub (pinned to 71377f2769)
Solutions
- Use a longer ID prefix that matches exactly one issue
- Use the full issue ID
- Run `bd wisp list` (or bd list) to find the exact ID first
Example fix
// before bd wisp create bd-w1 // after bd wisp create bd-w1a2b3c
Defensive patterns
Strategy: validation
Validate before calling
matches, err := store.SearchIssues(ctx, "", types.IssueFilter{IDs: []string{prefix + "*"}})
if err != nil { return err }
if len(matches) > 1 {
return fmt.Errorf("prefix %q is ambiguous (%d matches); use a longer ID", prefix, len(matches))
} Prevention
- Use full IDs in scripts; reserve short prefixes for interactive use
- Lengthen the prefix until exactly one issue matches
- Resolve IDs via `bd list` before passing them to commands
When it happens
Trigger: `bd wisp create <prefix>` (via runWispCreateCore) where the given prefix matches ≥2 issue IDs.
Common situations: Very short prefixes in a database with many similarly-prefixed IDs (e.g. many wisps from the same proto); copy-pasting only the first few characters of an ID.
Related errors
- ErrAmbiguousID
- resolving --deps target %q: %w
- failed to resolve %s: %w
- epic '%s' not found: %v
- issue '%s' not found: %v
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/f16f95aa16cd1ea6.
Report an issue: GitHub.