anomalyco / anomalyco/opencode
[FEATURE]: allow runs started by a GitHub App's comment (assertPermissions refuses every App actor)
@kitlangton is already working on this.
Since Sep 10, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
opencode github run refuses every run started by a GitHub App's comment, and there is no way to allow one.
assertPermissions() in packages/opencode/src/cli/cmd/github.handler.ts (v1.18.29, lines 1165-1185) asks repos.getCollaboratorPermissionLevel for github.context.actor on every user event. A GitHub App has no collaborator permission level on a repository, so an App that comments /opencode on an issue always gets:
Asserting permissions for user sreagent-app[bot]...
permission: none
Error: User sreagent-app[bot] does not have write permissions
This happens in App mode and in token mode (use_github_token: true) alike, and no input or environment variable skips the check. The check is skipped only for schedule and workflow_dispatch.
Our integration (SRE Agent, https://github.com/segfaultpw/sre-agent-opencode) is an App installed on the repository with Issues and Pull requests write. It opens a tracking issue holding a brief and comments /opencode on it, the same way a person would, and every one of those runs is refused. We work around it by relaying the comment through workflow_dispatch, which costs the run its issue context (no reaction, no comment on the issue, a dispatch branch name, PROMPT required).
Request, either of these:
- Treat an actor of type
Botas authorized when its App has an installation on the repository (GET /repos/{owner}/{repo}/installation, or the installation the token already carries), instead of reading a collaborator level that cannot exist for it. - An explicit input on the action, for example
allowed_actors: "sreagent-app[bot]", set by the workflow author. The workflow file already decides whose comment reaches the action at all, and the repository's admins own that file.
Happy to open a PR for whichever you prefer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.