Skip to content

Feishu agent: no visible feedback between dispatch and LLM response #38837

@vulturekun

Description

@vulturekun

Summary

When a Feishu user sends a message to a bot-bound agent, the gateway logs show dispatching to agent immediately, but there is no visible feedback to the user until the LLM response arrives (typically 10-35+ seconds later). During this time, the user has no way to know if:

  • The message was received
  • The agent is processing
  • The request failed silently

This makes it difficult to distinguish between "agent is thinking" and "something broke".

Environment

  • OpenClaw version: 2026.3.2
  • Channel: Feishu (飞书) via WebSocket long connection
  • Agents: 8 Feishu-bound agents

Steps to Reproduce

  1. Send a message to a Feishu-bound agent
  2. Observe: no typing indicator, no "processing" message, just silence for 10-35s
  3. If the LLM call fails or times out, the silence extends indefinitely with no error feedback

Observed Logs

19:37:13 [feishu] feishu[7]: received message from ou_91a00afd3a110af7224d5ee9a81dc58f
19:37:13 [feishu] feishu[7]: Feishu[7] DM from ou_91a00afd3a110af7224d5ee9a81dc58f: ?
19:37:13 [feishu] feishu[7]: dispatching to agent (session=agent:xiaotang:feishu:direct:ou_91a00afd3a110af7224d5ee9a81dc58f)
19:37:13 [plugins] feishu_doc: Registered feishu_doc, feishu_app_scopes
19:37:13 [plugins] feishu_chat: Registered feishu_chat tool
...
19:37:48 [feishu] feishu[7]: dispatch complete (queuedFinal=true, replies=2)

35 seconds of silence from the user's perspective.

Diagnostic Challenges

When investigating "bot not responding" reports, the logs only show:

  1. Message received → dispatch → (gap) → complete

There is no intermediate logging for:

  • LLM request started / model selected / provider used
  • Streaming progress
  • Error/timeout if the LLM call fails

This makes it hard to tell if the delay is due to:

  • Normal LLM latency
  • Model provider being slow/down
  • Fallback chain being exercised
  • Request silently failing

Proposed Improvements

1. Typing indicator / processing feedback

Send a Feishu "typing" indicator or a brief "thinking..." message when dispatch begins, so users know the bot is alive. Many chat platforms support this:

User: 你好
Bot: [typing indicator appears]
Bot: 你好!有什么可以帮你的?

2. Enhanced dispatch logging

Add intermediate log entries during the agent turn:

[agent] xiaotang: LLM request started (model=claude-opus-4-6, provider=Downey-AI)
[agent] xiaotang: streaming response... (tokens: 150)
[agent] xiaotang: LLM request completed (1823ms, 342 tokens)

Or on failure:

[agent] xiaotang: LLM request failed (provider=Downey-AI, error=timeout), trying fallback...
[agent] xiaotang: fallback to dashscope/qwen3-coder-plus

3. Timeout notification

If an agent turn exceeds a configurable threshold (e.g., 60s), automatically send a message to the user:

"Processing is taking longer than usual, please wait..."

And if it ultimately fails:

"Sorry, I couldn't process your request. Please try again."

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions