Fix OpenClaw Config Array Error Guide | Generated by AI

Home 2026.03

Question: How to fix the OpenClaw config error where tools.elevated.allowFrom.webchat expects an array but received a boolean?

Answer:

The error means your current OpenClaw configuration file has an invalid value for the tools.elevated.allowFrom.webchat setting.

Current (broken) situation — most likely looks like this in your config:

"tools": {
  "elevated": {
    "enabled": true,
    "allowFrom": {
      "webchat": true,
      ...
    }
  }
}

Correct formatallowFrom expects an object where each key (channel name) maps to an array of allowed origins/roles/users, not a simple boolean.

Quick Fix

Edit your OpenClaw config file (commonly config.json, openclaw.json, .openclaw/config.json, or similar — check your installation directory or documentation).

Change this part:

"tools": {
  "elevated": {
    "enabled": true,
    "allowFrom": {
      "webchat": true                   wrong
    }
  }
}

to one of these valid formats:

Option 1: Allow everyone from webchat channel (most common fix)

"tools": {
  "elevated": {
    "enabled": true,
    "allowFrom": {
      "webchat": ["*"]               // wildcard = allow all users from webchat
    }
  }
}

Option 2: Allow only specific users/roles (more secure)

"tools": {
  "elevated": {
    "enabled": true,
    "allowFrom": {
      "webchat": [
        "user:admin",
        "user:your-username",
        "role:admin",
        "role:developer"
      ]
    }
  }
}

Option 3: Allow from multiple channels

"tools": {
  "elevated": {
    "enabled": true,
    "allowFrom": {
      "webchat": ["*"],
      "discord": ["*"],
      "telegram": ["user:botadmin"]
    }
  }
}

Steps to Apply the Fix

  1. Locate the config file
    • Usually in ~/.openclaw/, /etc/openclaw/, or the directory where you run openclaw
    • Run openclaw config path if the command exists, or check the startup logs
  2. Open the file in an editor
    nano ~/.openclaw/config.json    # or use vim, code, etc.
    
  3. Make the change shown above

  4. Save and exit

  5. Validate & restart
    openclaw doctor                # should now pass or show other issues
    openclaw restart               # or systemctl restart openclaw if running as service
    
  6. Test
    Try the command again:
    openclaw doctor --fix
    

If openclaw doctor has an auto-repair mode that can fix schema issues, you can also try:

openclaw doctor --repair-config

or just

openclaw doctor

and follow any interactive prompts it may offer.

Notes

After fixing this, the gateway should start correctly and you can retry giving elevated/shell access to the agent if that’s still your goal.

References:


Back Donate