Skip to content

Pin opencode version and skip bot-authored comments - #39

Merged
impuls42 merged 2 commits into
masterfrom
claude/fix-opencode-workflow-xyrPH
May 16, 2026
Merged

impuls42 merged 2 commits into
masterfrom
claude/fix-opencode-workflow-xyrPH

Conversation

@impuls42

Copy link
Copy Markdown
Owner

Summary

This PR updates the opencode GitHub workflow to pin a specific version of the opencode binary and adds a guard to prevent the workflow from being re-triggered by bot-authored comments.

Key Changes

  • Pin opencode version: Added OPENCODE_VERSION: "1.15.0" environment variable to work around a regression in v1.15.1+ (bug: opencode 1.15.1 run exits with InstanceRef not provided anomalyco/opencode#27829). The workflow now manually installs and caches this specific version instead of relying on the latest action.
  • Skip bot comments: Updated the workflow condition to exclude comments from bot users (github.event.comment.user.type != 'Bot'), preventing infinite loops where opencode-agent's own review comments would re-trigger the workflow.
  • Inline action logic: Replaced the anomalyco/opencode/github@latest action with explicit steps to:
    • Cache the opencode binary for faster runs
    • Install opencode with the pinned version
    • Add opencode to PATH
    • Run opencode directly via bash
  • Update configuration: Converted action inputs (model, share) to environment variables (MODEL, SHARE) to match the direct invocation approach.

Implementation Details

The workflow now has more control over the opencode binary version, allowing us to stay on a known-good release while upstream issues are resolved. The bot comment filter prevents the workflow from being triggered by opencode-agent's own review bodies, which contain links matching the /opencode substring.

https://claude.ai/code/session_01Keu5EHUn477ibg36DjNt6z

claude added 2 commits May 16, 2026 13:40
Upstream anomalyco/opencode v1.15.1 and v1.15.2 crash with
"InstanceRef not provided" (anomalyco/opencode#27829). The
anomalyco/opencode/github action always installs the latest binary,
so the workflow started failing as soon as v1.15.x shipped. Inline
the action's composite steps and pin the install to v1.15.0 until a
fixed release is available.
opencode-agent's review responses include https://opencode.ai/... links
that contain the substring "/opencode", which re-triggers the workflow
on the bot's own comment. The re-run then fails with "User
opencode-agent[bot] does not have write permissions" (see PR #34
comment 4464653977). Filter out comments authored by bots so only
human-initiated /oc and /opencode invocations run.
@impuls42
impuls42 merged commit 6c24249 into master May 16, 2026
@impuls42
impuls42 deleted the claude/fix-opencode-workflow-xyrPH branch May 17, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants