You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
handle_create_pr_error: unhandled exceptions on API calls crash conclusion job #19605
Observed while running gh-aw v0.52.1 in production in samuelkahessay/prd-to-prod — a parallel agentic pipeline with concurrent agent work. Still present on current main at 6502173c8 (v0.53.1-2-g6502173c8).
The main() function has no try/catch around any of its three API calls:
Line 59: github.rest.search.issuesAndPullRequests()
Line 70: github.rest.issues.createComment()
Line 79: github.rest.issues.create()
// Line 59 — no try/catchconstsearchResult=awaitgithub.rest.search.issuesAndPullRequests({q: searchQuery,per_page: 1,});
If any of these calls fail (rate limit, network error, permissions), the unhandled exception crashes the conclusion job.
This function is called specifically because PR creation already failed — it is the fallback-of-fallback path. A crash here means:
The diagnostic issue is not created
The conclusion job fails with an unrelated API error
The operator has no visibility into the original PR creation failure
Compare to handle_agent_failure.cjs, whose analogous failure-reporting path wraps the search/create-or-comment sequence in a guarded block and degrades with core.warning() instead of throwing (lines 607–880).
Proposed fix
Wrap the reporting sequence in a top-level try/catch. Log the error via core.warning() rather than letting it crash the conclusion job. The function should degrade gracefully — a failure to report the PR creation error should not mask the original error.
Environment
Observed in production: v0.52.1
Still present on: main at 6502173c8 (v0.53.1-2-g6502173c8)
Activity