openclaw - 💡(How to fix) Fix [Bug]: config.patch fails for Telegram group IDs (negative numeric keys in path) [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#59934Fetched 2026-04-08 02:38:38
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

gateway config.patch returns "invalid config" errors when attempting to set per-group configuration using negative Telegram group IDs in the path. For example:

channels.telegram.groups.-5028303500.requireMention = false

The negative group ID (standard Telegram format for supergroups) appears to not be handled correctly in the config patch path parser.

Error Message

  1. Observe: "invalid config" error Returns "invalid config" error. Workaround: manually edit openclaw.json and restart/reload. Agents cannot self-configure group settings via the standard config.patch tool. This forces manual file editing, which is error-prone and breaks the self-service configuration flow. Every Telegram supergroup has a negative ID, so this affects all group-specific configuration.

Root Cause

gateway config.patch returns "invalid config" errors when attempting to set per-group configuration using negative Telegram group IDs in the path. For example:

channels.telegram.groups.-5028303500.requireMention = false

The negative group ID (standard Telegram format for supergroups) appears to not be handled correctly in the config patch path parser.

Fix Action

Fix / Workaround

gateway config.patch returns "invalid config" errors when attempting to set per-group configuration using negative Telegram group IDs in the path. For example:

The negative group ID (standard Telegram format for supergroups) appears to not be handled correctly in the config patch path parser.

  1. Have a Telegram group with a negative ID (e.g., -5028303500)
  2. Attempt to use gateway config.patch to set group-specific config:
    {
      "channels": {
        "telegram": {
          "groups": {
            "-5028303500": {
              "requireMention": false
            }
          }
        }
      }
    }
  3. Observe: "invalid config" error

Code Example

channels.telegram.groups.-5028303500.requireMention = false

---

{
     "channels": {
       "telegram": {
         "groups": {
           "-5028303500": {
             "requireMention": false
           }
         }
       }
     }
   }
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

gateway config.patch returns "invalid config" errors when attempting to set per-group configuration using negative Telegram group IDs in the path. For example:

channels.telegram.groups.-5028303500.requireMention = false

The negative group ID (standard Telegram format for supergroups) appears to not be handled correctly in the config patch path parser.

Steps to reproduce

  1. Have a Telegram group with a negative ID (e.g., -5028303500)
  2. Attempt to use gateway config.patch to set group-specific config:
    {
      "channels": {
        "telegram": {
          "groups": {
            "-5028303500": {
              "requireMention": false
            }
          }
        }
      }
    }
  3. Observe: "invalid config" error

Expected behavior

config.patch should accept negative numeric keys in object paths, since Telegram group IDs are always negative for supergroups.

Actual behavior

Returns "invalid config" error. Workaround: manually edit openclaw.json and restart/reload.

Impact

Agents cannot self-configure group settings via the standard config.patch tool. This forces manual file editing, which is error-prone and breaks the self-service configuration flow. Every Telegram supergroup has a negative ID, so this affects all group-specific configuration.

Environment

  • OpenClaw version: AgentiMolt (current as of 2026-03-31)
  • Channel: Telegram
  • Group ID: -5028303500
  • Agent: Dave (@internetdavebot_molt_bot)
  • Reported by: Devin Villegas

Possible cause

The config path parser may be interpreting the leading - as an invalid character or attempting to parse the negative number as an array index rather than an object key.

extent analysis

TL;DR

Update the config patch path parser to correctly handle negative numeric keys, allowing for proper configuration of Telegram supergroups.

Guidance

  • Verify that the issue is indeed caused by the parser's handling of negative numbers by attempting to configure a group with a positive ID.
  • Check the parser's documentation or source code to see if there are any existing provisions for handling negative keys or if there's a known workaround.
  • Consider implementing a temporary workaround by modifying the config patch tool to automatically convert negative group IDs to a compatible format, such as wrapping them in quotes or using a different delimiter.
  • Test the fix by attempting to configure a Telegram supergroup using the updated parser and verifying that the configuration is applied correctly.

Example

{
  "channels": {
    "telegram": {
      "groups": {
        "-5028303500": {
          "requireMention": false
        }
      }
    }
  }
}

This example configuration should be parsed correctly by the updated parser, allowing for successful configuration of the Telegram supergroup.

Notes

The provided information suggests that the issue is specific to the config patch path parser and its handling of negative numeric keys. However, without access to the parser's source code or documentation, it's difficult to provide a more detailed solution.

Recommendation

Apply a workaround by modifying the config patch tool to handle negative group IDs correctly, as this will allow for immediate resolution of the issue and enable self-service configuration for Telegram supergroups.

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…

FAQ

Expected behavior

config.patch should accept negative numeric keys in object paths, since Telegram group IDs are always negative for supergroups.

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 - 💡(How to fix) Fix [Bug]: config.patch fails for Telegram group IDs (negative numeric keys in path) [1 participants]