openclaw - ✅(Solved) Fix active-memory: allowedChatTypes silently strips "explicit" sessions [1 pull requests, 2 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#65775Fetched 2026-04-14 05:40:21
View on GitHub
Comments
2
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
commented ×2cross-referenced ×1

Error Message

The "explicit" session type (used for portal/webchat and named session bindings) is silently dropped. Users who add "explicit" to allowedChatTypes in their config see no error, but active memory never runs in those sessions. 2. An error/warning is surfaced when an unrecognized chat type is configured

Fix Action

Fixed

PR fix notes

PR #66285: fix: support explicit active-memory chat types

Description (problem / solution / changelog)

Summary

  • allow allowedChatTypes to accept "explicit" in the active-memory plugin schema and runtime config normalization
  • treat agent:...:explicit:... sessions as an explicit chat type during gating
  • add regression coverage for schema validation and explicit-session execution

Closes #65775.

AI Assistance

  • AI-assisted: Codex
  • Testing: fully tested locally on targeted lanes
<details> <summary>Before</summary>
$ node --import tsx -e "import fs from 'node:fs'; import { validateJsonSchemaValue } from './src/plugins/schema-validator.js'; const manifest=JSON.parse(fs.readFileSync('./extensions/active-memory/openclaw.plugin.json','utf-8')); const result=validateJsonSchemaValue({schema:manifest.configSchema,cacheKey:'active-memory-before',value:{enabled:true,agents:['main'],allowedChatTypes:['direct','explicit']}}); console.log(JSON.stringify({ok:result.ok, errors:result.errors?.map((e)=>e.message)}, null, 2));"
{
  "ok": false,
  "errors": [
    "must be equal to one of the allowed values (allowed: \"direct\", \"group\", \"channel\")"
  ]
}
</details> <details> <summary>After</summary>
$ node --import tsx -e "import fs from 'node:fs'; import { validateJsonSchemaValue } from './src/plugins/schema-validator.js'; const manifest=JSON.parse(fs.readFileSync('./extensions/active-memory/openclaw.plugin.json','utf-8')); const result=validateJsonSchemaValue({schema:manifest.configSchema,cacheKey:'active-memory-after',value:{enabled:true,agents:['main'],allowedChatTypes:['direct','explicit']}}); console.log(JSON.stringify({ok:result.ok, errors:result.errors?.map((e)=>e.message)}, null, 2));"
{
  "ok": true
}

$ node scripts/run-vitest.mjs run --config test/vitest/vitest.extensions.config.ts extensions/active-memory/index.test.ts extensions/active-memory/config.test.ts
EXIT:0
</details>

Test plan

  • targeted schema validation for allowedChatTypes: ["direct", "explicit"]
  • targeted active-memory extension tests

Changed files

  • extensions/active-memory/config.test.ts (modified, +28/-0)
  • extensions/active-memory/index.test.ts (modified, +25/-0)
  • extensions/active-memory/index.ts (modified, +10/-4)
  • extensions/active-memory/openclaw.plugin.json (modified, +2/-2)

Code Example

raw.allowedChatTypes.filter((value) =>
  value === "direct" || value === "group" || value === "channel"
)
RAW_BUFFERClick to expand / collapse

Version: 2026.4.10

Problem

In extensions/active-memory/index.js, the normalizePluginConfig function whitelist-filters allowedChatTypes to only "direct" | "group" | "channel":

raw.allowedChatTypes.filter((value) =>
  value === "direct" || value === "group" || value === "channel"
)

The "explicit" session type (used for portal/webchat and named session bindings) is silently dropped. Users who add "explicit" to allowedChatTypes in their config see no error, but active memory never runs in those sessions.

Expected

Either:

  1. "explicit" is a supported value for allowedChatTypes and active memory fires in explicit sessions, OR
  2. An error/warning is surfaced when an unrecognized chat type is configured

Suggestion

Extend the filter to include "explicit", or replace the whitelist with a more permissive validation that warns on unknown values rather than silently discarding them. Users with webchat/portal sessions need active memory too.

extent analysis

TL;DR

Update the normalizePluginConfig function to either include "explicit" in the allowedChatTypes whitelist or replace the whitelist with a more permissive validation that warns on unknown values.

Guidance

  • Extend the existing filter to include "explicit": raw.allowedChatTypes.filter((value) => ["direct", "group", "channel", "explicit"].includes(value))
  • Replace the whitelist with a more permissive validation that warns on unknown values, such as using a Set to check for known values and logging a warning for unknown values
  • Consider adding input validation to the allowedChatTypes configuration to prevent unrecognized chat types from being set
  • Review the requirements for active memory in explicit sessions to ensure the updated implementation meets the necessary functionality

Example

const knownChatTypes = new Set(["direct", "group", "channel", "explicit"]);
raw.allowedChatTypes = raw.allowedChatTypes.filter((value) => {
  if (!knownChatTypes.has(value)) {
    console.warn(`Unrecognized chat type: ${value}`);
  }
  return knownChatTypes.has(value);
});

Notes

The updated implementation should be tested to ensure it correctly handles the "explicit" session type and provides the expected functionality for users with webchat/portal sessions.

Recommendation

Apply workaround: Update the normalizePluginConfig function to include "explicit" in the allowedChatTypes whitelist or replace the whitelist with a more permissive validation, as this will provide the necessary functionality for users with webchat/portal sessions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix active-memory: allowedChatTypes silently strips "explicit" sessions [1 pull requests, 2 comments, 1 participants]