gastownhall/beads · error
%s
Error message
%s
What it means
`resolvedConfigRepoRoot` cannot find the active beads workspace: `beads.FindBeadsDir()` returned empty, so there is no repo root to report for config operations. The message text is delegated to `activeWorkspaceNotFoundError()`.
Source
Thrown at cmd/bd/config.go:791
path = parent
}
if isGitRepo() && git.IsWorktree() {
if fallbackDir := beads.GetWorktreeFallbackBeadsDir(); fallbackDir != "" {
return filepath.Dir(fallbackDir)
}
}
return ""
}
// resolvedConfigRepoRoot returns the repository root for the active beads
// workspace. It follows FindBeadsDir semantics, including BEADS_DIR and
// worktree/shared fallback resolution.
func resolvedConfigRepoRoot() (string, error) {
beadsDir := beads.FindBeadsDir()
if beadsDir == "" {
return "", fmt.Errorf("%s", activeWorkspaceNotFoundError())
}
return filepath.Dir(beadsDir), nil
}
var configSetManyCmd = &cobra.Command{
Use: "set-many <key=value>...",
Short: "Set multiple configuration values in one operation",
Long: `Set multiple configuration values at once with a single auto-commit and auto-push.
Each argument must be in key=value format. All values are validated before
any writes occur. This is faster and less noisy than separate 'bd config set'
calls, especially in CI.
Examples:
bd config set-many ado.state_map.open=New ado.state_map.closed=Closed
bd config set-many jira.url=https://example.atlassian.net jira.project=PROJ`,
Args: cobra.MinimumNArgs(1),
SilenceUsage: true,View on GitHub (pinned to 71377f2769)
Solutions
- cd into a directory inside a repo with an initialized beads workspace, or run `bd init` first
- Check/unset or correct the BEADS_DIR environment variable
- In a git worktree, ensure the shared .beads dir is linked per FindBeadsDir fallback semantics
- Run `bd doctor` to diagnose workspace discovery
Example fix
// before BEADS_DIR=/opt/nonexistent bd config get prefix // after unset BEADS_DIR && cd /path/to/repo && bd config get prefix
Defensive patterns
Strategy: validation
Validate before calling
[ -d .beads ] || [ -n "$BEADS_DIR" ] || { echo "no beads workspace; run bd init"; exit 1; } Prevention
- Only run bd config inside an initialized workspace
- Run bd init before config commands in new repos
- Audit BEADS_DIR in shell profiles and CI environments
- Link shared .beads dirs in git worktrees
When it happens
Trigger: Running a config command (e.g. `bd config ...`) outside any directory containing a .beads workspace, with BEADS_DIR unset or pointing at a nonexistent path, and no worktree/shared fallback that resolves.
Common situations: Running bd config from $HOME or a non-repo directory; BEADS_DIR exported with a typo; running in a git worktree without the shared beads dir linked.
Related errors
- %s
- %s; %s
- %w. Hint: run 'bd init' to create a database in the current
- no active beads workspace
- backend %q cannot be created by bd init; it can only open an
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/1b54da0cc18a15c5.
Report an issue: GitHub.