Skip to content

Discord sessions not persisting - new session ID per message in same channel #16333

@oh-ashen-one

Description

@oh-ashen-one

Bug

On Windows (10.0.22631, node v24.13.0, OpenClaw 2026.2.13), Discord channel sessions lose all conversation context between messages. Each message in the same channel creates a new session ID instead of reusing the existing one.

Evidence from logs

Sequential messages in the same Discord channel (#general, channel ID 1468834856187203680) produce different session IDs:

  • Message 1: sessionId=c3a2393d-6239-421f-97da-5d768d3ba644
  • Message 2 (seconds later): sessionId=745f3245-79d8-4839-b2f1-d636408ed5eb

Both have sessionKey=unknown in the diagnostic logs, which seems wrong — the session key should be agent:main:discord:channel:1468834856187203680.

Observed behavior

  • Bot wakes up fresh every message with no memory of prior conversation
  • Gateway/main session memory works fine (13% context used, persists correctly)
  • Only Discord channel sessions are affected
  • openclaw status shows multiple stale Discord sessions for the same channel

Expected behavior

Messages in the same Discord channel should reuse the same session, maintaining conversation context.

Environment

  • OS: Windows 10.0.22631 (x64)
  • Node: v24.13.0
  • OpenClaw: 2026.2.13 (203b5bd)
  • Channel: Discord (bot token auth)
  • Model: claude-opus-4-6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions