Skip to content

[Bug] LINE channel inbound events were delayed before agent run and later drained #97435

Closed

Description

@FelixStarlite

Summary

A LINE direct conversation had multiple inbound user messages that did not trigger agent replies when they were sent. The same conversation later recovered without a configuration change, and the previously delayed messages were processed much later, followed by normal replies for newer messages.

This looks distinct from an outbound-only reply token failure: the delayed messages eventually appeared in the agent session transcript and produced replies. The observable gap was between the original LINE message timestamp and the OpenClaw agent run/response time.

Environment

  • OpenClaw version: 2026.6.10 (aa69b12)
  • Host OS: macOS
  • Channel: LINE
  • Conversation type: direct
  • Agent/session key shape: agent:order-assistant:line:direct:<redacted-line-user-id>
  • Session id observed locally: cd6d35b7-053b-4e17-b452-dc7f29703a1a
  • Model route for the affected session: gpt-5.5

Observed Timeline

All times below are Asia/Taipei local time on 2026-06-28. User/message contents are omitted or shortened because they are private; the important observation is the delay between source message time and agent processing/reply time.

LINE message timestamp Agent processing / reply observed Approx. delay
11:52:12 13:55:42 / 13:56:23 ~2h 4m
12:02:11 14:07:57 / 14:08:04 ~2h 6m
12:19:19 14:20:12 / 14:20:21 ~2h 1m
13:04:01 14:32:26 / 14:32:31 ~1h 28m
14:33:11 (/status) 14:33:13 normal
14:33:47 14:33:53 normal

After recovery, /status reported the session as active/done with queue depth 0 and the same LINE direct route.

Expected Behavior

LINE inbound messages should either start an agent run promptly, or expose a visible failure/queue state that explains why the message has not reached the agent.

Actual Behavior

Several LINE messages were not replied to near their source timestamps. They were processed much later in the same session, then subsequent messages began receiving normal replies again.

Evidence Collected

  • Local sessions_list showed the affected session as done, routed to line:U<redacted>, with the final response visible.
  • Local sessions_history and the JSONL transcript showed the delayed messages eventually entered the agent session and produced replies.
  • openclaw status --deep after the incident showed the gateway reachable, LINE configured, event loop OK, and OpenClaw up to date at 2026.6.10 (aa69b12).
  • Gateway log files available locally only contained rollover entries for the relevant day; they did not preserve a useful per-webhook receive/dispatch trace for this incident.
  • macOS unified log search around the incident window did not show relevant gateway/LINE errors.

Impact

For LINE users, messages can appear to be ignored for more than an hour, then later execute in the same agent session after the user has already continued the conversation. This is especially risky for stateful agents such as order or form assistants because stale user inputs may be processed long after their original context.

Related Existing Issues

Reproduction Status

This has only been observed once so far and is not currently reproducible on demand. The report is being filed with the available production evidence because the user-visible impact was significant and the current logs were not enough to identify the exact handoff point after the incident.

Activity

  1. clawsweeper commented on Jun 28, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 25, 2026, 3:38 AM ET / 07:38 UTC.

    Summary
    Keep open: current main still has a source-proven deferred-ingress watchdog path, while the formally linked open repair PR owns the bounded fix.

    Reproducibility: yes. —current source and focused tests establish the busy-session deferral and watchdog path, though the June production incident cannot be replayed from retained logs.

    Root-cause cluster
    Relationship: canonical
    Canonical: #97435
    Summary: This is the canonical report for the source-proven deferred-ingress liveness defect; one linked open PR is its candidate repair.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    A formally linked open repair PR already owns the concrete source-proven fix; a second repair branch would create competing shared-ingress changes.

    Review details

    Best possible solution:

    Review and land the linked repair if its deferred-liveness path preserves healthy busy-session waits while retaining the watchdog for silent or crashed handlers.

    Do we have a high-confidence way to reproduce the issue?

    Yes—current source and focused tests establish the busy-session deferral and watchdog path, though the June production incident cannot be replayed from retained logs.

    Is this the best way to solve the issue?

    Unclear—the linked repair targets the correct owner boundary, but it needs full exact-head PR review before it can be called the final best solution.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The original June LINE incident predates durable ingress, so the linked PR addresses a verified current recurrence class rather than proving that incident's forensic root cause.

    Codex review notes: model internal, reasoning high; reviewed against ebf07e56e8de.

    Label changes

    Label justifications:

    • P1: A shared channel-ingress path can silently delay or lose real user messages before an agent run.
    • impact:message-loss: A deferred inbound message can enter retry or dead-letter handling without a user-visible outcome.
    • impact:session-state: Delayed messages may be admitted well after their original conversational context.
    Evidence reviewed

    What I checked:

    Likely related people:

    • Peter Steinberger: Recent ingress-history work owns the current watchdog and LINE spool lines. (role: recent area contributor; confidence: high; commits: 4e8e22f5b17f, 1958551ff924; files: src/channels/message/ingress-drain.ts, extensions/line/src/webhook-spool.ts)
    • Ayaan Zaidi: Introduced the durable channel-ingress drain that owns the affected claim lifecycle. (role: introduced durable ingress engine; confidence: high; commits: fc6b9dad0b13; files: src/channels/message/ingress-drain.ts)
    • xingzhou: Authored recent timeout/retry work in the same shared ingress area. (role: recent adjacent contributor; confidence: medium; commits: ee79b0a49ae4; files: src/channels/message/ingress-drain.ts, src/channels/message/ingress-drain.watchdog.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P2Normal backlog priority with limited blast radius.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jun 28, 2026
  3. openclaw-barnacle commented on Jul 12, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  4. added
    staleMarked as stale due to inactivity
    and removed
    staleMarked as stale due to inactivity
    on Jul 12, 2026
  5. openclaw-barnacle commented on Jul 28, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  6. 3 remaining items

  7. added
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    P1High-priority user-facing bug, regression, or broken workflow.
    and removed
    P2Normal backlog priority with limited blast radius.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Aug 8, 2026
  8. added
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    and removed
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions