Skip to content

Remove the OpenCode GitHub Action - #59032

Merged
thdxr merged 1 commit into
devfrom
remove-github-action
Oct 25, 2026
Merged

thdxr merged 1 commit into
devfrom
remove-github-action

Conversation

@thdxr

@thdxr thdxr commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

We no longer support the GitHub Action. This removes the github/ action source and its two release workflows (release-github-action.yml, publish-github-action.yml).

Existing users are unaffected: they reference tags (anomalyco/opencode/github@latest, @github-v1, @github-v1.x.y), which keep pointing at older commits that still contain the action. Those tags are now locked by the release-tag ruleset, so they can't be moved.


Added by the opencode bot (AI-generated).

Related: #57340, #57337, #58096, #48338, #59008

@thdxr
thdxr enabled auto-merge (squash) October 25, 2026 17:54

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This only deletes files, and nothing left in the repo (workspaces, CI workflows, CODEOWNERS, CLI) refers to the removed github/ directory or its two workflows. The token-exchange endpoint in packages/function stays, which the older action tags still need.

Public API: no change to the CLI, SDK or server. The action itself (anomalyco/opencode/github) stops getting new releases. Existing users stay on the tagged versions they already reference.

One follow-up worth doing: the docs page packages/web/src/content/docs/github.mdx and its translations still describe the action as supported. They tell users to run opencode github install and use anomalyco/opencode/github@latest. Those pages should be removed or should say the action is no longer supported, either here or in a separate PR.

Related: #57340, #57337, #58096, #48338, #59008

@thdxr
thdxr merged commit 1743d1a into dev Oct 25, 2026
15 checks passed
@thdxr
thdxr deleted the remove-github-action branch October 25, 2026 17:55
@amrkmn amrkmn mentioned this pull request Oct 27, 2026
1 task
harleypig added a commit to harleypig/dotfiles that referenced this pull request Oct 28, 2026
Upstream removed the opencode GitHub Action on 2026-10-25
(anomalyco/opencode#59032), so the pinned action has no future
releases, and the workflow's last 136 runs were all skipped. It still
held issues: write and id-token: write and read the
OPENROUTER_API_KEY secret, which is standing exposure for a job that
does nothing.

Remove the workflow and its entry in WORKFLOW.md Integration Points.
The local opencode CLI configuration is unaffected. Dependabot PR #522,
which bumps this action, becomes moot.

Co-authored-by: AI Agent <noreply@harleypig.com>
gonzafg2 added a commit to gonzafg2/quantumssh that referenced this pull request Oct 30, 2026
…235)

* ci(opencode): run the reviewer on a pinned OpenCode 2 CLI (ADR-0049)

Upstream removed the opencode GitHub Action on 2026-10-25
(anomalyco/opencode#59032), and `opencode github run`, which it calls,
exists only in OpenCode 1. The action also looked up the latest release
with an anonymous api.github.com call that fails on a rate-limited
runner, and installed an unpinned CLI (#166).

The workflow now downloads opencode-linux-x64.tar.gz v2.2.3 from the
GitHub release, checks the SHA-256 GitHub publishes for it, and runs
`opencode run --standalone --format json` on the PR head commit read
during the fork refusal. Two jobs split on privilege: `review` runs the
model with read-only permissions and hands the report over as an
artifact, and `post`, which runs no model and checks out nothing,
comments with pull-requests: write. id-token: write is dropped, reviews
come from github-actions[bot], and the proof of review holds by
construction.

ADR-0049 records the decision and supersedes the matching parts of
ADR-0025, ADR-0032 and ADR-0033, whose Status lines say so.

Closes #166

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): give the agent read-only tools and fetch the PR for it

The agent read PR comments, which anyone can write on a public PR, while
it had a shell, the provider key in its environment and a GitHub token:
a prompt injection could expand the key and send it out, or into the
public review. That was true of the OpenCode 1 action as well.

OPENCODE_CONFIG_CONTENT now denies every permission except read, grep,
glob, list and subagent (subagents inherit the rules), and allows reading
only /etc and the PR files outside the checkout. A step before the run
fetches the PR, its diff, its commits with their verification, and the
earlier comments and reviews, as the Codex workflow of ADR-0030 did, so
the agent runs with no GitHub token. Checked against OpenCode 2.2.3 in a
container: shell and webfetch are not offered to the agent or its
subagents, and /proc/self/environ is denied. ADR-0049 records it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): drop checkout symlinks and refuse a report with the key

OpenCode 2.2.3's read and grep tools follow a symlink in the checkout to
any path, and the external_directory rules only see the path inside the
checkout: a symlink to a file outside it was read in a container test.
The repository tracks no symlinks, so the job now deletes every one
after the checkout.

As a last line of defence, the review job fails without handing the
report to `post` when the report contains the provider key. ADR-0049
records both.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): print opencode's error events when the run fails

With --format json, `opencode run` reports a failure as an `error` event
on stdout and writes nothing to stderr. The first run on this PR exited
with status 1 after 16 minutes and left no cause in the log, because the
events file went with the runner. The step now prints each error event's
type and message before failing.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): ignore the checkout's opencode project configuration

OpenCode loads opencode.json and .opencode/ from the working directory,
which here is the PR's code. A container test with OpenCode 2.2.3 loaded
a checkout's opencode.json that allowed the shell and declared a local
MCP server, which is a command OpenCode runs, with the provider key in
its environment. CodeQL's untrusted-checkout alerts on this PR point at
the same path.

OPENCODE_DISABLE_PROJECT_CONFIG, OPENCODE_PURE and
OPENCODE_DISABLE_EXTERNAL_SKILLS make it read only the inline
configuration: with them set, the same test loads neither file. The
prompt already names what the agent reads. ADR-0049 records it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): pin the agent's diff to the checkout, and publish only a final report

From opencode's own review of this PR:

- The diff and commits were fetched by PR number, so a push between the
  checkout and the fetch could pair one tree with another diff. They now
  come from the compare of the base and head read during the fork
  refusal, which is the same three-dot diff (checked byte for byte on
  this PR). The records keep only the fields a review uses, so the
  agent can read them whole.
- The extractor took the last text part that merely mentioned the
  heading, so a final answer without a report fell back to an earlier
  part, such as a quoted comment. Now only the agent's final text
  counts, from a line that starts with the heading, and it must carry a
  **Decision**: line.
- The permission config names bash, edit, webfetch and websearch as
  denied, not only through "*".
- The Status lines of ADR-0032 and ADR-0045 name everything ADR-0049
  supersedes, and ADR-0049 no longer says the /oc comment's text stays
  away from the model, or that no api.github.com call happens.
- .github/REVIEW-FORMAT.md says a reviewer without a shell reads the
  saved comment files.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* docs(adr): record /oc's checkout as ADR-0049's accepted residual

From opencode's second review of this PR: the /oc path checks out a PR
head it resolved itself while it holds the provider key, the shape
ADR-0030 (since superseded) rejected for a /codex trigger, and CodeQL
reports it as alerts 15 and 16. ADR-0049 now records that the project
lead kept the checkout, what bounds the risk, and that both alerts were
dismissed with that justification.

pr.json also carries the compare's total_commits, so the agent can tell
when the commit list is clipped at 250.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): log each tool call and model step while the review runs

With --format json, `opencode run` writes nothing to the log until it
ends, and a review took up to 20 minutes with no sign of where. The
events now go through `tee` to the file and through a jq filter that
prints one line per tool call (tool, status, duration, path, pattern or
subagent description) and per model step (duration and token counts),
with the time since the start. Tool outputs are never printed. The
filter lives in the step's env, as the prompt does, and its exit status
leaves opencode's untouched under pipefail. Checked in a container with
a run that succeeds and one the provider refuses.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): show reasoning tokens in the step progress lines

The run on b9e0924 took 26 minutes with steps of 51 s and 99 s that
produced 165 and 114 output tokens. The step_finish event also carries
the reasoning token count: many reasoning tokens in a slow step mean the
model is thinking, few mean the provider made it wait. The progress line
now prints it.

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

