Skip to content

AgentKit shutdown bypasses FeishuChannelExtension in-flight message draining #901

Description

@fy17ohhh

Description

AgentKit applications created with:

create_agentkit_app(root_agent, enable_feishu=True)

do not actually use the lifecycle implemented by FeishuChannelExtension. AgentKit currently maintains a separate background thread and reconnect loop that calls the underlying Feishu SDK Channel's start() and stop() methods directly.

As a result, FeishuChannelExtension.start() and FeishuChannelExtension.shutdown() are bypassed. During application shutdown, in-flight Feishu messages are not drained before the process exits.

Current Behaviour:
Image

The following expected logs are absent:

GRACEFUL_TEST_TOOL_COMPLETED
Shutting down Feishu channel: closing WebSocket and draining 1 in-flight message(s)...
Feishu channel drained; shutdown complete.

And the user will not receive the final Feishu reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions