Problem
When gascity starts its dolt server, it assigns a dynamic port and injects GC_DOLT_PORT into agent tmux sessions. However, bd (beads CLI) reads BEADS_DOLT_PORT for the dolt server port, defaulting to 3307 if unset.
This means agents running inside gascity sessions cannot use bd commands without manually bridging the env var gap.
Reproduction
gc init --provider claude && gc start
gc rig add /path/to/repo --include packs/gastown
- Inside the rig directory:
bd list → fails with "Dolt server unreachable at 127.0.0.1:3307"
BEADS_DOLT_PORT=$GC_DOLT_PORT bd list → works
Related issues
gc rig add calls bd init --server but doesn't pass --server-port with the actual dolt port. It works if BEADS_DOLT_PORT is exported in the shell before running gc rig add.
bd init --server --server-port <port> doesn't persist the port into metadata.json. Only BEADS_DOLT_PORT env var works at runtime.
- The
dolt_server_port field in .beads/metadata.json is set by bd dolt set port but ignored by bd's connection logic.
Expected behavior
Either:
- gascity should inject both
GC_DOLT_PORT and BEADS_DOLT_PORT into agent sessions, OR
bd should read GC_DOLT_PORT as a fallback, OR
gc rig add should persist the port in a way that bd reads it (e.g. write BEADS_DOLT_PORT to the session env or use bd dolt set port)
Workaround
Set BEADS_DOLT_PORT in tmux session environment for all sessions:
for s in $(tmux -L gc list-sessions -F '#{session_name}'); do
tmux -L gc set-environment -t "$s" BEADS_DOLT_PORT $(tmux -L gc show-environment -t "$s" GC_DOLT_PORT 2>/dev/null | cut -d= -f2)
done
Environment
- gc v0.13.5
- bd v0.63.3
- dolt v1.83.6
Problem
When gascity starts its dolt server, it assigns a dynamic port and injects
GC_DOLT_PORTinto agent tmux sessions. However,bd(beads CLI) readsBEADS_DOLT_PORTfor the dolt server port, defaulting to 3307 if unset.This means agents running inside gascity sessions cannot use
bdcommands without manually bridging the env var gap.Reproduction
gc init --provider claude && gc startgc rig add /path/to/repo --include packs/gastownbd list→ fails with "Dolt server unreachable at 127.0.0.1:3307"BEADS_DOLT_PORT=$GC_DOLT_PORT bd list→ worksRelated issues
gc rig addcallsbd init --serverbut doesn't pass--server-portwith the actual dolt port. It works ifBEADS_DOLT_PORTis exported in the shell before runninggc rig add.bd init --server --server-port <port>doesn't persist the port intometadata.json. OnlyBEADS_DOLT_PORTenv var works at runtime.dolt_server_portfield in.beads/metadata.jsonis set bybd dolt set portbut ignored by bd's connection logic.Expected behavior
Either:
GC_DOLT_PORTandBEADS_DOLT_PORTinto agent sessions, ORbdshould readGC_DOLT_PORTas a fallback, ORgc rig addshould persist the port in a way thatbdreads it (e.g. writeBEADS_DOLT_PORTto the session env or usebd dolt set port)Workaround
Set
BEADS_DOLT_PORTin tmux session environment for all sessions:Environment