[Bug]: Daemon API returns HTTP 500
Current Behavior / Issue
Since roughly 13:42 PT on 2026-09-09, every new session started from the HumanLayer desktop app (riptide, v0.172.0) shows as "failed to start" and no conversation content streams into the app. The underlying Claude Code process is actually spawned and runs to completion: my local Stop/completion hooks fire (audio alerts), and the full transcript is written under ~/.claude/projects/.... The app just never receives any of it.
The daemon's structured log shows the cause. On every session open, the daemon's call to the Daemon API returns HTTP 500, which fails conversation-stream hydration inside the session-open path:
ERROR ["Daemon API request failed", {"defined":true,"code":"INTERNAL_SERVER_ERROR","status":500,"message":"Internal Server Error"}]
ERROR "Failed to ensure conversation stream"
DaemonConversationStreamHydrationError
at catch (src/effects/services/daemon-api/daemon-api.layer.ts:87:28)
at claude.process_open_sdk_session (src/effects/services/claude-sessions/claude-sessions.live.ts:247:14)
at claude.process_open_sdk_session (definition) (src/effects/services/claude-sessions/psion.ts:10:51)The durable-stream service is also returning 502/504 for task diffs in the same window:
ERROR ["Task diff operation failed", {"message":"Failed to check diff files stream","cause"NOWN","name":"DurableStreamError"},"_tag":"StreamInitializationError"}]
ERROR ["Task diff operation failed", {"message":"Failed to check diff patches stream","cause":{"status":502,"code":"UNKNOWN","name":"DurableStreamError"},"_tag":"StreamInitializationError"}]
ERROR ["Task diff operation failed", {"message":"Failed to create task diff producer","task2e-25eba2ad4862", ... "_tag":"TaskDiffServiceRegistrationError"}]
WARN ["Live Claude follow-up delivery failed", {"operation":"sendMessage","_tag":"ClaudeSdkError"}]The Claude process is never torn down after this error, so it keeps running (and consuming ing nowhere the app can see.
First occurrence: 2026-09-09T20:42:50.910Z (UTC). Every session opened since then (10 atts) hits the same 500. Sessions opened earlier the same morning on the same app build(0.172.0, daemon started 09:46 PT) worked normally.
Expected Behavior
- Session opens, conversation stream hydrates, and Claude's output streams into the app as it did before 13:42 PT.
- If the Daemon API / durable stream is unavailable, the app should surface that specific enavailable, HTTP 500") rather than a generic "failed to start", and the daemon should either not spawn Claude or should stop the orphaned Claude process instead of leaving it running headless.
Steps to Reproduce
- Launch HumanLayer.app 0.172.0 on macOS, signed in (user
user_01KYN5SV37JKD8PYHSQB3FXX08, orgorg_01KYN5VAG0VD7JGTQGP456S019, host885c3219-8e14-4788-8e05-3276ab3c47dc). Daemon starts with sync modeautoand logsdaemon_ready. - Start any new session in any workspace (reproduced in
~/projects/stonefruit/rifflecm-env-3and in the managed workspace~/.humanlayer/workspaces/analyze-riflecm-analytics-stack-implementation-divergence-kbcyau - App reports the session failed to start; nothing streams.
psshowsclaude --output-format stream-json --input-format stream-json ... --permission-prompt-tool stdiorunning as a child ofriptidedand writing a transcript;effect-riptided-*.jsonlshows the 500 + `Failed to ensure conversat s of the session open. - Quit and relaunch the app: same result on every attempt.
Context
What I ruled out locally before filing:
- Not a Claude Code regression. Claude Code auto-updated 2.1.266 → 2.1.267 at 14:31 PT, after the first failure at 13:42. I drove the daemon's exact stdio control protocol by hand (
control_requestinitialize→control_response→ user message →system/init→stream_events → `resulwith the same flags the daemon uses; both behave identically. - Not local permissions. No TCC, sandbox, or firewall denials for
HumanLayer-Local,riptided, orclaudein the macOS unified log; application firewall is off;~/.humanlayer,~/.claude, workspace dirs, and the daemon lock (daemon-locks/*/owner.json, pid 8892) are all owned by my user - Not the pipe. Claude isn't blocked on a full stdout pipe; the daemon is draining it. The transcript for one affected session reached 1.5 MB and the run completed.
- Not network reachability.
riptidedholds established TLS connections tosync.human/ 100.56.36.7) andriptide-api.humanlayer.com(34.192.44.193). UnauthenticatedGET /onsync, riptide-api, cloud, and app all return 200 (riptide-api/health` 200). The 500 is on the authenticated session-open / conversation-stream path specifically. - The daemon token flow succeeds (
Requesting daemon token→Received daemon token→Dad). - The
CLAUDE_SDK_CAN_USE_TOOL_SHADOWEDwarning on stderr is present in healthy logs from the previous day too; it is unrelated noise.
Environment:
- Component (e.g., humanlayer-ts, hld, hlyr, humanlayer-wui): HumanLayer desktop app (
com.ide") + its bundled daemonriptided(/Applications/HumanLayer.app/Contents/Resources/bin/riptided`), Daemon API / durable streams backend - Version: app 0.172.0 (installed 2026-09-08 19:41 PT); daemon log stamp
riptide-v0.172.0[email protected],[email protected]` - OS: macOS 26.5.2 (25F84), arm64
- Node/Go version (if applicable): Node v24.15.0 on PATH (daemon is a Bun-compiled binary)
Nightly build version: not on nightly; production build 0.172.0, BUILD TYPE: prod
Claude code version: 2.1.267 (native install, ~/.local/bin/claude → `~/.local/share/cAlso reproduced on 2.1.266.
Related Issues/PRs:
None that I know of. Possibly related backend symptom from the previous day's log (v0.171.0, 2026-09-08): 8× Durable stream producer halted after repeated 404s; dropping later events for this run.
Additional Information
Timeline (Pacific):
- 09:46 daemon start on 0.172.0, sessions work normally (log shows only the usual
Unable tde block/fiber did not terminatenoise). - 13:42 first
Daemon API request failed 500+Failed to ensure conversation stream. - 14:25 / 14:31 / 14:45 / 15:04 / 15:06 / 15:12 app restarts; every session open after 13:4
- 14:31 Claude Code auto-updated to 2.1.267 (ruled out above).
Affected app session IDs from the log: 01a08717-d9b4-7bed-aab9-7509dcb8ccdf, 01a0882f-4425-7325-a931-f35eec32855b, 01a08837-d3f4-7b0a-8f08-a1c9ba77d121, 01a0883c-4cb8-7853-a4df-9addb9012303. Affected task ID: 01a08717-d56e-7d8a-8c2e-25eba2ad4862.
Logs attached (see below). Screenshots attached.
riptide-native-2026-09-09_15-12-52.log
Source: humanlayer/humanlayer