Skip to content

OpenCode Setup Improvements #1581

Open
Open

Description

@EttyKitty

The current /oc action uses OpenCode GitHub action.

What Problems It Brought (in my experience)

  1. We're fully restrained by the action's code in regards to how it interacts with OpenCode CLI itself. What parameters it passes to the command, how it structures requests, how creates branches, what context supplies with comments, etc. It acts just a middleman between us and a single CLI command that sends the LLM request.
  2. It can't differentiate between write and read-only contributors, because the action always checks for write perms under the hood; meaning we can't have the bot answer questions of read-only members, it won't run at all.
  3. If we want to change bot's identity, the PAT of the other account will require admin-read permission just to check for write perms, per point 2. It's an unnecessary permission, for a single check at the start of the workflow, just due to the poor way the action is coded.

What Benefits It Has

  1. Hands off pipeline, without manual perm checking, manual context supplementation, manual prompting or other infrastructure work (branch creation, etc).

What I Want to Do (in Steps)

  • Refactor it to use OpenCode CLI instead of an action. Done in ci(oc): Refactor the /oc action to CLI #1568.
  • Refactor the workflows to use a GitHub app to mint PATs, instead of maintaining 999 different PATs from the separate bot account manually. Done in ci(oc): Refactor workflows to use GitHub app #1626
  • Refactor to have a single central dispatcher workflow with comment triggers, routing to a correct workflow based on the command, instead of each command type having its own trigger, firing for each comment 4+ workflows.
  • Split /oc into two commands: write and read-only. One for maintainers-only to specifically do something, requiring write-perms, the other for everyone to ask. Like /ask and /do. Alternately, keep a single command, but automatically elevate into write mode when user perms allow.
  • Implement more command types (/fix for example, to implement the suggested fix to an issue, split /investigate from /review, etc.).
  • Implement advanced bot behavior like in CodeRabbit, Cubic, and other bots. Answering if bot account is pinged, detecting replies to its review comments, resolving threads, editing, or updating head comments if needed, etc.
  • Make OpenCode sessions persistent, so they can be resumed if there is a follow-up, instead of starting a new clean one. Possible via -s/--session CLI flag (also --fork exists). Will likely require either actions/cache, branch memory or comment memory to store session ID.
  • Cache OpenCode install in workflows.
  • Refactor most scripts from bash to Python or JS. Fully possible to run via actions, without external hosting. Inlined bash is ASS.
  • Move prompts into separate MD files (or do the step below). Inlining huge prompts is ASS.
  • Make use of OpenCode agents, commands, and skills, to reduce duplication and allow reusability.
  • Think about reusable workflows and composite actions for cross-repo use.

Activity

  1. changed the issue type fromtoon Oct 6, 2026
  2. changed the title [-]OpenCode setup V2[/-] [+]OpenCode Setup Improvments[/+] on Oct 8, 2026
  3. linked a pull request that will close this issueci(oc): Fix user resolution #1629on Oct 8, 2026
  4. linked a pull request that will close this issueci(oc): Fix wrong secrets syntax #1627on Oct 8, 2026
  5. linked a pull request that will close this issueci(oc): Fix pushing problem #1611on Oct 8, 2026
  6. linked a pull request that will close this issueci: Improve issue triage workflow #1600on Oct 8, 2026
  7. linked a pull request that will close this issuerevert(oc): OC PAT usage #1570on Oct 8, 2026
  8. linked a pull request that will close this issueci(oc): Refactor the /oc action to CLI #1568on Oct 8, 2026
  9. self-assigned this
    on Oct 8, 2026
  10. changed the title [-]OpenCode Setup Improvments[/-] [+]OpenCode Setup Improvements[/+] on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority: MediumBreaks a feature but has a workaround

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions