Problem
Several bd dolt subcommands shell out to the raw dolt CLI and assume the repo directory is at .beads/dolt/<database> relative to the project root. In shared-server mode, the actual data lives at a shared root (e.g. ~/.local/share/beads-dolt/<database>).
| Command |
Behavior |
Impact |
bd dolt push |
Works only if a symlink exists at .beads/dolt/<db> -> shared root |
Fragile dependency on manual symlink |
bd dolt pull |
Fails with "database is read only" — CLI opens repo directly, conflicting with running server lock |
Broken in server mode regardless of symlink |
bd dolt remote add |
SQL path succeeds, CLI path fails → state divergence |
Partially broken |
bd dolt remote remove |
Same dual-path divergence as remote add |
Partially broken |
Root cause
When Beads shells out to dolt push, dolt pull, or dolt remote, it constructs the working directory as .beads/dolt/<database>. This path:
- Does not exist by default in shared-server mode (requires a manual symlink to work)
- Even if it resolves via symlink, opening the Dolt repo directory directly conflicts with the running server's lock on that same directory (this is why
pull fails)
Expected behavior
When dolt_mode: server, CLI-fallback commands should:
- Resolve the repo path from explicit configuration (shared data root + database name), not from the per-project
.beads/dolt/ convention
- For operations that conflict with a running server (like
pull), either:
- Route through SQL instead of CLI
- Coordinate with the server (stop/start around the operation)
- Fail with a clear error explaining the server-lock conflict
Path resolution order
- Explicit configured
data-dir from metadata or config
dolt_server_host + dolt_database from metadata (derive shared root)
- Legacy per-project
.beads/dolt/<database> fallback only if no server config exists
Environment
- beads v1.0.0 (Homebrew)
- macOS, Dolt SQL server managed by launchctl on 127.0.0.1:3307
.beads/metadata.json with dolt_mode: server
- Shared data root:
~/.local/share/beads-dolt
Workaround
Create a per-project symlink: .beads/dolt/<db> -> ~/.local/share/beads-dolt/<db>. This fixes push but pull remains broken due to the server lock conflict.
Related
Problem
Several
bd doltsubcommands shell out to the rawdoltCLI and assume the repo directory is at.beads/dolt/<database>relative to the project root. In shared-server mode, the actual data lives at a shared root (e.g.~/.local/share/beads-dolt/<database>).bd dolt push.beads/dolt/<db> -> shared rootbd dolt pullbd dolt remote addbd dolt remote removeremote addRoot cause
When Beads shells out to
dolt push,dolt pull, ordolt remote, it constructs the working directory as.beads/dolt/<database>. This path:pullfails)Expected behavior
When
dolt_mode: server, CLI-fallback commands should:.beads/dolt/conventionpull), either:Path resolution order
data-dirfrom metadata or configdolt_server_host+dolt_databasefrom metadata (derive shared root).beads/dolt/<database>fallback only if no server config existsEnvironment
.beads/metadata.jsonwithdolt_mode: server~/.local/share/beads-doltWorkaround
Create a per-project symlink:
.beads/dolt/<db> -> ~/.local/share/beads-dolt/<db>. This fixespushbutpullremains broken due to the server lock conflict.Related
bd dolt status/bd dolt showin server mode #3218 (external server recognition forbd dolt status/bd dolt show)