Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@John-Rood
Copy link
Contributor

@John-Rood John-Rood commented Jan 20, 2026

Problem

After gateway restart, wake message routes to terminal instead of originating channel (Slack, etc).

Root Cause

Race condition: session store might not flush to disk before SIGUSR1 fires.

Fix

Pass channel + threadId through the restart sentinel. On wake, use sentinel values for routing.

No session store manipulation — just route the wake message, then normal flow takes over.

Changes

File Change
gateway-tool.ts Extract channel/to + threadId at restart
restart-sentinel.ts Add threadId to payload type
server-restart-sentinel.ts Use sentinel context, pass threadId
agent/types.ts Add replyToId option
agent/delivery.ts Wire replyToId through

Testing

  1. Start conversation in Slack
  2. Trigger gateway restart
  3. Verify wake message routes back to Slack thread

@John-Rood John-Rood force-pushed the fix/restart-channel-routing branch from 2a1bb40 to 6d10488 Compare January 20, 2026 22:07
steipete added a commit that referenced this pull request Jan 21, 2026
@steipete steipete force-pushed the fix/restart-channel-routing branch from debf210 to 17f3635 Compare January 21, 2026 01:21
@steipete steipete merged commit 12168dc into openclaw:main Jan 21, 2026
34 of 42 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test (fails: missing nostr-tools in extensions/nostr)
  • Land commit: 17f3635
  • Merge commit: 12168dc

Thanks @John-Rood!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants