Skip to content

[Bug]: restart-sentinel consumed on startup but wake message never delivered #29116

@davidguttman

Description

@davidguttman

Summary

config.patch correctly writes restart-sentinel.json with sessionKey and deliveryContext. Gateway restarts and consumes the sentinel file, but scheduleRestartSentinelWake either doesn't run or silently fails — no message is delivered to the originating channel.

Steps to reproduce

  1. Call config.patch via RPC with sessionKey and deliveryContext:
openclaw gateway call config.patch --json --params '{
  "baseHash": "<hash>",
  "raw": "{\"channels\": {\"discord\": {\"streaming\": \"partial\"}}}",
  "sessionKey": "agent:main:discord:channel:<thread-id>",
  "note": "Testing restart sentinel",
  "restartDelayMs": 2000
}'
  1. Response confirms sentinel written:
{
  "sentinel": {
    "path": "/home/user/.openclaw/restart-sentinel.json",
    "payload": {
      "kind": "config-patch",
      "sessionKey": "agent:main:discord:channel:<thread-id>",
      "deliveryContext": {
        "channel": "discord",
        "to": "channel:<thread-id>",
        "accountId": "default"
      }
    }
  }
}
  1. Gateway restarts successfully
  2. Sentinel file is consumed (deleted from disk)
  3. No message appears in the originating Discord thread

Expected behavior

After restart, scheduleRestartSentinelWake should deliver a wake message to the session channel, allowing the agent to continue the conversation.

Actual behavior

Sentinel file is consumed but no message is sent. No errors in gateway logs about sentinel handling. The wake path appears to run silently without delivering.

Logs

Gateway logs show restart but no sentinel-related entries:

[gateway] signal SIGUSR1 received
[gateway] received SIGUSR1; restarting
[gateway] draining 4 active task(s) before restart
[gateway] drain timeout reached; proceeding with restart
[gateway] restart mode: full process restart (supervisor restart)

After restart, no logs mentioning sentinel, wake, or delivery to the session.

Environment

  • OpenClaw version: 2026.2.26
  • Channel: Discord (thread)
  • OS: Linux (Arch)

Notes

This breaks the agent's ability to survive gateway restarts during config changes. Previously (before recent updates), the agent would message back after restart to continue the conversation. Now the user has to manually re-engage.

Related: #21641 requests this feature, but the feature already exists via restart-sentinel — it's just not working.

Metadata

Metadata

Assignees

Labels

staleMarked as stale due to inactivity

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions