[C4] Agent block_in_place/Handle::block_on in main async session loop -> thread-starvation/deadlock #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Critical
Component(s): agent
Affected file(s):
agent/src/transport/websocket.rs(call sitesession/mod.rs)Problem:
The agent calls
block_in_place(|| Handle::block_on(...))in the main async session loop and in viewer recv, creating thread-starvation/deadlock risk, alongside a racyconnectedflag.Recommended fix:
Use a dedicated recv task over an mpsc channel, or an async timeout on the locked stream.
Remediation phase: P3 (SPEC-022)
From the 2026-06-05 three-way review (Claude+Gemini+Grok) — see reports/review-2026-06-05/SYNTHESIS-three-way.md (finding C4) and REMEDIATION-PLAN.md (P3).