Reuse returned the running server whenever it answered HTTP and matched the authority, including one whose launch token could not be exchanged for a cookie. That server answered 401 forever, so the restart the warning asks for could never happen. Track the failed exchange and skip reuse, which makes the next start request stop and respawn it.
1.1 KiB
aicodeman
| aicodeman |
|---|
| patch |
The DeepSeek Harness web tab opens on the dashboard again instead of a blank 401 page. dsh web now gates its own index behind a one-time launch token it prints on boot; the supervisor reads that token out of the captured output, trades it for the session cookie once at startup, and the webview proxy presents the cookie on both the HTTP and WebSocket legs — scoped to the loopback authority it was minted for. The banner reader scans every dsh web: line (diagnostics share the prefix) and only complete lines (a split write is waited for), so a dsh web: loading profiles line no longer makes boot give up. A server whose exchange failed is no longer reused, so asking to start the UI again restarts it and retries the exchange. The cookie is only presented to a tab whose owner holds the privileged-commands grant, and in multi-user mode only to the owner whose request started the process: managed is a client-supplied field and the live port is public, so the saved record alone is not an entitlement. A dsh without the gate keeps working unchanged.