Bug Description
只要worker重启过一次(token更新),后续worker只要执行文件同步(file-sync),就会100%断连。
。
Steps to Reproduce
1.当worker只要重启过一次,再根据任务要求执行file-sync的时候,会把minio中的openclaw.json(包含初始accessToken,此时已失效)同步到本地。
2.文件同步完成后,Worker仍可以正常发送至少1条消息(Matrix长连接会话令牌缓存有效期30120秒,此期间不需要重新校验Token)
3.等待30120秒(到Matrix客户端默认心跳周期),Matrix连接被服务器主动断开,返回401/403认证错误
4.Matrix插件自动重连,一直使用已经被覆盖的无效旧Token,重连永久失败,Worker完全断联,仅能通过重启容器恢复
AI Analysis
根本原因:
1.Hiclaw Gateway内置工作区状态持久化机制:worker的本地文件自动同步到minio时,不包含工作区的openclaw.json (没问题,防止worker自己不小心改坏)
2.minio中的openclaw.json,文件中channels.matrix.accessToken是最初创建的时候生成的。
3.worker容器重启时,matrix分配的accessToken会更新

确认容器重启会重新生成token、确认minio中token与实际生效的不一致
Relevant Logs
Component
OpenClaw Worker
Version / Commit
No response
Bug Description
As long as the worker is restarted once (token update), subsequent workers will be 100% disconnected as long as they perform file synchronization (file-sync).
.
Steps to Reproduce
- When the worker only needs to be restarted once and then executes file-sync according to the task requirements, the openclaw.json in minio (including the initial accessToken, which is invalid at this time) will be synchronized to the local.
- After file synchronization is completed, Worker can still send at least 1 message normally (Matrix long connection session token cache is valid for 30~120 seconds, and there is no need to re-verify the token during this period)
- Wait for 30~120 seconds (to the default heartbeat period of the Matrix client). The Matrix connection is actively disconnected by the server and a 401/403 authentication error is returned.
- The Matrix plug-in automatically reconnects and always uses the invalid old token that has been overwritten. The reconnection fails permanently and the worker is completely disconnected and can only be restored by restarting the container.
AI Analysis
Root cause:
- Hiclaw Gateway has a built-in workspace state persistence mechanism: when the worker's local files are automatically synchronized to minio, the openclaw.json of the workspace is not included (no problem, to prevent the worker from accidentally changing it)
- In openclaw.json in minio, the channels.matrix.accessToken in the file is generated when it is initially created.
- When the worker container is restarted, the accessToken assigned by matrix will be updated.

Confirm that restarting the container will regenerate the token, and confirm that the token in minio is inconsistent with the actual one.
Relevant Logs
Component
OpenClaw Worker
Version/Commit
No response
Bug Description
只要worker重启过一次(token更新),后续worker只要执行文件同步(file-sync),就会100%断连。
。
Steps to Reproduce
1.当worker只要重启过一次,再根据任务要求执行file-sync的时候,会把minio中的openclaw.json(包含初始accessToken,此时已失效)同步到本地。
2.文件同步完成后,Worker仍可以正常发送至少1条消息(Matrix长连接会话令牌缓存有效期30
120秒,此期间不需要重新校验Token)120秒(到Matrix客户端默认心跳周期),Matrix连接被服务器主动断开,返回401/403认证错误3.等待30
4.Matrix插件自动重连,一直使用已经被覆盖的无效旧Token,重连永久失败,Worker完全断联,仅能通过重启容器恢复
AI Analysis
根本原因:
1.Hiclaw Gateway内置工作区状态持久化机制:worker的本地文件自动同步到minio时,不包含工作区的openclaw.json (没问题,防止worker自己不小心改坏)
2.minio中的openclaw.json,文件中channels.matrix.accessToken是最初创建的时候生成的。
3.worker容器重启时,matrix分配的accessToken会更新
Relevant Logs
Component
OpenClaw Worker
Version / Commit
No response
Bug Description
As long as the worker is restarted once (token update), subsequent workers will be 100% disconnected as long as they perform file synchronization (file-sync).
.
Steps to Reproduce
AI Analysis
Root cause:
Relevant Logs
Component
OpenClaw Worker
Version/Commit
No response