You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I developed a client to send messages to openclaw, but it consistently fails to send. Even using the demo's quick send feature also fails to work #112
Good to hear from you again, @society2012! The "sending quickly" detail is the key clue — this is a timing/sequencing issue.
Why it still fails even with operator.write in your scopes
The OpenClaw gateway doesn't associate scopes with a connection until it has processed your connect message and responded with hello-ok. The sequence must be:
Client → Gateway: WebSocket upgrade (TCP connection established)
Client → Gateway: {"type":"req","method":"connect","params":{"scopes":["operator.write",...]}}
Gateway → Client: {"type":"hello-ok", ...} ← scopes are now active
Client → Gateway: {"type":"req","method":"chat.send",...} ← this now works
If your code sends chat.send before waiting for hello-ok, the gateway hasn't registered your scopes yet — so it rejects the request with missing scope: operator.write even though you declared it.
Fix: wait for the hello-ok message before sending any requests:
// Pseudocode — wait for hello-ok before sendingws.onmessage=(event)=>{constmsg=JSON.parse(event.data);if(msg.type==='hello-ok'){// Connection is now fully established — safe to sendsendChatMessage("hello!");}};
The built-in QuickSend sends chat.sendwithout a sessionKey. Depending on your gateway version, an unrecognised or incorrect sessionKey value could also cause the request to be rejected. Try removing it and just sending {"params":{"message":"..."}} to isolate whether that's contributing.
The built-in QuickSend in OpenClaw itself will be fixed once PR #113 is merged — that adds operator.write to the built-in connect handshake. If you're also seeing the demo's own QuickSend fail, that's why.
Activity
fix: add operator.write scope to gateway connect handshake
github-actions commentedon Mar 27, 2026
society2012 commentedon Mar 29, 2026
Hello, thank you for your reply. I added 'operator. write' when connecting, but sending it quickly still doesn't work,
github-actions commentedon Mar 30, 2026
🤖 This is an automated response from Repo Assist.
Good to hear from you again,
@society2012! The "sending quickly" detail is the key clue — this is a timing/sequencing issue.Why it still fails even with
operator.writein your scopesThe OpenClaw gateway doesn't associate scopes with a connection until it has processed your
connectmessage and responded withhello-ok. The sequence must be:If your code sends
chat.sendbefore waiting forhello-ok, the gateway hasn't registered your scopes yet — so it rejects the request withmissing scope: operator.writeeven though you declared it.Fix: wait for the
hello-okmessage before sending any requests:Also: check the
sessionKeyparameterYour original log showed:
{"method":"chat.send","params":{"sessionKey":"agent:main:main","message":"1234567890"}}The built-in
QuickSendsendschat.sendwithout asessionKey. Depending on your gateway version, an unrecognised or incorrectsessionKeyvalue could also cause the request to be rejected. Try removing it and just sending{"params":{"message":"..."}}to isolate whether that's contributing.PR #113
The built-in QuickSend in OpenClaw itself will be fixed once PR #113 is merged — that adds
operator.writeto the built-inconnecthandshake. If you're also seeing the demo's own QuickSend fail, that's why.Let us know if this helps!
fix: add operator.write scope to gateway connect handshake