Skip to content

Bug: Multi-agent Feishu accounts broken - session path resolves to default agent only #15246

@solfx

Description

@solfx

Summary

When configuring multiple Feishu bot accounts bound to different agents, only the main (default) agent can process messages. Non-default agents fail silently due to a session file path resolution error.

Environment

  • OpenClaw: v2026.2.12
  • Channel: Feishu (WebSocket mode)
  • OS: macOS (ARM64)

Configuration

{
  "channels": {
    "feishu": {
      "accounts": {
        "red": { "appId": "cli_xxx1" },
        "content": { "appId": "cli_xxx2" },
        "game": { "appId": "cli_xxx3" },
        "english": { "appId": "cli_xxx4" }
      }
    }
  },
  "bindings": [
    { "agentId": "red", "match": { "channel": "feishu", "accountId": "red" } },
    { "agentId": "content", "match": { "channel": "feishu", "accountId": "content" } }
  ]
}

Root Cause

In reply-B5GoyKpI.js:63597:

const sessionFile = resolveSessionFilePath(sessionIdFinal, sessionEntry);

This call does not pass agentId or storePath (both available in the same function scope), causing sessionsDir to always fallback to DEFAULT_AGENT_ID ("main"). Non-"main" agents hit a path validation error.

Actual Behavior

  • All 4 Feishu WebSocket connections establish successfully
  • Only the "main" agent can process incoming messages
  • Other agents (content, game, english) silently fail with session path errors
  • openclaw status shows non-main agents stuck in "bootstrapping" state indefinitely

Expected Behavior

Each agent should correctly resolve its own session directory and independently handle messages from its bound Feishu account.

Suggested Fix

Pass { agentId } or { sessionsDir: path.dirname(storePath) } to resolveSessionFilePath() so each agent resolves to its own session directory.

Workaround

Use a single agent (id: "main") for all Feishu bots, differentiating behavior via system prompt / workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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