Skip to content

[Bug]: Config warnings logged repeatedly on every reload, spamming error log with thousands of duplicates #25574

@mcaxtr

Description

@mcaxtr

Summary

Config warnings (e.g., "plugin disabled but config is present") are logged on every config reload cycle (~10-15 seconds), producing thousands of duplicate entries in long-running gateway processes.

Steps to reproduce

  1. Create a config with a disabled plugin that still has config present:
    {
      "plugins": {
        "entries": {
          "discord": { "enabled": false, "config": {} }
        }
      }
    }
  2. Start OpenClaw gateway
  3. Let it run for several hours
  4. Check ~/.openclaw/logs/gateway.err.log

Expected behavior

Config warnings should be logged once per unique warning. If the warning content changes (e.g., different plugin disabled), a new warning should be logged. If a warning disappears and reappears, it should be re-logged.

Actual behavior

The same warning message is logged repeatedly on every config reload cycle (every ~10-15 seconds). Over a few days, this produces 7,925+ identical log entries, making the error log noisy and difficult to read.

Example from error log showing repeated entries:

Config warnings:
- plugins.entries.discord: plugin disabled (disabled in config) but config is present
Config warnings:
- plugins.entries.discord: plugin disabled (disabled in config) but config is present
Config warnings:
- plugins.entries.discord: plugin disabled (disabled in config) but config is present
... (repeated 7,925+ times)

OpenClaw version

2026.2.23

Operating system

All platforms (Linux, macOS, Windows)

Install method

npm global / pnpm dev / docker / mac app

Logs, screenshots, and evidence

In a gateway process running for a few days:

$ grep -c "plugin disabled" ~/.openclaw/logs/gateway.err.log
7925

Impact and severity

Additional information

Root cause: In src/config/io.ts, config errors are deduplicated using loggedInvalidConfigs Set, but warnings have NO deduplication:

if (validated.warnings.length > 0) {
  const details = validated.warnings
    .map((iss) => `- ${iss.path || "<root>"}: ${iss.message}`)
    .join("\n");
  deps.logger.warn(`Config warnings:\\n${details}`);  // Logs every reload!
}

The config file watcher (chokidar) triggers loadConfig() every ~10-15 seconds, causing this warning to be re-generated and re-logged on every cycle.

Related to #19428 which describes severe performance impact from the same root cause.

Metadata

Metadata

Assignees

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