opencode with Github action: Failed to fetch version information #1238

Closed
opened 2026-02-16 17:30:07 -05:00 by yindo · 8 comments
Owner

Originally created by @codeagencybe on GitHub (Aug 11, 2025).

Originally assigned to: @fwang on GitHub.

When I use the agent with Github, my action doesn't work. I always keep turning into this error:

Run sst/opencode/github@latest
Run curl -fsSL https://opencode.ai/install | bash
  curl -fsSL https://opencode.ai/install | bash
  shell: /opt/homebrew/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ANTHROPIC_API_KEY: ***
\033[0;31mFailed to fetch version information\033[0m
Error: Process completed with exit code 1.

Image

I followed all the steps like below. My action is triggered, but it fails on the key while the key is set properly

Image Image

What could be the root cause here? I'm using a self hosted runner on my Macbook pro M4.

Thanks.

Originally created by @codeagencybe on GitHub (Aug 11, 2025). Originally assigned to: @fwang on GitHub. When I use the agent with Github, my action doesn't work. I always keep turning into this error: ``` Run sst/opencode/github@latest Run curl -fsSL https://opencode.ai/install | bash curl -fsSL https://opencode.ai/install | bash shell: /opt/homebrew/bin/bash --noprofile --norc -e -o pipefail {0} env: ANTHROPIC_API_KEY: *** \033[0;31mFailed to fetch version information\033[0m Error: Process completed with exit code 1. ``` <img width="2083" height="622" alt="Image" src="https://github.com/user-attachments/assets/c9170292-a26a-4b4f-82e7-36a9664b3c35" /> I followed all the steps like below. My action is triggered, but it fails on the key while the key is set properly <img width="1319" height="649" alt="Image" src="https://github.com/user-attachments/assets/93ac5374-fd4c-42f9-86b6-dc8fc2a6de45" /> <img width="1384" height="927" alt="Image" src="https://github.com/user-attachments/assets/0c6e6508-28be-4ccd-b458-aa8bd34a2167" /> What could be the root cause here? I'm using a self hosted runner on my Macbook pro M4. Thanks.
yindo closed this issue 2026-02-16 17:30:07 -05:00
Author
Owner

@AlexZeitler commented on GitHub (Aug 12, 2025):

Same for me on Ubuntu Desktop 24.04

@AlexZeitler commented on GitHub (Aug 12, 2025): Same for me on Ubuntu Desktop 24.04
Author
Owner

@AlexZeitler commented on GitHub (Aug 12, 2025):

Retrying several times helped

Image
@AlexZeitler commented on GitHub (Aug 12, 2025): Retrying several times helped <img width="780" height="225" alt="Image" src="https://github.com/user-attachments/assets/19a9b2b0-a4a6-41c0-9cd7-f10177ca784b" />
Author
Owner

@codeagencybe commented on GitHub (Aug 12, 2025):

Retrying several times helped

Image

I don't think it started working because you tried multiple times. It's probably because the opencode version is newer that is now downloaded and fixed some bug. You can see that in your screenshot it's downloading 0.4.26

Dax has pushed a lot of fixes the past 24 hours: https://github.com/sst/opencode/releases
My test yesterday was downloading like version v0.4.12 or something and there's been at least another 10 new releases since.

@codeagencybe commented on GitHub (Aug 12, 2025): > Retrying several times helped > > <img alt="Image" width="780" height="225" src="https://private-user-images.githubusercontent.com/287480/476937315-19a9b2b0-a4a6-41c0-9cd7-f10177ca784b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTQ5OTMyOTYsIm5iZiI6MTc1NDk5Mjk5NiwicGF0aCI6Ii8yODc0ODAvNDc2OTM3MzE1LTE5YTliMmIwLWE0YTYtNDFjMC05Y2Q3LWYxMDE3N2NhNzg0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxMlQxMDAzMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYjdjM2MyZTQ1ZWIyMGZlZGI4ZjNiY2RkMDM0YTdkOGY3MDAyM2Y5YWVlZmYxZGMyZjI2N2U4YmU1Y2Y4MGRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9._M2ey5erxVA3u8GcaDGLuhbIF_ZUMztHWvPnt79uDmE"> I don't think it started working because you tried multiple times. It's probably because the opencode version is newer that is now downloaded and fixed some bug. You can see that in your screenshot it's downloading 0.4.26 Dax has pushed a lot of fixes the past 24 hours: https://github.com/sst/opencode/releases My test yesterday was downloading like version v0.4.12 or something and there's been at least another 10 new releases since.
Author
Owner

@codeagencybe commented on GitHub (Aug 12, 2025):

I'm still having the same problem though

Extract from my github runner log:

Run curl -fsSL https://opencode.ai/install | bash
  curl -fsSL https://opencode.ai/install | bash
  shell: /opt/homebrew/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    ANTHROPIC_API_KEY: ***
##[debug]/opt/homebrew/bin/bash --noprofile --norc -e -o pipefail /Users/codeagency/development/projecten/actions-runner/_work/_temp/ef4249fd-0f16-4110-8729-df148266eda8.sh
\033[0;31mFailed to fetch version information\033[0m
Error: Process completed with exit code 1.

I'm not sure to what it is referring with the failed to fetch ersion information

@thdxr any idea what this could be?

This is my workflow yaml below, and my API key is 300% correct, it's the same one I'm using in Cursor and Opencode sessions.

name: opencode

on:
  issue_comment:
    types: [created]

jobs:
  opencode:
    if: |
      contains(github.event.comment.body, ' /oc') ||
      startsWith(github.event.comment.body, '/oc') ||
      contains(github.event.comment.body, ' /opencode') ||
      startsWith(github.event.comment.body, '/opencode')
    runs-on: self-hosted
    permissions:
      contents: read
      id-token: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Run opencode
        uses: sst/opencode/github@latest
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        with:
          model: anthropic/claude-opus-4-1-20250805

@codeagencybe commented on GitHub (Aug 12, 2025): I'm still having the same problem though Extract from my github runner log: ``` Run curl -fsSL https://opencode.ai/install | bash curl -fsSL https://opencode.ai/install | bash shell: /opt/homebrew/bin/bash --noprofile --norc -e -o pipefail {0} env: ANTHROPIC_API_KEY: *** ##[debug]/opt/homebrew/bin/bash --noprofile --norc -e -o pipefail /Users/codeagency/development/projecten/actions-runner/_work/_temp/ef4249fd-0f16-4110-8729-df148266eda8.sh \033[0;31mFailed to fetch version information\033[0m Error: Process completed with exit code 1. ``` I'm not sure to what it is referring with the `failed to fetch ersion information` @thdxr any idea what this could be? This is my workflow yaml below, and my API key is 300% correct, it's the same one I'm using in Cursor and Opencode sessions. ``` name: opencode on: issue_comment: types: [created] jobs: opencode: if: | contains(github.event.comment.body, ' /oc') || startsWith(github.event.comment.body, '/oc') || contains(github.event.comment.body, ' /opencode') || startsWith(github.event.comment.body, '/opencode') runs-on: self-hosted permissions: contents: read id-token: write steps: - name: Checkout repository uses: actions/checkout@v4 - name: Run opencode uses: sst/opencode/github@latest env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} with: model: anthropic/claude-opus-4-1-20250805 ```
Author
Owner

@AlexZeitler commented on GitHub (Aug 12, 2025):

Retrying several times helped
Image

I don't think it started working because you tried multiple times. It's probably because the opencode version is newer that is now downloaded and fixed some bug. You can see that in your screenshot it's downloading 0.4.26

Dax has pushed a lot of fixes the past 24 hours: https://github.com/sst/opencode/releases My test yesterday was downloading like version v0.4.12 or something and there's been at least another 10 new releases since.

Maybe I should play the lottery today or invest somewhere 😝

Between the failing attempts and the succeeding ones have been just a few minutes - I didn't even close the terminal window.

@AlexZeitler commented on GitHub (Aug 12, 2025): > > Retrying several times helped > > <img alt="Image" width="780" height="225" src="https://private-user-images.githubusercontent.com/287480/476937315-19a9b2b0-a4a6-41c0-9cd7-f10177ca784b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTQ5OTMyOTYsIm5iZiI6MTc1NDk5Mjk5NiwicGF0aCI6Ii8yODc0ODAvNDc2OTM3MzE1LTE5YTliMmIwLWE0YTYtNDFjMC05Y2Q3LWYxMDE3N2NhNzg0Yi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxMlQxMDAzMTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iYjdjM2MyZTQ1ZWIyMGZlZGI4ZjNiY2RkMDM0YTdkOGY3MDAyM2Y5YWVlZmYxZGMyZjI2N2U4YmU1Y2Y4MGRlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9._M2ey5erxVA3u8GcaDGLuhbIF_ZUMztHWvPnt79uDmE"> > > I don't think it started working because you tried multiple times. It's probably because the opencode version is newer that is now downloaded and fixed some bug. You can see that in your screenshot it's downloading 0.4.26 > > Dax has pushed a lot of fixes the past 24 hours: https://github.com/sst/opencode/releases My test yesterday was downloading like version v0.4.12 or something and there's been at least another 10 new releases since. Maybe I should play the lottery today or invest somewhere 😝 Between the failing attempts and the succeeding ones have been just a few minutes - I didn't even close the terminal window.
Author
Owner

@ejc3 commented on GitHub (Aug 18, 2025):

You're probably hitting a github rate limit. If you replace the curl -s with curl -sv in the bash script to check for the latest opencode revision, you will likely see 403 response because you're hitting github's relate limit.

@ejc3 commented on GitHub (Aug 18, 2025): You're probably hitting a github rate limit. If you replace the `curl -s `with `curl -sv` in the bash script to check for the latest opencode revision, you will likely see 403 response because you're hitting github's relate limit.
Author
Owner

@ejc3 commented on GitHub (Aug 18, 2025):

Something like this is a work around (if you are installing via container):

ENV OPENCODE_FALLBACK_VERSION=0.5.7
RUN curl -fsSL https://opencode.ai/install > /tmp/install.sh && bash /tmp/install.sh || \
    echo "Could not fetch latest revision of opencode, so falling back to $OPENCODE_FALLBACK_VERSION" && \
    (VERSION=$OPENCODE_FALLBACK_VERSION bash -x /tmp/install.sh && rm /tmp/install.sh)

@ejc3 commented on GitHub (Aug 18, 2025): Something like this is a work around (if you are installing via container): ``` ENV OPENCODE_FALLBACK_VERSION=0.5.7 RUN curl -fsSL https://opencode.ai/install > /tmp/install.sh && bash /tmp/install.sh || \ echo "Could not fetch latest revision of opencode, so falling back to $OPENCODE_FALLBACK_VERSION" && \ (VERSION=$OPENCODE_FALLBACK_VERSION bash -x /tmp/install.sh && rm /tmp/install.sh) ```
Author
Owner

@rekram1-node commented on GitHub (Oct 16, 2025):

I found a case in the install script that could cause the install to fail sometimes (github was returning different response structures and it would break the install script in some cases)

We fixed this a little while ago and so maybe you should see less problems?

Going to close unless this is still really common for some people

@rekram1-node commented on GitHub (Oct 16, 2025): I found a case in the install script that could cause the install to fail sometimes (github was returning different response structures and it would break the install script in some cases) We fixed this a little while ago and so maybe you should see less problems? Going to close unless this is still really common for some people
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1238