From the Inside Claude Code: The Claude Code Ecosystem architecture map

Interrupt and other control calls stall when nobody is reading messages

risk · high · verified

Control Protocol Query routes control responses and conversation messages through one reader task. That task awaits a send into a 100-message buffer (query.py:229, 506), so when the caller is not iterating receive_messages and the buffer fills, the control_response for interrupt(), set_model() or get_mcp_status() is never routed and the call fails after 60 seconds with Control request timeout. Only an example script warns that interrupts require active consumption.

Impact: The escape hatch fails exactly when it is needed: a runaway turn with partial messages enabled fills the buffer in seconds, and interrupt() then times out instead of stopping it.

Recommendation (small effort): Route control_response frames before any await on the message buffer, or give control responses their own path that never waits on the consumer. Document the consumption requirement on interrupt() itself.

The trail

  1. ClaudeSDKClient
  2. Control Protocol Query
  3. Subprocess CLI Transport
Open on the map

More from this board

© 2026 Syntaxia App Platform Ltd.

Syntaxia App Platform Ltd. Registered in England and Wales, company no. 15272701 Registered office: 3rd Floor, 86–90 Paul Street, London EC2A 4NE, United Kingdom contact@provenmap.com