It's possible to re-use opencode-agent as author for GitHub Actions #6714

Open
opened 2026-02-16 18:05:02 -05:00 by yindo · 2 comments
Owner

Originally created by @cogni-ai-ee on GitHub (Jan 18, 2026).

Originally assigned to: @thdxr on GitHub.

Question

I've installed OpenCode Agent GitHub App and configured. I've all sets of APIs already in place.
Is there any way to re-use opencode-agent bot as author of PR review comments, instead of default github-actions handle, or this is something that each project should create its own handle bot?
I've looked at actions/create-github-app-token@v1 action, but this requires private key.
I was kind of hoping that when calling anomalyco/opencode/github action (with OPENCODE_API_KEY) and installing app, it would use different handle when posting comments.
So I guess new account needs to be created for that purpose?

Originally created by @cogni-ai-ee on GitHub (Jan 18, 2026). Originally assigned to: @thdxr on GitHub. ### Question I've installed [OpenCode Agent GitHub App](https://github.com/apps/opencode-agent) and configured. I've all sets of APIs already in place. Is there any way to re-use opencode-agent bot as author of PR review comments, instead of default github-actions handle, or this is something that each project should create its own handle bot? I've looked at actions/create-github-app-token@v1 action, but this requires private key. I was kind of hoping that when calling anomalyco/opencode/github action (with OPENCODE_API_KEY) and installing app, it would use different handle when posting comments. So I guess new account needs to be created for that purpose?
Author
Owner

@cogni-ai-ee commented on GitHub (Jan 18, 2026):

Not sure what changed, but it kind of worked, but with error (related: GH-8202).

opencode session ses_42d87f60affeqKkR5g4x10yAut
Fetching prompt data for PR...
Checking out local branch...
remote: Duplicate header: "Authorization"
fatal: unable to access 'https://github.com/Cogni-AI-OU/.github/': The requested URL returned error: 400
Failed with exit code 128

Then the comment about the above error was posted by opencode-agent.

I'm not sure about the comments it-self yet, due to this error.

@cogni-ai-ee commented on GitHub (Jan 18, 2026): Not sure what changed, but it kind of worked, but with error (related: GH-8202). ``` opencode session ses_42d87f60affeqKkR5g4x10yAut Fetching prompt data for PR... Checking out local branch... remote: Duplicate header: "Authorization" fatal: unable to access 'https://github.com/Cogni-AI-OU/.github/': The requested URL returned error: 400 Failed with exit code 128 ``` Then the comment about the above error was posted by [opencode-agent](https://github.com/apps/opencode-agent). I'm not sure about the comments it-self yet, due to this error.
Author
Owner

@cogni-ai-ee commented on GitHub (Jan 18, 2026):

Update: This seems to work, but in partial, running anomalyco/opencode/github action successfully posting main PR comments as opencode-agent.
However when agent is posting comment via gh api (POST), the inline-comments are still posted as
github-actions.

Bash     {"command":"gh api \\\n  --method POST \\\n  -H \"Accept: application/vnd.github+json\" \\\n  -H \"X-GitHub-Api-Version: 2022-11-28\" \\\n  ...

Is this by design?

@cogni-ai-ee commented on GitHub (Jan 18, 2026): Update: This seems to work, but in partial, running `anomalyco/opencode/github` action successfully posting main PR comments as [opencode-agent](https://github.com/apps/opencode-agent). However when agent is posting comment via `gh api` (POST), the inline-comments are still posted as github-actions. ``` Bash {"command":"gh api \\\n --method POST \\\n -H \"Accept: application/vnd.github+json\" \\\n -H \"X-GitHub-Api-Version: 2022-11-28\" \\\n ... ``` Is this by design?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6714