Skip to content

πŸ™Œ OpenHands: AI-Driven Development

Fix CLI binary GLIBC compatibility for older Linux systems (#11337)

Rohit Malhotra609fefc1b69b
diff --git a/.github/workflows/cli-build-binary-and-optionally-release.yml b/.github/workflows/cli-build-binary-and-optionally-release.yml
index a3a236fa44..6c319bb67f 100644
--- a/.github/workflows/cli-build-binary-and-optionally-release.yml
+++ b/.github/workflows/cli-build-binary-and-optionally-release.yml
@@ -21,11 +21,19 @@ concurrency:
cancel-in-progress: true
jobs:
- build-and-test-binary:
- name: Build and test binary executable
+ build-binary:
+ name: Build binary executable
strategy:
matrix:
- os: [ubuntu-latest, macos-latest]
+ include:
+ # Build on Ubuntu 22.04 for maximum GLIBC compatibility (GLIBC 2.31)
+ - os: ubuntu-22.04
+ platform: linux
+ artifact_name: openhands-cli-linux
+ # Build on macOS for macOS users
+ - os: macos-15
+ platform: macos
+ artifact_name: openhands-cli-macos
runs-on: ${{ matrix.os }}
steps:
@@ -63,18 +71,17 @@ jobs:
echo "βœ… Build & test finished without ❌ markers"
- - name: Upload binary artifact (for releases only)
- if: startsWith(github.ref, 'refs/tags/')
+ - name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
- name: openhands-cli-${{ matrix.os }}
+ name: ${{ matrix.artifact_name }}
path: openhands-cli/dist/openhands*
retention-days: 30
create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
- needs: build-and-test-binary
+ needs: build-binary
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout repository
@@ -88,12 +95,12 @@ jobs:
- name: Prepare release assets
run: |
mkdir -p release-assets
- # Rename binaries to include OS in filename
- if [ -f artifacts/openhands-cli-ubuntu-latest/openhands ]; then
- cp artifacts/openhands-cli-ubuntu-latest/openhands release-assets/openhands-linux
+ # Copy binaries with appropriate names for release
+ if [ -f artifacts/openhands-cli-linux/openhands ]; then
+ cp artifacts/openhands-cli-linux/openhands release-assets/openhands-linux
fi
- if [ -f artifacts/openhands-cli-macos-latest/openhands ]; then
- cp artifacts/openhands-cli-macos-latest/openhands release-assets/openhands-macos
+ if [ -f artifacts/openhands-cli-macos/openhands ]; then
+ cp artifacts/openhands-cli-macos/openhands release-assets/openhands-macos
fi
ls -la release-assets/
diff --git a/openhands-cli/build.py b/openhands-cli/build.py
index 70b0e205cd..f4b3cd83b4 100755
--- a/openhands-cli/build.py
+++ b/openhands-cli/build.py
@@ -164,7 +164,7 @@ def test_executable() -> bool:
)
# --- Wait for welcome ---
- deadline = boot_start + 30
+ deadline = boot_start + 60
saw_welcome = False
captured = []
diff --git a/openhands-cli/openhands_cli/agent_chat.py b/openhands-cli/openhands_cli/agent_chat.py
index 1e08f0ff16..b7fcaaf359 100644
--- a/openhands-cli/openhands_cli/agent_chat.py
+++ b/openhands-cli/openhands_cli/agent_chat.py
@@ -54,6 +54,7 @@ def _print_exit_hint(conversation_id: str) -> None:
)
+
def run_cli_entry(resume_conversation_id: str | None = None) -> None:
"""Run the agent chat session using the agent SDK.