01 / 04
Reloaded live while work ran elsewhere
Once agents moved into ConjureIt to build ConjureIt, every rebuild threatened to kill the shells doing
the work — and every other project open in the panes beside them.
So a daemon owns every PTY and headless Ghostty surface; the UI holds no sessions at
all. Because Ghostty's terminal pages use offset-only pointers, rebuilding the UI ships a
binary page snapshot straight from the daemon — 135 KB for a 50,000-line session (41× smaller than log
replay, unpacked in 0.12 ms, zero cells lost, older scrollback fetched lazily).
Even the daemon upgrades in place: pausing each PTY at a byte-exact cut, spawning the new binary first
to prove it can unpack every checkpoint, and keeping the listening socket and every PTY open across
exec with the same PID (rolling back cleanly if anything fails). Pretty
quickly you fall into a rhythm of trusting your sessions to come straight back — the downtime is
barely a blink.
02 / 04
Off-screen UI and virtual time
The reload blink wasn't even the distracting part — test windows flying everywhere and
stealing your focus while you were working in other projects were. Every time agents ran UI
tests for splits, drag previews, or redraws, windows popped across the screen and grabbed the mouse
and keyboard.
So private test runs launch the real Metal UI off-screen as an accessory app whose windows are
never ordered onto a display, with logical focus, synthetic input, and a clipboard of its own.
A microsecond virtual clock (ui.clock / ui.advance) steps
animations, cursor blink, and watchdogs on demand — deterministic and faster than real time.
03 / 04
Overnight runs vs. the macOS lock screen
Once tests stayed out of the way, overnight runs hit a wall: the moment the displays slept, macOS
silenced every CADisplayLink. Panes kept their text in memory and drew zero
frames; dozens of UI tests failed before morning.
Rather than leaving the screen awake, off-screen windows moved onto a timer-backed frame
clock of their own — holding off App Nap while idle sleep stays allowed — and on-screen panes
gained automatic recovery from silent display links.
The suite then ran on its own with the display asleep: 441 passed, 4 display-only checks skipped, 0
failed (and has since grown past 640 tests).
04 / 04
How agents kept it honest
Living inside the build surfaced real systems scars — execv from a
libdispatch callback inheriting 20 blocked signals so new shells ignored
Ctrl-C, and dirty pool refcounts crashing the UI while the daemon kept all 35 live
sessions untouched.
So core logic runs headlessly through ConjureIt check, fed by a differential
fuzzer (pair-check) that auto-shrinks failures with ddmin. It shrank
a non-commuting resize bug from 120 steps to 4, and caught that merely clicking a pane pinned
a row and silently diverged it from the daemon — leading to a 1,213,056-case census driving wrong
copies on resize to zero.
Two agent seats even built independent formal state-machine models of
Daemon.upgrade to hammer cross-build rollbacks and fault injections before touching live
shells.