The break loop had no editor half: you drove it with a raw socket. Now the daemon carries the state, the modeline says the program is stopped and on what, and C-c C-b is a completing-read over the restarts with abort last on the list. The lead finding is a bug in the break loop itself, not in this lane. flan_agent_poll was not re-entrant and has to be: a C-x C-e thunk may itself error, and the break loop that catches it polls again from inside that call. The old loop cached head and tail and stored tail back at the end, so the outer call rewound the index over everything the nested poll had consumed and re-ran the thunk that had just stopped the program - an unbounded recursion of breaks. A job is claimed now, tail advanced past it, before it runs. Falsified by reverting the shape and watching the new test fail. State reaches the editor two ways because one is not enough. It rides on every reply, since the likeliest moment to stop is just after an evaluation and a poll would report it only after the echo area had said the eval was fine; and a one-second timer, since a program that stops in its own game loop produces no reply at all. The timer never reconnects, because that would erase the lost state, and skips while a request is in flight, because accept-process-output runs timers and a poll firing inside a read would eat that read's reply. ok from restart means accepted, not resumed, and the note says so - the program resumes at its next pass of the break loop, which is not this thread's to promise.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%