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
- 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)
- Codex processing the message twice: The Codex session may process the same prompt twice due to context/session handling
- 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)
- 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.
Summary
When running on the Codex runtime, the bot sends duplicate replies to the same Lark DM message.
Reported Behavior
Environment
Possible Causes
c4-send.jsmay be invoked twice for the same response (e.g., both a streaming partial and a final response)processedMessagesmap may fail to deduplicate under certain timing conditions with Codex's processing modelNext Steps
processedMessagesdedup window (currently 10 minutes, 500 entries max) is sufficientWorkaround
None known yet. Need on-site debugging to identify the exact duplication point.