Summary
Submitting a GitHub PR review with both a top-level @sepo-agent command and inline review comments can cause the actual agent invocation to be cancelled before it reaches the router.
Observed example
On PR #66, review pullrequestreview-4207425242 contained:
@sepo-agent /answer
i haven't fully finished but can you explain to me how this function is structured? ...
GitHub created several Agent Entrypoint runs at the same time:
pull_request_review run 25205475805 — cancelled
- three
pull_request_review_comment runs — skipped because the inline comments did not contain a live agent mention
As a result, the review-body agent command was not picked up.
Why this happens
agent-entrypoint.yml currently uses a concurrency group keyed mostly by target kind and target number:
agent-${{ github.repository }}-${{ ...kind... }}-${{ ...number... }}
For a PR review submission with inline comments, GitHub emits multiple webhook events nearly simultaneously:
pull_request_review for the top-level review body
pull_request_review_comment for each inline comment
Those events all share the same PR-number-based concurrency group. Even with cancel-in-progress: false, GitHub Actions only keeps one pending run per concurrency group, so sibling no-mention inline-comment runs can replace/cancel the pending review-body run before it reaches agent-router.yml.
Impact
Agent invocation from top-level PR review bodies is nondeterministic when the review also includes inline comments. Whether the agent responds depends on event ordering and whether the review-body run starts before sibling comment runs are queued.
Standalone inline review comments with @sepo-agent are still expected to work; the problematic route is the bundled "submit review" path with top-level mention plus inline comments.
Suggested fix
Make Agent Entrypoint concurrency event/comment/review-specific, or otherwise avoid applying target-wide concurrency before mention validation. For example, include identifiers such as:
github.event_name
github.event.review.id for pull_request_review
github.event.comment.id for comment events
- fallback to
github.run_id when no stable event object id exists
The goal is that no-mention sibling pull_request_review_comment events cannot cancel a mention-bearing pull_request_review event.
Acceptance criteria
- Submitting a PR review with a top-level
@sepo-agent /answer and several inline comments reliably dispatches the agent route.
- Sibling inline review-comment events without mentions may skip, but must not cancel the top-level review-body run.
- Add regression coverage for entrypoint concurrency key generation or equivalent workflow assertions.
Summary
Submitting a GitHub PR review with both a top-level
@sepo-agentcommand and inline review comments can cause the actual agent invocation to be cancelled before it reaches the router.Observed example
On PR #66, review
pullrequestreview-4207425242contained:GitHub created several Agent Entrypoint runs at the same time:
pull_request_reviewrun25205475805— cancelledpull_request_review_commentruns — skipped because the inline comments did not contain a live agent mentionAs a result, the review-body agent command was not picked up.
Why this happens
agent-entrypoint.ymlcurrently uses a concurrency group keyed mostly by target kind and target number:agent-${{ github.repository }}-${{ ...kind... }}-${{ ...number... }}For a PR review submission with inline comments, GitHub emits multiple webhook events nearly simultaneously:
pull_request_reviewfor the top-level review bodypull_request_review_commentfor each inline commentThose events all share the same PR-number-based concurrency group. Even with
cancel-in-progress: false, GitHub Actions only keeps one pending run per concurrency group, so sibling no-mention inline-comment runs can replace/cancel the pending review-body run before it reachesagent-router.yml.Impact
Agent invocation from top-level PR review bodies is nondeterministic when the review also includes inline comments. Whether the agent responds depends on event ordering and whether the review-body run starts before sibling comment runs are queued.
Standalone inline review comments with
@sepo-agentare still expected to work; the problematic route is the bundled "submit review" path with top-level mention plus inline comments.Suggested fix
Make Agent Entrypoint concurrency event/comment/review-specific, or otherwise avoid applying target-wide concurrency before mention validation. For example, include identifiers such as:
github.event_namegithub.event.review.idforpull_request_reviewgithub.event.comment.idfor comment eventsgithub.run_idwhen no stable event object id existsThe goal is that no-mention sibling
pull_request_review_commentevents cannot cancel a mention-bearingpull_request_reviewevent.Acceptance criteria
@sepo-agent /answerand several inline comments reliably dispatches the agent route.