## broker-state-unavailable **What you see.** `memoryd` logs one line when it cannot get a session's state from `brokerd`, then this entry: ```text memoryd: /srv/bx/run/memory-broker/state.sock: Connection refused (os error 111); turns wait undecided; see docs/runbook.md#broker-state-unavailable ``` The reason may instead be `No such file or directory` (nothing listens), a timeout (`frame I/O error: Resource temporarily unavailable`, after 5 seconds without a byte), or `brokerd: ` when `brokerd` answered with an error. When `brokerd` answers again, `memoryd` logs `memoryd: brokerd answers on its state socket again; turns are decided`. Conversations are not affected. **Why.** With `[honcho]`, `memoryd` decides where each finished turn goes in Honcho: the trusted workspace, the untrusted one, or nowhere (M5c spec, section 5). It needs `brokerd`'s record of the session's class and trust for that, and never guesses it: a guess could put a turn from a session that read a web page in the trusted workspace. So nothing is decided while `brokerd` does not answer. The turns wait, in memory, and are decided at the next turn's end of any session once `brokerd` answers, from the session's state then (which can only have moved towards untrusted). The outage is logged once, not at every turn. A restart of `memoryd` forgets the waiting turns until each of their sessions has another turn. **Confirm.** ```sh ls -l "$BOXMAKER_HOME/run/memory-broker/state.sock" grep -n 'state' /etc/boxmaker/memoryd.toml /etc/boxmaker/brokerd.toml ``` `memoryd`'s `[sockets] state` and `brokerd`'s `[sockets] state` must name the same path (both default to `/run/memory-broker/state.sock`). If `brokerd` answered with an error, its own log names the problem, usually `broker-state-damaged`. **Fix.** Start `brokerd` if it is stopped; make the two `[sockets] state` paths agree; or, for `brokerd`'s error, follow the entry its log names. **Check.** At the next turn's end `memoryd` logs that `brokerd` answers again, and `memory/honcho.jsonl` gains a `decided` line for each turn that waited.