You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Idle session pins a CPU core: OTEL socket stuck in a zero-wait send() retry loop (~800K syscalls/s, 0 bytes sent) #102531
An idle Claude Code session pins a CPU core at 100% and never recovers. It isn't working. It's retrying a failing send() about 800,000 times a second.
send() fails (-1)
│
▼
"wait until writable" ──► kqueue: "writable now!" (send buffer is empty)
▲ │
└──────── retry same send() ◄─────┘
≈ 800,000×/sec · 0 bytes leave the machine · never stops
Healthy session
Stuck session
CPU
~2%
95–130%
Syscalls / sec
~400
~850,000
CPU time
mostly user
78 min system / 18 min user
Bytes sent on the socket
—
0 (counters frozen)
Root cause
The stuck socket is always the OTLP exporter's keep-alive HTTPS connection (OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf). The bundled Bun v1.4.3 flushes pending TLS bytes with ssl_drain_spill() → us_socket_raw_write():
A real error is handled like "buffer full, try later". The buffer is empty, so the socket is writable immediately. kqueue fires again at once, and the same failing send is retried forever. Nothing closes the socket or reports the error.
Activity