On a Linux head there is no way to stop a running stream from off box.
POST /api/v1/stream/stop -> idle
(15 s later) -> streaming
The agent sets its own status to idle. The stream does not stop, because on Linux it is not a subprocess the agent can kill: it runs IN PROCESS inside the Qt kiosk (useInProcessKioskStream() returns true, issue #507 scene mode). The session is still live in that process, so the kiosk's 15 second state reassert pushes streaming back, and the agent believes it.
Measured on cranky-toaster-86 on 2026-11-14.
The 15 second reassert exists so an agent restarted mid-stream re-learns the true state, and it is doing exactly that here. It is reporting the truth. The stop is the half that lies: it reports a state it has no way to bring about.
The subprocess platforms have a real mechanism, stopMoonlightStream() kills the process. Scene mode has no equivalent, because the thing to stop is a session object inside another process that the agent can only reach over the local API, and the traffic on that API runs the other way: the kiosk pushes state TO the agent.
A way for the agent to ask the kiosk to end the session, which is the mirror of the prepare-and-pick-up path that #1192 just completed for starting one. The kiosk already polls the agent while a stream runs (pollStreamStatus), so there is a carrier for it. The exit overlay in the Qt app already knows how to end a session cleanly, so there is an implementation to call.
Until then, POST /api/v1/stream/stop should not report idle on a platform where it cannot stop anything. Reporting a failure it can see beats reporting a success it cannot deliver.
It compounds with two faults found in the same run:
Together: a head can be started remotely and then cannot be stopped remotely, and the lane it holds blocks the next head. The only remedies found are restarting the kiosk and restarting hydrabody.
Found by a peer session while running testbook step 10 for #1192.
Release and fleet state, read live on 2026-11-18, and the device gate is still not run.
Both halves are published and serving. The release project names are not the repository names, which cost a few minutes here:
| Half | Release path | Version |
|---|---|---|
| agent | hydrahead/production |
v2.9.1 |
| kiosk | hydraexperiencenet/production |
v6.3.0 |
HydraExperienceNet-v6.3.0-linux-x86_64.AppImage and hydraheadflatscreen-linux-amd64 both answer a ranged read with 206.
The three Linux heads carry the agent half. cranky-toaster-86, peppy-dumpling-32 and cheeky-cactus-86 are all online in bxl1-test-2 and all report agent v2.9.1.
The device gate is blocked for a different reason than before. bxl1-test-2 has no online body: cloud-l4-euw1 is offline, and the cloud body this was found on is no longer enrolled in the cluster at all. Step 11 measures a STOP, so it needs a live stream first, and nothing in that district can start one.
One trap removed from the testbook. Step 11 said the head needs a kiosk with the stop poll in it, and did not say how to find out. The cluster looks like the answer and is not: the head diagnostics carry "app":"kiosk" next to a version field, and that version is the AGENT. All three heads read v2.9.1 there while nothing reports which AppImage they run. The agent's own record is ~/.hydraheadflatscreen/qt_app_version.yaml, and the testbook now says to read it first, so a stale kiosk cannot be recorded as a failed handshake.
Fixed and released. The stop is now a handshake, the start handshake of #1192 run the other way round.
What changed
POST /api/v1/stream/stopparks a request, status STAYSstreamingGET /api/v1/stream/statusreports"stop_requested": truestopRequestTimerinKioskStreamPage.qmlpolls that every 2 s and callssession.stopSession()sessionFinishedposts the existingfinishedstateidleThe status stays
streamingfor the whole handshake on purpose, which answers the point in the report directly: it is the truth until the session really ends, and the 15 s re-assert then agrees with the agent instead of fighting it.The stop now says which of three things happened
200 {"status":"idle"}202,stop_requested: true409errornames what refusedhydraheadflatscreen stream-stopmaps the 202 to a non-zero exit, with a 13 s client timeout that fits inside hydracluster's 15 s exec poll and outside the agent's 9 s wait. So each layer reports rather than the one below it timing out underneath it.No operator PIN is raised.
stopSession()is the same call the exit overlay makes after the PIN. The PIN stops a visitor ending somebody else's session from the panel; a stop over the cluster's authenticated route is already authorised, and an unattended head has nobody to type one.Two guards worth knowing. An unanswered request expires after 60 s, so it can never end the NEXT session. A new start drops a request aimed at the stream it replaces.
One thing the tests caught, not me. A local experience (
stream_mode: local, #833) reportsstreamingtoo, and it is a process on the head, not a session in the kiosk. My first version handed it to the kiosk, which would have left the experience running with nothing to end it.TestRefusedLocalStopPreservesOwnedLifecyclefailed and the guard is now explicit, with its own test.Released
Docs: the kiosk runbook under Scene mode, the agent runbook under Stopping streams centrally and the in-process endpoint list, and a new step 11 in
docs/testbooks/omarchy-head-e2e.md.Not closed yet. Eight unit tests prove the handshake, including the end-to-end case driven only the way a real kiosk can drive it, but no device has run it. Step 11 is the gate:
DELETE /api/v1/heads/{id}/stream, then check the status is STILL idle 20 seconds later, because the re-assert is what exposed the old defect.