[FEATURE]: Support Agent-Authored PRs in Permission Checks #4315

Open
opened 2026-02-16 17:43:24 -05:00 by yindo · 1 comment
Owner

Originally created by @krish-59 on GitHub (Jan 6, 2026).

Originally assigned to: @thdxr on GitHub.

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

🚀 Feature Request: Support Agent-Authored PRs in Permission Checks

Summary

I’m building a fully agentic development workflow using OpenCode, where agents autonomously triage issues, modify code, and open pull requests. Currently, this flow breaks when downstream PR review workflows fail due to permission checks on agent activity.


Current Flow

  1. A user creates an issue
  2. issue_triage workflow runs
  3. OpenCode agent:
    • Reviews the issue
    • Creates a new branch
    • Makes code changes
    • Opens a PR
  4. pr_review workflow triggers on PR open

Problem

The pr_review workflow performs an assertPermissions check.

Since the last PR activity is from the OpenCode agent, which does not have admin/write permissions, the workflow fails.

Image

This stops the automation until a human manually re-triggers the workflow (e.g., toggling Draft → Ready for Review).

This manual step breaks the goal of a true agentic workflow.


Expected Behavior

Agent-created PRs should be able to:

  • Trigger PR review workflows
  • Pass permission checks
  • Run end-to-end without requiring human intervention

Proposed Solution (Preferred)

Enhance assertPermissions to recognize and allow trusted OpenCode agent activity, enabling PR review workflows to proceed even when the last actor is an agent.

This would unlock fully autonomous issue → PR → review pipelines.


Alternative (Less Preferred)

Allow agents to create draft PRs by default, requiring a human to mark them as “Ready for Review” to trigger the review workflow.

While this works, it still requires manual intervention and limits true autonomy.


Why This Matters

Without this capability, OpenCode cannot fully support:

  • End-to-end agentic development
  • Autonomous refactoring or maintenance workflows
  • Multi-agent CI/CD pipelines

Supporting agent-authored PRs as first-class contributors would significantly enhance OpenCode’s agentic development capabilities.

Originally created by @krish-59 on GitHub (Jan 6, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request ## 🚀 Feature Request: Support Agent-Authored PRs in Permission Checks ### Summary I’m building a **fully agentic development workflow** using OpenCode, where agents autonomously triage issues, modify code, and open pull requests. Currently, this flow breaks when downstream PR review workflows fail due to permission checks on agent activity. --- ### Current Flow 1. A user creates an issue 2. `issue_triage` workflow runs 3. OpenCode agent: - Reviews the issue - Creates a new branch - Makes code changes - Opens a PR 4. `pr_review` workflow triggers on PR open --- ### Problem The `pr_review` workflow performs an `assertPermissions` check. Since the **last PR activity is from the OpenCode agent**, which does not have admin/write permissions, the workflow fails. <img width="1108" height="615" alt="Image" src="https://github.com/user-attachments/assets/e99e670f-1bdd-4e52-8beb-96ada57b6489" /> This stops the automation until a human manually re-triggers the workflow (e.g., toggling Draft → Ready for Review). This manual step breaks the goal of a **true agentic workflow**. --- ### Expected Behavior Agent-created PRs should be able to: - Trigger PR review workflows - Pass permission checks - Run end-to-end without requiring human intervention --- ### Proposed Solution (Preferred) Enhance `assertPermissions` to **recognize and allow trusted OpenCode agent activity**, enabling PR review workflows to proceed even when the last actor is an agent. This would unlock **fully autonomous issue → PR → review pipelines**. --- ### Alternative (Less Preferred) Allow agents to create **draft PRs** by default, requiring a human to mark them as “Ready for Review” to trigger the review workflow. While this works, it still requires manual intervention and limits true autonomy. --- ### Why This Matters Without this capability, OpenCode cannot fully support: - End-to-end agentic development - Autonomous refactoring or maintenance workflows - Multi-agent CI/CD pipelines Supporting agent-authored PRs as first-class contributors would significantly enhance OpenCode’s agentic development capabilities.
yindo added the discussion label 2026-02-16 17:43:24 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5891: [FEATURE]: Full automation support - Requests full autonomous task execution without manual confirmation
  • #5690: hallucinating 'workflow doesn't have access to a GitHub token' despite successfully creating PRs - Related to GitHub workflow and PR creation issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #5891: [FEATURE]: Full automation support - Requests full autonomous task execution without manual confirmation - #5690: hallucinating 'workflow doesn't have access to a GitHub token' despite successfully creating PRs - Related to GitHub workflow and PR creation issues Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4315