* ci(opencode): scan all agent text for the key; record the bump and maintainer residuals

From opencode's fourth review of this PR (suggestions, applied at the
project lead's request):

- The provider-key check scanned only the sliced report, so a key before
  the heading or in a final answer without one was missed, and the
  invalid-report branch then printed the agent's text to the log. It now
  scans every text part the agent wrote, before slicing, and the job
  stops before anything is published or printed. The text is written to
  a file first, because `jq | grep -q` under pipefail would read an early
  match as a pipe failure.
- ADR-0049 Decision 8 maps the /oc residual to the threat model's
  maintainer-compromise actor (§3.2.6, §5.5.2.b) and says what a writer
  could already do: run an edited workflow through pull_request, or merge
  one to main.
- ADR-0049 records the §5.5.2.a residual of a release compromised before
  a bump, and what bounds it.
- ADR-0032's Status also names the permission configuration of its
  "No hangs" bullet (review #4, partly resolved item).

Claude-Session: https://claude.ai/code/session_01QpBZ4qUr3ypV22CvmVwwHp
Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>

---------

Signed-off-by: Gonzalo Fleming <gonzafg2@gmail.com>
Kardbord added a commit to Kardbord/hfgo that referenced this pull request Nov 3, 2026
Reverts #245. OpenCode removed their github action entirely from their
codebase in anomalyco/opencode#59032, so updating the pinned sha breaks
the workflow.

This is a band-aid until a replacement can be found.
michaeldcanady added a commit to michaeldcanady/servicenow-sdk-go that referenced this pull request Nov 4, 2026
OpenCode removed its GitHub Action (anomalyco/opencode#59032), and its
v1 installer refuses OpenCode 2, so the action we pinned can only run
the 1.x CLI. Replace the action with steps that install the
@opencode/cli-linux-x64 2.2.5 package from npm, check its sha512
integrity hash, and run 'opencode run' with the review prompt.

The job no longer checks out the PR head on issue_comment, so a fork
can't supply OpenCode config that a comment-triggered review would
load. The review reads the PR through gh, and the inline config denies
file edits and web fetches.

Refs #897

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
michaeldcanady added a commit to michaeldcanady/servicenow-sdk-go that referenced this pull request Nov 4, 2026
* chore(ci): review pull requests with CodeRabbit

The OpenCode review fails on every PR: its API key expired (#897),
OpenCode removed the GitHub Action we pinned (anomalyco/opencode#59032),
and the account's free usage limit now blocks the review model.
CodeRabbit's open source plan gives public repositories Team features
with no subscription, and it needs no workflow, secret, or variable.

Add .coderabbit.yaml with the review rules from the old prompt and the
repo conventions from CLAUDE.md and the ADRs. Turn off the features
that push commits or approve PRs, so CodeRabbit only reviews. Delete
opencode-review.yml, drop OPENCODE_API_KEY from the zizmor allow-list,
and name CodeRabbit in the list of CI-only checks.

Closes #897

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): keep CodeRabbit reviewing every push

CodeRabbit pauses automatic reviews after five reviewed commits by
default, so later pushes need a manual review command. Set
auto_pause_after_reviewed_commits to 0, as CodeRabbit suggested on #940.

Refs #897

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(contributing): say some checks run only on GitHub

CodeRabbit and GitGuardian run as GitHub Apps, not CI workflows, so
"only in CI" was too narrow for the list.

Refs #897

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
283375 added a commit to ArcaeaOffline/client-android that referenced this pull request Nov 12, 2026
Upad1992 pushed a commit to Upad1992/rulesync that referenced this pull request Nov 23, 2026
Upstream removed the OpenCode GitHub Action in anomalyco/opencode#59032,
so the Dependabot bump to v2.2.2 points at a commit without
github/action.yml and the draft-release workflow can no longer resolve
the step. Pin it to github-v1.2.28, the last tag that ships the action,
and tell Dependabot to stop bumping it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0179ZomNiDQHCzgoxeRVmfth
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.

1 participant