Skip to content

Feature Request: openclaw agent --url <gateway-url> flag for multi-gateway setups #53945

Description

@kiagentkronos-cell

Problem

When running multiple OpenClaw agents on the same machine (each with its own Gateway on a different port), the openclaw agent CLI always connects to a hardcoded local port (18789) and ignores gateway.remote.url from the config file.

This makes it impossible for one agent to trigger another agent's Gateway directly via CLI — which is the documented approach for bot-to-bot communication.

Current behavior

OPENCLAW_CONFIG_PATH=/root/.openclaw-poseidon/openclaw.json openclaw agent --agent main --message "Hello" --deliver

Even with gateway.remote.url: ws://127.0.0.1:19000 set in the config, the CLI connects to ws://127.0.0.1:18789 (default port) and fails with:

gateway connect failed: unauthorized: gateway token mismatch
Gateway target: ws://127.0.0.1:18789

Expected behavior

Either:

  1. A --url <ws://host:port> flag to explicitly target a specific Gateway
  2. OR: The CLI respects gateway.remote.url from the specified config file

Use case

Multi-agent Council setup: Three OpenClaw agents (Kronos, Poseidon, Hades) each on their own port, communicating through a shared Discord channel. Agent A wants to trigger Agent B's session with --deliver to post a reply in the channel.

Workaround

Currently no clean workaround. sessions_send works inter-session but does NOT post visibly to Discord. openclaw message send can post to Discord but does not trigger the agent logic.

Environment

  • OpenClaw version: 2026.3.23-2
  • OS: Ubuntu 24.04
  • Setup: 3 agents on ports 18789, 19000, 18790

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions