Skip to content

Codex runtime: duplicate Lark DM replies #447

@voyax

Description

@voyax

Summary

When running on the Codex runtime, the bot sends duplicate replies to the same Lark DM message.

Reported Behavior

  • User sends a single DM in Lark
  • Bot replies with the same response twice
  • This happens consistently, not just occasionally

Environment

  • Runtime: Codex
  • Channel: Lark DM
  • Agent type: zylos

Possible Causes

  1. C4 dispatcher delivering the same message twice: The inbound message may be queued and delivered to the Codex session twice (e.g., retry logic treating a slow ack as a failure)
  2. Codex processing the message twice: The Codex session may process the same prompt twice due to context/session handling
  3. Send script called twice: The outbound c4-send.js may be invoked twice for the same response (e.g., both a streaming partial and a final response)
  4. Lark component dedup failure: The Lark component's processedMessages map may fail to deduplicate under certain timing conditions with Codex's processing model

Next Steps

  • Check c4-dispatcher logs for duplicate delivery of the same inbound message
  • Check Codex session logs for duplicate prompt processing
  • Check Lark outbound logs for duplicate send calls
  • Verify the processedMessages dedup window (currently 10 minutes, 500 entries max) is sufficient

Workaround

None known yet. Need on-site debugging to identify the exact duplication point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions