Skip to content

[Bug]: active-memory fails in Telegram forum topic sessions with directory-name validation error #76704

@hanyizuo

Description

@hanyizuo

Summary

When Active Memory is enabled for group chats, Telegram forum-topic sessions fail during active-memory recall with:

Error: Bundled plugin dirName must be a single directory: <telegram-topic-conversation-id>

The main symptom is that active-memory starts for a Telegram topic session and then fails before recall completes. The workaround is to disable Active Memory for group chat types.

Environment

  • OpenClaw: 2026.5.2
  • Runtime: Linux systemd user gateway
  • Channel: Telegram supergroup with forum topics
  • Plugins loaded: bundled active-memory, bundled memory-core
  • Active Memory model resolution: inherited session/agent model

Relevant config shape

{
  "plugins": {
    "entries": {
      "active-memory": {
        "enabled": true,
        "config": {
          "enabled": true,
          "agents": ["main"],
          "allowedChatTypes": ["direct", "group"],
          "queryMode": "recent",
          "promptStyle": "balanced",
          "timeoutMs": 15000,
          "maxSummaryChars": 220,
          "persistTranscripts": false,
          "logging": true
        }
      }
    }
  }
}

Steps to reproduce

  1. Configure a Telegram supergroup with forum topics.
  2. Enable Active Memory for group chats via allowedChatTypes: ["direct", "group"].
  3. Send a message in a Telegram forum topic that triggers an assistant reply.

Expected behavior

Active Memory should run successfully for the topic session, or skip safely without affecting the main response.

Actual behavior

Gateway logs show Active Memory starting, then failing with a directory-name validation error. Sanitized excerpt:

active-memory: agent=main session=agent:main:telegram:group:<group-id>:topic:<topic-id> activeProvider=<provider> activeModel=<model> start timeoutMs=15000 queryChars=...
lane task error: lane=main durationMs=... error="Error: Bundled plugin dirName must be a single directory: <group-id>:topic:<topic-id>"
lane task error: lane=session:agent:main:telegram:group:<group-id>:topic:<topic-id>:active-memory:<hash> durationMs=... error="Error: Bundled plugin dirName must be a single directory: <group-id>:topic:<topic-id>"
active-memory: agent=main session=agent:main:telegram:group:<group-id>:topic:<topic-id> ... failed error=Bundled plugin dirName must be a single directory: <group-id>:topic:<topic-id>

Workaround

Set Active Memory back to direct-only:

"allowedChatTypes": ["direct"]

Suspected cause

The Telegram topic conversation id contains colon separators, e.g. <group-id>:topic:<topic-id>, and appears to reach a bundled-plugin directory-name validation path without being sanitized/encoded first.

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