BLACK LABELAcademy
← Our Failures

Behavior lives in the daemon, not the web deck

intermediate5 min read · updated 2026-06-20

Market & numbers — every figure sourced

wasted_debug_cycles_before_root_cause4 edit-reload loopsest: count of edit→restart-UI→retest loops run before the daemon-restart fix was applied, from the incident timeline
daemon_restart_time5 secondsest: observed supervisor respawn time after SIGTERM in the production launchd setup

Behavior lives in the daemon, not the web deck

What we tried

The product is split into two processes that look like one thing from the outside:

We changed real behavior — edits to the brain, the memory layer, and core routing — and then restarted the web deck to "deploy" the change. We reloaded the page, re-ran the same query, and saw the exact old behavior. So we edited again, restarted the deck again, tested again. Nothing moved. The natural (wrong) conclusion in the moment is "my edit didn't take" or "the file didn't save," which sends you editing code that was already correct.

We burned roughly 4 full edit→restart-UI→retest loops chasing a phantom before noticing the request was being answered by a process we never restarted.

What broke

The request path is `deck → IPC → daemon`. The deck does the rendering and the talking; the daemon holds the loaded code in memory and does the actual work. Restarting the deck reloads the transport, not the logic.

Two well-documented mechanics make this inevitable, not a quirk of our stack:

So the deck was a red herring twice over: it neither holds the edited logic nor is it the process that needs reloading.

The fix

Restart the daemon, not the deck. In our setup the daemon runs under a supervisor (launchd), so the deploy is simply: send `SIGTERM` to the daemon PID and let the supervisor respawn a fresh process that re-imports the edited code. Respawn lands in about 5 seconds. Do not force-rebuild and do not restart the web deck — neither touches the loaded logic, and a force-rebuild can orphan OS-level grants on adhoc-signed binaries.

The mental model that prevents the relapse:

Apply it

Sources

© 2026 Black Label · Education, not financial or legal advice. Every number is sourced or labeled an estimate. Subscribe for $30/month