openclaw - 💡(How to fix) Fix Expose gateway version in gateway status / MCP gateway_status output [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#56222Fetched 2026-04-08 01:43:23
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Code Example

{
  "service": "...",
  "gateway": {
    "version": "..."
  }
}
RAW_BUFFERClick to expand / collapse

Problem

openclaw gateway status is the documented first-line operator check for runtime and RPC state, but its JSON output does not expose the running gateway version.

That makes post-update smoke tests harder than they need to be. After an update, the status surface can confirm that a gateway is running and reachable, but it cannot confirm which version is actually serving traffic.

This is especially useful for:

  • post-update verification
  • detecting CLI/service skew
  • confirming a restarted daemon picked up the expected build
  • MCP smoke tests that want a single structured status response

Evidence

Local docs position openclaw gateway status as the operator-facing runtime check:

  • docs/help/troubleshooting.md
  • docs/help/faq.md

Observed current JSON output from openclaw gateway status --json includes:

  • service
  • config
  • gateway
  • port
  • rpc
  • health
  • extraServices

But it does not include a version string anywhere in the response.

Request

At minimum, something like this would solve the smoke-test gap:

{
  "service": "...",
  "gateway": {
    "version": "..."
  }
}

If there is already a distinction available internally, even better would be to include the runtime gateway version explicitly, and optionally CLI/service metadata separately.

Why this helps

A version field in status would make post-update verification much cleaner:

  • one call can confirm the gateway is up
  • one call can confirm the expected version is actually running
  • automated smoke tests no longer need a second version-specific probe or log scrape

extent analysis

Fix Plan

To address the issue, we need to modify the openclaw gateway status command to include the gateway version in its JSON output. Here are the steps:

  • Modify the openclaw gateway status command to query the gateway version
  • Update the JSON output to include the gateway version
  • Optionally, include CLI/service metadata separately

Example code changes:

# Get the gateway version
gateway_version = get_gateway_version()

# Update the JSON output
status_output = {
    "service": "...",
    "gateway": {
        "version": gateway_version
    },
    "config": "...",
    "port": "...",
    "rpc": "...",
    "health": "...",
    "extraServices": "..."
}

# Optionally, include CLI/service metadata
cli_version = get_cli_version()
service_version = get_service_version()
status_output["gateway"]["cli_version"] = cli_version
status_output["gateway"]["service_version"] = service_version

# Return the updated JSON output
return json.dumps(status_output)

Verification

To verify that the fix worked, run the openclaw gateway status --json command and check that the JSON output includes the gateway version:

{
  "service": "...",
  "gateway": {
    "version": "..."
  },
  "config": "...",
  "port": "...",
  "rpc": "...",
  "health": "...",
  "extraServices": "..."
}

Optionally, check that the CLI/service metadata is included:

{
  "service": "...",
  "gateway": {
    "version": "...",
    "cli_version": "...",
    "service_version": "..."
  },
  "config": "...",
  "port": "...",
  "rpc": "...",
  "health": "...",
  "extraServices": "..."
}

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…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING