feat: add Claude Code channels as alternative backend#26
Merged
Conversation
Add support for connecting to Claude Code channel servers alongside existing OpenClaw gateway support. Users select between backends via tabs on the connect screen. Each backend maintains its own saved credentials. - gateway-client.ts: handle `connect.welcome` event for channel backend, add BackendType, skip Ed25519 handshake for channels - ConnectScreen: backend tabs (OpenClaw / Claude Channels), separate URL/token state per backend, SSH toggle only for OpenClaw - App.tsx: persist backend type and channel credentials separately - useGateway: pass backend type through to client - README: document channel server setup with full instructions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Claude Code channels as a second backend option alongside OpenClaw. ClawChat can now connect to a Claude Code instance running with a custom MCP channel server, using the Max subscription instead of requiring an OpenClaw gateway.
What changed
src/lib/gateway-client.tsBackendType('openclaw' | 'channel') andbackendfield toGatewayClientOptionsconnect.welcomeevent — channel servers use this simplified handshake instead of OpenClaw'sconnect.challenge→ Ed25519 →hello-okflowsrc/components/ConnectScreen.tsxws://localhost:18789, Channels →ws://tc1.home.wrox.us:9700src/App.tsxbackendtypechannelUrl/channelTokenvsgatewayUrl/token)src/hooks/useGateway.tsbackendthrough toGatewayClientREADME.mdHow it works
The channel server is an MCP server that runs as a subprocess of Claude Code. It has two interfaces:
When ClawChat sends a
chat.sendrequest:runIdnotifications/claude/channelto Claude via MCPsend_replytoolchatevent (state:final) with the matchingrunIdWhat's NOT changed
sessions.listcompatiblyKnown limitations
finalevent (not incremental deltas). The response appears all at once rather than streaming word-by-word.--dangerously-load-development-channels— this is a research preview featureTest plan
npm test— all 12 tests passnpx tsc --noEmit— clean build🤖 Generated with Claude Code