Skip to content

Bug: Session displayName updates to last message recipient instead of session owner #4683

Description

@simeondrg

Description

When sending a message to another contact via the message tool, the session's displayName incorrectly updates to the recipient's number instead of staying as the session owner's number.

Steps to Reproduce

  1. Have a session with user A (e.g., +26269300000)
  2. Send a message to user B (e.g., +3378000000) using the message tool
  3. Check sessions_list output

Expected Behavior

displayName should remain as user A's number (+ 26269300000)

Actual Behavior

displayName changes to user B's number (+ 3378000000)

Evidence

{
  "key": "agent:main:main",
  "displayName": "+ 3378000000",  // ❌ Wrong - this is the message recipient
  "deliveryContext": {
    "to": "+ 26269300000"  // ✅ Correct session owner
  },
  "lastTo": "+ 26269300000"  // ✅ Correct
}

Impact

  • Display/UI confusion only
  • Functionality is not affected (messages route correctly)

Environment

  • OpenClaw version: 2026.1.29
  • Channel: webchat + whatsapp
  • OS: macOS (Darwin 25.1.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions