Skip to content

Organize failed workflow issues under parent issue for filtering#9570

Merged
pelikhan merged 6 commits intomainfrom
copilot/update-agentic-workflow-issue-strategy
Jan 11, 2026
Merged

Organize failed workflow issues under parent issue for filtering#9570
pelikhan merged 6 commits intomainfrom
copilot/update-agentic-workflow-issue-strategy

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

Plan: Update Agent Failure Issue Creation with Parent Issue Strategy

Implementation Steps

  • Understand current implementation
    • handle_agent_failure.cjs creates individual issues for each failed workflow
    • Located in conclusion job in /pkg/workflow/notify_comment.go
    • Uses search to find existing issues with same title
  • Update handle_agent_failure.cjs to implement parent issue strategy
    • Add function to search for/create parent issue "[aw] Agentic Workflow Issues" with label "agentic-workflows"
    • Update parent issue body with helpful overview about troubleshooting
    • Link created failure issues as sub-issues to parent using GraphQL mutation
    • Handle cases where sub-issue API is not available (fallback)
    • Add 7-day expiration to parent issue
  • Test the changes
    • Verify parent issue creation with expiration
    • Verify sub-issue linking
    • Test fallback when sub-issue API unavailable
    • Update existing tests to work with parent issue
  • Run code checks
    • Format JavaScript (make fmt-cjs)
    • Lint JavaScript (make lint-cjs)
    • Run JavaScript tests (all pass)
    • Build Go code (successful)

Changes Made

Modified /home/runner/work/gh-aw/gh-aw/actions/setup/js/handle_agent_failure.cjs:

  • Added ensureParentIssue() function to search for or create "[aw] Agentic Workflow Issues" parent issue
  • Parent issue body includes:
    • Overview of why it exists
    • Instructions for filtering with no:parent-issue
    • Troubleshooting guide with debug-agentic-workflow agent
    • Links to CLI commands (gh aw logs, gh aw audit)
    • Resources and documentation links
    • Expiration marker set to 7 days (same as individual failure issues)
  • Added linkSubIssue() function to link failure issues as sub-issues using GraphQL addSubIssue mutation
  • Updated main flow:
    1. First search for/create parent issue with 7-day expiration
    2. Then create workflow-specific failure issue (7-day expiration)
    3. Link failure issue as sub-issue to parent
  • Graceful fallback when:
    • Sub-issue API is not available (logs warning, continues)
    • Parent issue creation fails (logs warning, creates failure issue without parent)

Updated /home/runner/work/gh-aw/gh-aw/actions/setup/js/handle_agent_failure.test.cjs:

  • Added 4 new tests for parent issue functionality:
    • Parent issue creation and sub-issue linking
    • Reusing existing parent issue
    • Handling sub-issue API unavailability
    • Continuing when parent creation fails
  • Fixed 5 existing tests to account for parent issue being created first
  • Added test to verify parent issue has expiration marker

Behavior Changes

Before: Each failed workflow created a standalone issue with label agentic-workflows

After:

  1. First run creates parent issue "[aw] Agentic Workflow Issues" (expires in 7 days)
  2. Each failure creates a workflow-specific issue (expires in 7 days) AND links it as sub-issue to parent
  3. Users can:
    • View all failures as sub-issues under one parent
    • Filter out failure issues from main list using no:parent-issue
    • Access comprehensive troubleshooting guide in parent issue
Original prompt

Update the strategy to create issues on failed agentic workflow in the conclusion job.

A parent issue should be used to hide all the "failed issue" as sub issues. This allows to filter by filtering using "no:parent-issue"

So update the code by first searching or create a parent issue for all agentic workflow issues:

title: [aw] Agentic Workflow Issues
label: agentic-workflows

The body should give an overview of why this issue exists. Links to relevant information about trouble shooting. How to use the debug-agentic-workflow from the web or copilot cli.

The create issues should be added a sub issue to the parent issue.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 11, 2026 00:03
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update issue creation strategy for failed agentic workflows Organize failed workflow issues under parent issue for filtering Jan 11, 2026
Copilot AI requested a review from pelikhan January 11, 2026 00:19
@pelikhan
Copy link
Contributor

@copilot the parent issue should expire in 1d too

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 11, 2026

@copilot the parent issue should expire in 1d too

Added 1-day expiration to the parent issue. The parent issue now includes <!-- gh-aw-expires: ... --> marker set to 1 day from creation, while individual failure issues maintain their 7-day expiration. (e104612)

@pelikhan
Copy link
Contributor

@copilot keep parent at 7d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 11, 2026

@copilot keep parent at 7d

Changed parent issue expiration to 7 days to match the individual failure issues. (5cb1ca0)

@pelikhan pelikhan marked this pull request as ready for review January 11, 2026 01:36
@pelikhan pelikhan merged commit ef28ed0 into main Jan 11, 2026
@pelikhan pelikhan deleted the copilot/update-agentic-workflow-issue-strategy branch January 11, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants