From dd60002a0d33a13b6578d494c96c17a0b515bb70 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 29 Dec 2025 01:09:28 +0900 Subject: [PATCH] fix(sisyphus-agent): handle OpenCode installer failure with pinned version fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace retry loop with intelligent fallback strategy: - Try default installer first (better for version discovery) - On failure, fallback to pinned version 1.0.204 - Handle corrupted downloads with direct fallback install This addresses the sisyphus-agent workflow failure where OpenCode's installer failed with 'Failed to fetch version information' error. 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) --- .github/workflows/sisyphus-agent.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sisyphus-agent.yml b/.github/workflows/sisyphus-agent.yml index 5526d44..bccf888 100644 --- a/.github/workflows/sisyphus-agent.yml +++ b/.github/workflows/sisyphus-agent.yml @@ -86,14 +86,19 @@ jobs: # Install OpenCode (skip if cached) if ! command -v opencode &>/dev/null; then - for i in 1 2 3; do - echo "Attempt $i: Installing OpenCode..." - curl -fsSL https://opencode.ai/install -o /tmp/opencode-install.sh - if file /tmp/opencode-install.sh | grep -q "shell script\|text"; then - bash /tmp/opencode-install.sh && break + echo "Installing OpenCode..." + curl -fsSL https://opencode.ai/install -o /tmp/opencode-install.sh + + # Try default installer first, fallback to pinned version if it fails + if file /tmp/opencode-install.sh | grep -q "shell script\|text"; then + if ! bash /tmp/opencode-install.sh 2>&1; then + echo "Default installer failed, trying with pinned version..." + bash /tmp/opencode-install.sh --version 1.0.204 fi - echo "Download corrupted, retrying in 5s..." - done + else + echo "Download corrupted, trying direct install with pinned version..." + bash <(curl -fsSL https://opencode.ai/install) --version 1.0.204 + fi fi opencode --version