Join our Newsletter — 33% off our NHI Course

Triage-to-PR delegation

The handoff in which an AI agent is allowed to move from investigating a defect to creating a pull request. In practice, this is a controlled authorisation decision, because the agent is no longer only analysing the problem but shaping the code path that will be reviewed.

What Triage-to-PR Delegation Means in Practice

Triage-to-PR delegation is not a simple workflow shortcut. It is a bounded authorization decision that decides whether an agent only diagnoses a defect or is trusted to cross into code creation, where its output can change software behaviour and review scope.

The key distinction is that triage ends at observation, classification, and recommendation, while PR creation begins an action path with developer-visible consequences. That transition changes the control model, because the agent is now contributing code that will later be merged, rejected, or reworked by a human reviewer.

This handoff is often used to reduce turnaround time on small, well-scoped fixes, but it works best when the defect is narrow, the change surface is limited, and the expected patch style is predictable. If those conditions are not true, the delegation becomes much closer to code-authoring privilege than to analysis assistance.

Why the Delegation Boundary Matters

The boundary matters because the same agent can be useful in both phases, yet the risk profile changes sharply once it is allowed to produce a pull request. A triage-only agent may surface evidence, reproduce the issue, and suggest a fix; a PR-enabled agent can introduce code, tests, comments, or dependency changes that become part of the software delivery pipeline.

That shift also changes accountability. When the agent only triages, the human team owns the repair decision end to end. When the agent drafts the PR, the team must also decide what level of code review, branch protection, and change validation is required before the output can be accepted.

For delegation models, OAuth-style on-behalf-of flows are a useful analogy because the system is deciding whether one actor may act with another actor’s effective authority. RFC 8693: OAuth 2.0 Token Exchange describes that delegation pattern in a standardised way, which helps clarify why the authorization step matters here.

How It Shapes the Development Workflow

A triage-only agent typically feeds a queue, a ticket, or a diagnostic summary. A PR-enabled agent moves into the delivery path, which means its output must fit repository conventions, compile or lint cleanly, and survive review without weakening the intended fix. The workflow therefore becomes a control point for both quality and trust.

This is especially important in teams that automate repetitive bug fixes. The delegation boundary determines whether the agent is merely accelerating analysis or also becoming a source of proposed code changes that can propagate mistakes at scale if the guardrails are too loose.

In practice, the handoff is most defensible when the agent is constrained by scope, repository permissions, and review gates that still keep a human in the merge decision. That preserves the productivity benefit without treating every investigated defect as an automatic code-authoring opportunity.

What Good Control Design Looks Like

Good control design starts by treating triage-to-PR delegation as an explicit policy, not an informal convenience. The organization should define which defect classes are eligible, what the agent may modify, and which checks must pass before the pull request is even considered for review.

The surrounding controls should also reflect that the agent is no longer only reading context. NIST Cybersecurity Framework 2.0 is a useful governance reference for framing this as a control, oversight, and recovery problem, while NIST AI Risk Management Framework helps structure the trust and accountability questions around AI-enabled automation.

For software delivery specifically, OWASP SAMM and SLSA are useful complements because they anchor the PR handoff in mature engineering practices, traceability, and supply-chain integrity.

Risk and Threat Considerations

Delegating from triage to PR creation expands the blast radius of a bad inference. A mistaken diagnosis can become a mistaken code change, and an attacker who can influence the agent’s context, inputs, or repository access may be able to steer it toward unsafe edits, hidden backdoors, or excessive changes.

Failure mechanism: The agent is trusted to turn analysis into code without enough constraint on scope, provenance, or review, so an error or manipulation in the triage phase becomes a code-integrity problem in the PR phase.

Impact: The organization can end up with incorrect fixes, insecure code paths, polluted review queues, or attacker-shaped changes that look like legitimate maintenance work.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST CSF 2.0, NIST AI RMF, OWASP SAMM, SLSA and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
NIST CSF 2.0 GV.OC-01 — Organizational Context Delegation decisions depend on defining the agent's role in the development workflow.
Recommendation — Define when an agent may move from triage to PR creation and assign accountable ownership for that boundary.
NIST AI RMF GOVERN 1.1 — Map AI-enabled code creation needs documented governance, accountability, and risk boundaries.
Recommendation — Document approval gates for agent-created pull requests and align them to AI risk governance.
OWASP SAMM IAM — Implementation and build controls SAMM addresses secure software delivery practices that govern automated code changes.
Recommendation — Require review, traceability, and testing for agent-generated pull requests before merge.
SLSA Supply-chain integrity SLSA supports provenance and integrity for code produced in the delivery pipeline.
Recommendation — Preserve provenance and verify artifact integrity for agent-produced changes before release.
NIST SP 800-53 Rev 5 AC-6 — Least Privilege Delegation should limit what the agent can modify when it moves into PR creation.
Recommendation — Restrict agent permissions so it can only propose the minimum code changes needed.

Practitioner Guidance

Governance implication: Treat triage-to-PR delegation as a permission boundary with named owners, not as a default feature of the agent. The practical question is whether the system should ever be allowed to cross from diagnosis into code generation for a given class of issue.

What to watch for: Narrow, repetitive fixes are the best candidates; ambiguous defects, cross-cutting refactors, and changes touching authentication, authorization, or secrets handling deserve much tighter human review. NIST SP 800-53 Rev 5 Security and Privacy Controls is a useful reference point when translating that judgment into access control, audit, and change-control expectations.

Practitioner takeaway: The safer pattern is not “let the agent open PRs,” but “let the agent open PRs only when the organization can explain exactly why that code path is trustworthy enough to review.”