Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

The auto-assign workflow was assigning issues that already had assignees. The AI agent correctly filtered search results with no:assignee but failed to re-verify the assignees field after calling issue_read, creating a race condition window.

Changes

Strengthened prompt verification requirements:

  • Added explicit two-step verification mandate (search filter + post-read check)
  • Inserted numbered 6-step verification checklist with CRITICAL designation
  • Added explicit EXIT condition: "IF assignees is NOT empty, EXIT WITHOUT ASSIGNING"
  • Changed conditional from "If you find a match" to "If you find a match AND the issue has no assignees"

Before:

- **Has no assignees** - When you retrieve issues from GitHub, explicitly 
  check the `assignees` field. Skip any issue where `issue.assignees` is 
  not empty or has length > 0.

After:

- **Has no assignees** - This is CRITICAL. You MUST verify this in two places:
  1. Use `no:assignee` in your search query
  2. After retrieving the issue details, explicitly check that `issue.assignees` 
     is an empty array or has length 0
  3. **SKIP AND EXIT if `issue.assignees` is not empty**

**Verification Steps (REQUIRED):**
1. Search for issues using `no:assignee` filter
2. Pick the oldest unassigned issue from search results
3. Retrieve full issue details using `issue_read`
4. **VERIFY** that `issue.assignees` is empty (length === 0)
5. **IF assignees is NOT empty, EXIT WITHOUT ASSIGNING**
6. Only if `issue.assignees` is empty, proceed to list contributors and assign

Recompiled workflow lock file with updated prompt.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21310240804/job/61345358327

Debug this run and make sure the agent only assigns issues without an assignee

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


💡 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 2 commits January 28, 2026 05:28
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…orkflow

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue assignment to unassigned issues Fix: Require explicit assignee verification in auto-assign workflow Jan 28, 2026
Copilot AI requested a review from pelikhan January 28, 2026 05:34
@pelikhan pelikhan closed this Jan 28, 2026
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