Before you continue
Environment
- Gas City:
0.15.x (gc commit b6cef0c9)
- Workspace: ds-research (single-city managed-dolt)
- City config has both:
[[agent]] name = "mayor"
[[named_session]] template = "mayor" mode = "always"
- Observed after a supervisor restart on 2026-04-19 12:16 EDT.
Symptom
gc session list shows two mayor beads in steady state:
| id |
state |
target |
session_origin |
pool_managed |
notes |
| gc-1432 |
active |
mayor |
named |
false |
the real, working mayor |
| gc-1947 |
creating |
mayor-1 |
ephemeral |
true (slot=1) |
never leaves creating |
Before gc-1947, the reconciler had already closed gc-1945 with state: failed-create / close_reason: failed-create. Each new pool-managed mayor bead gets a unique session_name: mayor-gc-NNNN (non-colliding with "mayor") and target mayor-1, but creation still fails and the pool manager retries indefinitely.
Supervisor log excerpt
poolDesired: mayor = 1
scaleCheck: mayor = 1
session reconciler: starting mayor-gc-1945: context canceled
session lifecycle: op=start wave=0 session=mayor-gc-1945 template=mayor outcome=canceled
Also:
session beads: session_name "control-dispatcher" for control-dispatcher unavailable: session name already exists: "control-dispatcher" conflicts with existing identifier on gc-1928
— same pattern for the control-dispatcher template (a pack-imported agent). So this is not mayor-specific; any agent template with both an [[agent]] block and a matching (explicit or implicit) named-session can trip it.
Expected behavior
[[named_session]] for a template should suppress poolDesired for the same template (or vice versa). Spawning both simultaneously should either:
- Be rejected at config load with an error explaining the collision, or
- Converge on the named session and skip pool scaling for that template, or
- Allow both but assign non-overlapping identity so creation actually succeeds.
Relation to #855
Observed during #855 recovery. Not the same bug, but possibly an amplifier — each failed-create retry runs its own bd probes against the rig store, adding to the very queue #855 describes. Might be worth touching in the same area of the codebase.
Reproduction (sketch)
- Fresh city with
[[agent]] name = "mayor" AND [[named_session]] template = "mayor" mode = "always".
gc supervisor start.
- Watch
gc session list — expect a single active mayor; observe two beads (named + ephemeral pool).
Happy to produce a minimal repro city if that would help.
Before you continue
[[named_session]]entry"). This is the inverse:[[named_session]]entry PLUSpoolDesiredfor the same template both fire simultaneously, and the pool manager keeps spawning ephemeral mayor beads that can never reach theactivestate.Environment
0.15.x(gc commitb6cef0c9)[[agent]] name = "mayor"[[named_session]] template = "mayor" mode = "always"Symptom
gc session listshows two mayor beads in steady state:creatingBefore
gc-1947, the reconciler had already closedgc-1945withstate: failed-create/close_reason: failed-create. Each new pool-managed mayor bead gets a uniquesession_name: mayor-gc-NNNN(non-colliding with"mayor") and targetmayor-1, but creation still fails and the pool manager retries indefinitely.Supervisor log excerpt
Also:
— same pattern for the
control-dispatchertemplate (a pack-imported agent). So this is not mayor-specific; any agent template with both an[[agent]]block and a matching (explicit or implicit) named-session can trip it.Expected behavior
[[named_session]]for a template should suppresspoolDesiredfor the same template (or vice versa). Spawning both simultaneously should either:Relation to #855
Observed during #855 recovery. Not the same bug, but possibly an amplifier — each failed-create retry runs its own
bdprobes against the rig store, adding to the very queue #855 describes. Might be worth touching in the same area of the codebase.Reproduction (sketch)
[[agent]] name = "mayor"AND[[named_session]] template = "mayor" mode = "always".gc supervisor start.gc session list— expect a single active mayor; observe two beads (named + ephemeral pool).Happy to produce a minimal repro city if that would help.