Skip to content

openclaw plugin: reads legacy api.config; verbose setting has no effect #4358

Open

Description

@gaowei68cn

TITLE: openclaw plugin: reads legacy api.config; verbose setting has no effect

Summary

openclaw/index.ts reads its configuration from api.config:

const pluginConfig = api.config ?? {};
const verbose = pluginConfig.verbose === true;

OpenClaw's current plugin API exposes resolved settings as api.pluginConfig (docs: "Read your plugin's resolved settings from api.pluginConfig inside the registration closure"). On 2026.9.6 api.config exists but does not carry the plugin's config entry from openclaw.json, so:

  • verbose: true in config never enables the rewrite/approval logging
  • the plugin silently behaves as enabled: true, verbose: false regardless of config

Reproduction

  1. Set plugins.entries.rtk-rewrite.config.verbose: true in openclaw.json
  2. Restart / reload the plugin
  3. Trigger an exec that matches an RTK rule — no [rtk] <cmd> -> <rtk cmd> console line appears

Instrumenting register() confirmed api.config does not contain the configured verbose value (while api.pluginConfig is present).

Suggested fix

const pluginConfig = (api as any).pluginConfig ?? (api as any).config ?? {};

(fallback keeps compatibility with older hosts that only provide api.config).

Environment

  • Host: OpenClaw 2026.9.6 (eb377ac)
  • rtk: develop branch @ 6d4b77e

Activity

  1. rtk-wshm-sync-bot commented on Sep 30, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 90%

    Summary

    OpenClaw plugin reads legacy api.config instead of api.pluginConfig, so the verbose config setting is silently ignored on OpenClaw 2026.9.6.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • openclaw/index.ts

    Suggested Actions

    1. Apply the suggested fix: read api.pluginConfig with fallback to api.config in openclaw/index.ts
    2. Cross-check against openclaw plugin: packaging fixes for OpenClaw 2026.9.6 compatibility (openclaw.extensions + activation.onStartup) #4357 (same plugin, OpenClaw 2026.9.6 compat fixes) for a combined patch
    3. Verify against PR fix(openclaw): let the host own approval without losing RTK's deny gate #3909 / issue rewrite: host-scoped permission authority so plugin hosts stop adding a second approval gate #3908 which also touched openclaw host integration

    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configbuggood first issuepriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions