AIToday
Zenn AI/MLPublished: Nov 27, 2026, 22:01 JST

Shelly fixes approval-queue stall in e2a8b39b6

Send on LINE
Shelly fixes approval-queue stall in e2a8b39b6

3 Key Points

  1. What happened

    With d0590ece6, Shelly exposed run_command and write_file under a new mcpExecEnabled setting, each call waiting on an in-app approval screen. In 2026-09-17's e2a8b39b6, it stopped awaiting each call inside the drainOnce() loop, so pending approvals no longer blocked later reads like list_repos and git_status.

  2. Why it matters

    The stall came from serial request processing, not from read-side approval rules, so a pending approval could hold up unrelated reads in the same polling cycle. The fix keeps approval waits in place while letting the loop move on to later requests.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

Shelly's MCP server was first enabled via settings.mcpServerEnabled and initially exposed only read-oriented tools, because the existing capability broker controlled outbound requests but lacked a mechanism for inbound requests. Read tools and inbound permission control were treated as separate implementation stages. Commit d0590ece6 later added run_command and write_file under a new mcpExecEnabled setting, itself disabled by default and ineffective unless the MCP server was enabled. Each call waited on an in-app approval prompt, with an automatic rejection after a timeout and a refusal to treat a missing response as consent. Commit e578d7f77 covered read-only tool exposure, d0590ece6 added exec/write with approval, and e2a8b39b6 addressed the queue-wide stall.

The stall surfaced in end-to-end testing with Claude Code and Codex clients. On 2026-09-17, observation showed that when run_command or write_file waited for approval, later list_repos or git_status requests were not processed until the earlier wait finished. The cause was drainOnce()'s for loop awaiting callTool() completion sequentially. The fix starts each request without awaiting completion and tracks in-flight requests in a small set, so the loop can proceed to later requests while approval waits remain.

Separately, MCP spec 2026-07-28 removes the initialize/initialized exchange and Mcp-Session-Id header, makes server/discover optional, and requires each request to carry context such as protocolVersion and clientCapabilities in _meta. Requests missing required fields must be rejected with JSON-RPC -32602 and HTTP 400. For approvals, the spec offers a mechanism where a resultType of input_required response lets the client retry with inputResponses. Shelly's implementation instead had each call wait on an in-app approval screen. The write-up also notes that A2A's 9f83de623 added a read-only list_agents that returns registered agents on the same network, without skills that start execution.

FAQ
What caused the blockage of read requests?
Inside drainOnce(), a for loop awaited callTool() completion for each request in turn, so a pending approval for run_command or write_file also delayed later list_repos and git_status calls.
Did the fix remove the approval requirement for write and exec calls?
No. The approval requirement was added in d0590ece6, and e2a8b39b6 only changed the request-file loop to start calls without awaiting completion, while a small set tracked in-flight requests by name.
What MCP 2026-07-28 behavior does Shelly align with?
MCP 2026-07-28 uses a stateless flow without initialize/initialized exchange or Mcp-Session-Id, and servers must not depend on prior requests on the same connection to establish context; requests missing required _meta fields get JSON-RPC error -32602 and HTTP 400.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Next articleGoogle to require MCP servers or Google Workspace CLI for AI agents from February 1, 2027