Skip to content

[Bug]: Duplicate message ingestion - all inbound messages appear 2x in session context #10377

@jkim789

Description

@jkim789

Duplicate message ingestion - all inbound messages appear 2x in session context

Environment

• OpenClaw version: 2026.2.3-1 (latest npm release)
• OS: Linux 6.8.0-94-generic (x64)
• Node: 22.22.0
• Install method: npm/pnpm (not git checkout)
• Gateway mode: local (bind=lan)
• Channels affected: Telegram, WebUI
Description

Every inbound message (from any channel) appears exactly twice in the session context with the same message_id. This is 100% reproducible and affects all message types.

Reproduction Steps

  1. Fresh install of OpenClaw 2026.2.3-1
  2. Configure Telegram channel (or use WebUI)
  3. Send any message
  4. Result: Message appears twice in agent context
    Example
    [Telegram O (@***) id: 2026-02-06 12:02 UTC] test message
    [message_id: 1388]

[Telegram O (@********) id:******* 2026-02-06 12:02 UTC] test message
[message_id: 1388]
Expected Behavior

Each message should appear once in the session context.

Actual Behavior

Each message appears twice (same message_id duplicated).

What We Tried

  1. ✅ Gateway restart (config.apply) → Temporarily fixed (1-2 messages), then regressed
  2. ✅ Removed duplicate plugin config (plugins.entries.telegram) → No effect
  3. ✅ Ran openclaw doctor → No errors detected
  4. ✅ Checked for updates → Already on latest (2026.2.3-1)
  5. ✅ Full stop/start → No effect
    Configuration

• Single channels.telegram enabled (plugin disabled)
• Single gateway process running (confirmed via ps)
• Default agent configuration
• Session: agent:main:main
Diagnosis

• Not a config issue (removing plugin had no effect)
• Not transient state (persists across restarts)
• Likely internal bug: Duplicate event handlers registered within gateway process, or session context builder fetching messages twice from storage
Impact

• Agent receives duplicate messages in every turn
• Token usage doubled
• Context pollution
Possible Workaround

Unknown. Creating a fresh agent/session may help if session-specific corruption.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked 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