gastownhall/beads · error
--prefix %q conflicts with issue_prefix %q provisioned in da
Error message
--prefix %q conflicts with issue_prefix %q provisioned in database %q; omit --prefix to adopt the provisioned one
What it means
When the caller passes an explicit --prefix, adoptTeamServerIdentity refuses to silently ignore a disagreement: if the shared database's provisioned issue_prefix differs from the local --prefix, init aborts with this conflict error. A merely derived (non-explicit) local prefix would be adopted silently; only explicit flags conflict.
Source
Thrown at cmd/bd/init_proxied_server.go:430
//
// ABSENT means "unprovisioned, tell them to run bts init" and UNREADABLE means
// "the connection failed, say so"; keeping those apart is the InitVerifier
// role's promise. The two markers arrive as ONE snapshot, so the prefix and the
// project id cannot come from either side of a concurrent write.
func adoptTeamServerIdentity(ctx context.Context, verifier issueops.InitVerifier, dbName, localPrefix string, prefixIsExplicit bool, localProjectID string) (prefix, projectID string, err error) {
identity, readErr := verifier.VerifyIdentity(ctx, issueops.VerifyIdentityRequest{})
if _, err := resolveInitIssuePrefix(true, identity.Prefix, dbName, localPrefix, readErr); err != nil {
if readErr == nil {
return "", "", fmt.Errorf(
"database %q has no project identity (config.issue_prefix) — provision it with 'bts init' (or heal an older bts database with 'bts migrate')",
dbName)
}
return "", "", err
}
// An explicit --prefix that disagrees must not be silently ignored; a
// merely derived prefix adopts silently.
if prefixIsExplicit && identity.Prefix != localPrefix {
return "", "", fmt.Errorf(
"--prefix %q conflicts with issue_prefix %q provisioned in database %q; omit --prefix to adopt the provisioned one",
localPrefix, identity.Prefix, dbName)
}
adoptedID, _, err := resolveInitProjectID(true, localProjectID, identity.ProjectID, dbName, readErr)
if err != nil {
if readErr == nil {
return "", "", fmt.Errorf(
"database %q has no project identity (metadata._project_id) — provision it with 'bts init' (or heal an older bts database with 'bts migrate')",
dbName)
}
return "", "", err
}
return identity.Prefix, adoptedID, nil
}
type proxiedMetadataInputs struct {
dbName stringView on GitHub (pinned to 71377f2769)
Solutions
- Re-run bd init WITHOUT --prefix to adopt the provisioned prefix (recommended by the error)
- If you truly need a different prefix, provision a separate database with 'bts init' using that prefix — don't fight the shared one
- Update local scripts/docs to the provisioned prefix
Example fix
// before bd init --prefix OLD // error: --prefix "OLD" conflicts with issue_prefix "NEW" // after bd init # omit --prefix; adopts the provisioned prefix
Defensive patterns
Strategy: validation
Validate before calling
// read the provisioned prefix before passing --prefix
ident, _ := verifier.VerifyIdentity(ctx, issueops.VerifyIdentityRequest{})
if prefixFlag != "" && ident.Prefix != "" && prefixFlag != ident.Prefix {
return fmt.Errorf("drop --prefix %q; database is provisioned with %q", prefixFlag, ident.Prefix)
} Try / catch
if err != nil && strings.Contains(err.Error(), "conflicts with issue_prefix") {
// re-run bd init without --prefix to adopt the provisioned prefix
} Prevention
- Omit --prefix in team-server mode and adopt the provisioned one
- Only pass --prefix for a brand-new database you provision yourself
- Keep team scripts in sync when the shared prefix changes
- Never share one database across teams wanting different prefixes
When it happens
Trigger: bd init --prefix XYZ against a team-server database provisioned with a different issue_prefix (e.g. ABC).
Common situations: Copy-pasting an init command from another project's docs; the team re-provisioned the shared database with a new prefix while local scripts still pass the old one; two teams sharing one database by mistake.
Related errors
- database %q has no project identity (config.issue_prefix) —
- database %q has no project identity (metadata._project_id) —
- --team-server requires --proxied-server
- record repo_id: %w
- record clone_id: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/4bcb3a42b2a3cc57.
Report an issue: GitHub.