Problem
The opencode-bot job gate in .github/workflows/opencode.yml requires a space before the trigger phrase for issue_comment / pull_request_review_comment events:
&& (contains(github.event.comment.body, ' /oc') || contains(github.event.comment.body, ' /opencode'))
A comment whose body starts with the trigger (e.g. /opencode explain this issue) does not contain the substring ' /oc', so the job is skipped and the bot never responds.
Evidence
.github/workflows/opencode.yml:58 — the comment branch requires ' /oc' / ' /opencode' with a leading space.
- The other branches of the same condition match without the space:
pull_request_review (line 62) and issues (lines 67–68) — inconsistent handling within one expression.
- Documented usage is start-of-comment:
README.md:46 ("Then comment /opencode or /oc …"), the ## Examples section (/opencode explain this issue, /opencode fix this, /oc add error handling here), and .opencode/skills/review-pr/SKILL.md:174 ("Re-run by commenting /opencode or /oc on the PR").
- The README consumer example (
README.md:29) uses contains(github.event.comment.body, '/oc') without a space, so this repo's own workflow is stricter than both the documented pattern and the action's own mention matching (mentions default /opencode,/oc, matched by opencode github run itself).
Impact
The primary documented interaction — commenting /oc … or /opencode … at the start of a comment on an issue or PR in this repository — silently does nothing (job skipped). Mid-sentence mentions still work, which makes the failure look intermittent and hard to diagnose.
Suggested fix
Also match the trigger at the start of the body, e.g.:
&& (
startsWith(github.event.comment.body, '/oc')
|| contains(github.event.comment.body, ' /oc')
|| startsWith(github.event.comment.body, '/opencode')
|| contains(github.event.comment.body, ' /opencode')
)
(startsWith(body, '/oc') already covers /opencode, so this can be simplified.) Alternatively drop the leading space entirely, matching the README example — opencode github run performs its own mention matching, so the workflow gate only needs to be a cheap pre-filter against wasted runner spins.
Validation
Comment /oc ping (at the very start of the comment body) on a PR or issue and confirm the opencode-bot job actually runs instead of showing as skipped in gh run list --workflow=opencode.yml.
Problem
The
opencode-botjob gate in.github/workflows/opencode.ymlrequires a space before the trigger phrase forissue_comment/pull_request_review_commentevents:&& (contains(github.event.comment.body, ' /oc') || contains(github.event.comment.body, ' /opencode'))A comment whose body starts with the trigger (e.g.
/opencode explain this issue) does not contain the substring' /oc', so the job is skipped and the bot never responds.Evidence
.github/workflows/opencode.yml:58— the comment branch requires' /oc'/' /opencode'with a leading space.pull_request_review(line 62) andissues(lines 67–68) — inconsistent handling within one expression.README.md:46("Then comment/opencodeor/oc…"), the## Examplessection (/opencode explain this issue,/opencode fix this,/oc add error handling here), and.opencode/skills/review-pr/SKILL.md:174("Re-run by commenting/opencodeor/ocon the PR").README.md:29) usescontains(github.event.comment.body, '/oc')without a space, so this repo's own workflow is stricter than both the documented pattern and the action's own mention matching (mentionsdefault/opencode,/oc, matched byopencode github runitself).Impact
The primary documented interaction — commenting
/oc …or/opencode …at the start of a comment on an issue or PR in this repository — silently does nothing (job skipped). Mid-sentence mentions still work, which makes the failure look intermittent and hard to diagnose.Suggested fix
Also match the trigger at the start of the body, e.g.:
(
startsWith(body, '/oc')already covers/opencode, so this can be simplified.) Alternatively drop the leading space entirely, matching the README example —opencode github runperforms its own mention matching, so the workflow gate only needs to be a cheap pre-filter against wasted runner spins.Validation
Comment
/oc ping(at the very start of the comment body) on a PR or issue and confirm theopencode-botjob actually runs instead of showing as skipped ingh run list --workflow=opencode.yml.