OpenAI's Self-Hosted Executor Only Dials Out. So Does Our Daemon, Which Is Why the Stop Button We Added Today Is a Queue
Description and use
The self‑hosted executor and daemon only dial out, so there was no way to stop a session from the UI. A "Stop" button was added that queues a kill command after ownership checks, which the daemon then executes via SIGTERM/SIGKILL.
Problem
Self‑hosted executors and daemons only initiate outbound connections, so there is no built‑in way to stop a running session from the web UI.
Outcome
Adding a stop button provides a safe, owner‑controlled way to terminate remote sessions without opening inbound ports, while keeping the outbound‑only design intact.
Workflow
- 1. User clicks "Stop" on the session UI.
- 2. Client sends POST /api/commands with kind=kill.
- 3. Server verifies ownership, writes audit entry, resolves target device, checks daemon online, queues command or returns 409.
- 4. Daemon polls /api/agent/commands every 2s.
- 5. Daemon receives kill command, runs "shell kill
<id>", which sends SIGTERM then SIGKILL to the session process group. - 6. Daemon posts completion; server deletes session row.
Evidence
Pressing Stop sends a POST to /api/commands with kind kill.
The daemon refuses to start unless the machine was signed in with shell login --allow-remote-start.
- Record date: 2026-09-17T00:00:30.669Z