Problem
When multiple checkouts of the same project exist (e.g., parallel agent worktrees), they clone the same Dolt database and inherit the same issue_prefix. All checkouts then create issues in the same namespace (e.g., bd-XXXX), leading to:
- Cross-contamination on claim/update — Agent A can claim or modify Agent B's issues because they share the prefix namespace
- Ambiguous ownership — No way to determine which checkout created an issue
- Search/filter pollution —
bd list in one checkout shows another checkout's work
This is a blocking problem for parallel agent workflows where each checkout should own its own set of issues.
Solution
Introduce a checkout_suffix config key that appends a short unique identifier to the issue_prefix at ID generation time, giving each checkout its own issue namespace while preserving the shared project identity.
issue_prefix = "bd", checkout_suffix = "" → IDs: bd-XXXX (unchanged, backward compatible)
issue_prefix = "bd", checkout_suffix = "k9x" → IDs: bd-k9x-XXXX
Why a separate key instead of mutating issue_prefix?
rename-prefix operates on issue_prefix and would need complex logic to preserve/strip suffixes
- Sync/federation compares
issue_prefix across remotes — mutating it would break clone detection
allowed_prefixes and ExtractIssuePrefixKnown already handle multi-segment prefixes
- Rollback is trivial: clear
checkout_suffix to rejoin the shared namespace
- No schema migration needed — stored in the existing
config key-value table
CLI interface
New --checkout-suffix flag on bd init and bd bootstrap:
--checkout-suffix=auto — generate a random 3-char base36 suffix
--checkout-suffix=k9x — use a specific suffix
--checkout-suffix=none — explicitly no suffix
- Interactive prompt when no flag is provided (skipped in non-interactive/CI mode)
What changes
- ID generation uses the effective prefix (
issue_prefix + optional checkout_suffix)
ResolvePartialID adds the effective prefix to knownPrefixes for correct parsing
MergeSlotID includes the suffix so each checkout gets its own merge slot
- Cross-checkout issues remain visible (suffix only affects creation, not reads)
- Base prefix auto-added to
AllowedPrefixes for cross-checkout validation
PR
#3152
Problem
When multiple checkouts of the same project exist (e.g., parallel agent worktrees), they clone the same Dolt database and inherit the same
issue_prefix. All checkouts then create issues in the same namespace (e.g.,bd-XXXX), leading to:bd listin one checkout shows another checkout's workThis is a blocking problem for parallel agent workflows where each checkout should own its own set of issues.
Solution
Introduce a
checkout_suffixconfig key that appends a short unique identifier to theissue_prefixat ID generation time, giving each checkout its own issue namespace while preserving the shared project identity.issue_prefix = "bd",checkout_suffix = ""→ IDs:bd-XXXX(unchanged, backward compatible)issue_prefix = "bd",checkout_suffix = "k9x"→ IDs:bd-k9x-XXXXWhy a separate key instead of mutating
issue_prefix?rename-prefixoperates onissue_prefixand would need complex logic to preserve/strip suffixesissue_prefixacross remotes — mutating it would break clone detectionallowed_prefixesandExtractIssuePrefixKnownalready handle multi-segment prefixescheckout_suffixto rejoin the shared namespaceconfigkey-value tableCLI interface
New
--checkout-suffixflag onbd initandbd bootstrap:--checkout-suffix=auto— generate a random 3-char base36 suffix--checkout-suffix=k9x— use a specific suffix--checkout-suffix=none— explicitly no suffixWhat changes
issue_prefix+ optionalcheckout_suffix)ResolvePartialIDadds the effective prefix toknownPrefixesfor correct parsingMergeSlotIDincludes the suffix so each checkout gets its own merge slotAllowedPrefixesfor cross-checkout validationPR
#3152