openclaw - ✅(Solved) Fix [Bug]: macOS app shows gateway version as unknown for installed CLI output with commit metadata [2 pull requests, 1 comments, 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#60925Fetched 2026-04-08 02:45:34
View on GitHub
Comments
1
Participants
1
Timeline
13
Reactions
0
Participants
Timeline (top)
referenced ×5cross-referenced ×4labeled ×2closed ×1

The macOS app can successfully use an installed OpenClaw CLI and start the gateway, but the Settings screen still shows the installed version as unknown when openclaw --version returns output with trailing commit metadata.

<img width="601" height="222" alt="Image" src="https://github.com/user-attachments/assets/1983e64c-2a7a-4802-b132-57dd7e8eb020" />

Root Cause

The macOS app can successfully use an installed OpenClaw CLI and start the gateway, but the Settings screen still shows the installed version as unknown when openclaw --version returns output with trailing commit metadata.

<img width="601" height="222" alt="Image" src="https://github.com/user-attachments/assets/1983e64c-2a7a-4802-b132-57dd7e8eb020" />

Fix Action

Fixed

PR fix notes

PR #60938: fix: macOS app shows gateway version as unknown for installed CLI output with commit metadata

Description (problem / solution / changelog)

Summary

Fixed version parsing in the macOS app to correctly handle CLI output with trailing commit metadata (e.g., OpenClaw 2026.4.2 (d74a122)).

Changes

  • Updated version parsing logic to extract semantic version from output containing commit hash in parentheses
  • Previously the parser rejected this format before reaching semantic version parsing

Testing

  • Verified fix handles the format OpenClaw 2026.4.2 (d74a122) correctly
  • Extracted version now shows as 2026.4.2 instead of unknown

Fixes openclaw/openclaw#60925

Changed files

  • apps/macos/Sources/OpenClaw/GatewayEnvironment.swift (modified, +5/-1)
  • apps/macos/Tests/OpenClawIPCTests/GatewayEnvironmentTests.swift (modified, +19/-0)
  • extensions/feishu/src/media.ts (modified, +3/-1)

PR #60942: fix: normalize macOS gateway version output with commit metadata

Description (problem / solution / changelog)

Closes #60925

Summary

  • normalize macOS gateway version output before semver parsing
  • handle CLI output like OpenClaw 2026.4.2 (d74a122)
  • add regression tests for prefixed, multiline, and commit-metadata cases

What changed

The macOS app reads the installed gateway version from openclaw --version. In practice, the CLI can return output in this format:

OpenClaw 2026.4.2 (d74a122)

This change keeps semver parsing strict and narrows the fix to the normalization step so the app extracts 2026.4.2 before parsing.

The tests cover:

  • OpenClaw-prefixed version strings
  • trailing commit metadata
  • extra surrounding whitespace / extra lines
  • preferring the OpenClaw ... line over unrelated bare semver-looking lines

Why

Without this normalization, the macOS Settings UI can show the installed CLI / gateway version as unknown even when the installed CLI is valid and the gateway is working.

Testing

  • swift test --filter GatewayEnvironmentTests from apps/macos

Screenshots

This is a narrow parsing fix and does not change layout or interaction. If maintainers prefer, I can attach before/after Settings screenshots from the macOS app.

AI disclosure

This PR was prepared with AI assistance.

Changed files

  • apps/macos/Sources/OpenClaw/GatewayEnvironment.swift (modified, +35/-5)
  • apps/macos/Tests/OpenClawIPCTests/GatewayEnvironmentTests.swift (modified, +30/-0)

Code Example

"$HOME/.openclaw/bin/openclaw" --version
3. Observe output like:  OpenClaw 2026.4.2 (d74a122)            
4. Open the macOS app and go through onboarding
5. Open Settings and check the gateway / installed version status

### Expected behavior

The app should recognize the installed CLI version and display the parsed version, for example:                                                               
                                                                                   
  - Installed: 2026.4.2                                                                                                                                         
  - gateway version resolved normally    

### Actual behavior

The app shows:                 
                                                                                                                                                                
  - Installed: unknown           
  - gateway unknown (global)                                                                                                                                    
                                                                                   
even though the CLI is installed and usable.  

### OpenClaw version

OpenClaw 2026.4.2 (d74a122)

### Operating system

MacOS 15.7.4

### Install method

mac app

### Model

no model needed

### Provider / routing chain

no provider needed

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The macOS app can successfully use an installed OpenClaw CLI and start the gateway, but the Settings screen still shows the installed version as unknown when openclaw --version returns output with trailing commit metadata.

<img width="601" height="222" alt="Image" src="https://github.com/user-attachments/assets/1983e64c-2a7a-4802-b132-57dd7e8eb020" />

Steps to reproduce

  1. Install the CLI with the standard installer, for example, under ~/.openclaw
  2. Confirm the CLI works:
    "$HOME/.openclaw/bin/openclaw" --version
  3. Observe output like: OpenClaw 2026.4.2 (d74a122)
  4. Open the macOS app and go through onboarding
  5. Open Settings and check the gateway / installed version status

Expected behavior

The app should recognize the installed CLI version and display the parsed version, for example:

  • Installed: 2026.4.2
  • gateway version resolved normally

Actual behavior

The app shows:

  • Installed: unknown
  • gateway unknown (global)

even though the CLI is installed and usable.

OpenClaw version

OpenClaw 2026.4.2 (d74a122)

Operating system

MacOS 15.7.4

Install method

mac app

Model

no model needed

Provider / routing chain

no provider needed

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

The issue appears to be in macOS-side version normalization/parsing. The CLI output includes a product prefix plus trailing commit metadata:

OpenClaw 2026.4.2 (d74a122)

The current parsing path appears to reject this format before the value reaches semantic version parsing.

A PR with a focused fix and regression tests will be linked here after submission.

extent analysis

TL;DR

The issue can be resolved by modifying the version parsing logic in the macOS app to handle the OpenClaw CLI output format, which includes trailing commit metadata.

Guidance

  • Review the current version parsing logic in the macOS app to identify where it fails to parse the OpenClaw CLI output format.
  • Update the parsing logic to extract the version number from the output string, ignoring the trailing commit metadata.
  • Consider using a regular expression or a string splitting approach to extract the version number, for example: OpenClaw (\d+\.\d+\.\d+).
  • Verify that the updated parsing logic correctly handles different version output formats, including those with and without commit metadata.

Example

# Example of how to extract the version number using a regular expression
version_output="OpenClaw 2026.4.2 (d74a122)"
version=$(echo "$version_output" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo "$version"  # Output: 2026.4.2

Notes

The issue appears to be specific to the macOS app's version parsing logic and does not affect the functionality of the OpenClaw CLI itself.

Recommendation

Apply a workaround by updating the version parsing logic in the macOS app to handle the OpenClaw CLI output format, as this will allow the app to correctly display the installed version.

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

The app should recognize the installed CLI version and display the parsed version, for example:

  • Installed: 2026.4.2
  • gateway version resolved normally

Still need to ship something?

×6

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

Back to top recommendations

TRENDING