Skip to content

Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2) #972

@zhangyanbo2007

Description

@zhangyanbo2007

Bug Description

After every daemon restart, cc-connect permanently ignores ALL Feishu messages, logging "feishu: ignoring old message after restart" for every incoming message — even messages sent minutes after the restart. This makes the Feishu bot completely unresponsive after any restart.

Reproduction Steps

  1. Start cc-connect with a Feishu platform: cc-connect --force
  2. Wait for WebSocket connection to establish
  3. Send any message (e.g. /list) from Feishu chat
  4. Observe in logs: feishu: ignoring old message after restart
  5. The message is never processed — /list returns nothing, no responses are sent
  6. All subsequent messages are also ignored — the bug is permanent, not temporary

Expected Behavior

Messages sent AFTER the daemon restart should be processed normally. Only truly duplicate/stale messages from before the restart should be filtered.

Environment

  • cc-connect v1.3.3-beta.2 (commit f6a1a79)
  • Platform: Feishu
  • OS: Linux

Attempted Workarounds (all failed)

  • Setting past_id_tracking = False in session JSON — daemon ignores this field, filtering persists
  • Waiting 10+ seconds after restart before sending messages — still filtered
  • Multiple restart cycles — bug persists on every restart
  • Setting past_id_tracking = False before daemon startup (so it reads False from disk) — still ignored

Log Evidence

time=2026-05-13T15:05:51 level=INFO msg="cc-connect is running"
2026/05/13 15:05:51 [Info] [connected to wss://msg-frontier.feishu.cn...]

# Message sent 2 minutes AFTER restart:
time=2026-05-13T15:07:51 level=DEBUG msg="feishu: ignoring old message after restart" create_time=1778655883913

# Message sent 3 minutes AFTER restart — still ignored:
time=2026-05-13T15:08:19 level=DEBUG msg="feishu: ignoring old message after restart" create_time=1778655912439

# Messages sent 7+ minutes after restart — still ignored:
time=2026-05-13T15:13:30 level=DEBUG msg="feishu: ignoring old message after restart" create_time=1778656222589

Analysis

The past_id_tracking mechanism appears to permanently filter all incoming messages after startup, regardless of when the messages were actually created. The JSON field past_id_tracking does not control this behavior — the daemon's internal filtering logic is separate and cannot be disabled externally.

The filtering logic seems to use a timestamp cutoff that is set incorrectly on startup, causing it to reject all subsequent messages rather than just the initial WebSocket replay batch.

Impact

This makes cc-connect completely unusable for Feishu after any daemon restart — including normal operations like config changes, session management, or system updates that require a restart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions