Brian Hung
Composer
A web app that runs Claude Code in a Cloudflare Sandbox and talks to it over the Agent Client Protocol.
Starting a task
Cloudflare Workercalls sandbox.execPOST /api/startnot yetalready runningsandboxIdChatEditorhandleSubmit, new taskIdupdateSandboxIdthe task gets its sandboxACPTaskProviderinitialize, newSessiongetSandboxa container per sandboxIdisWebsocketdRunningcurl localhost:8080setupWebsocketdnpx claude-code-acp on 8080Setup polls every 200 ms, for up to 3 s, until the agent's socket answers.
Sending a prompt
Browserthe task pageSandboxa containersendPromptstdinstdoutsessionUpdateChatEditorreact-prosemirrorClientSideConnection@agentclientprotocol/sdkZustandACPClientwrites into useACPStoreWorkerwsConnect to port 8080websocketdWebSocket to stdioclaude-code-acpClaude Code over ACPReplies ride the same socket: message chunks, tool calls, plan updates and permission requests.