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
We should give Agents stronger instructions for avoiding filing the same issues twice.
We should have a step (maybe a safe-output?!) that the Agent can run to get issue numbers and titles of the last ~100 suggestions made by that agent to help ensure that the Agent doesn't repeat the same suggestions again.
Let's think through a good way to do this without adding specific instructions to every workflow (a fragment maybe? how can we insert the title prefix for each agent into the script? etc)
Duplicate issue detector workflow #197 — It established the duplicate-detection workflow pattern that already searches open and resolved reports and could be extended for this issue’s proposed history check.
TL;DR: the lowest-risk path is to add a single reusable duplicate preflight to gh-aw-fragments/safe-output-create-issue.md (which all create-issue workflows already import), and use each workflow’s title-prefix to fetch/review the last ~100 prior reports before creating a new issue.
Recommendation
Implement duplicate prevention centrally in the shared safe-output-create-issue fragment, not per-workflow prompts, then enforce a consistent title-prefix for every workflow that can call create_issue.
This gives one place to maintain the behavior, matches your “no per-workflow duplication” goal, and uses tools already available (github-search_issues + pagination) without waiting on new MCP APIs.
Findings
create-issue guidance is centralized but currently only documents API limits, not duplicate-preflight behavior:
19/20 define safe-outputs.create-issue.title-prefix; gh-aw-plan.md is the only missing one.
All 20/20 create-issue workflows import gh-aw-fragments/safe-output-create-issue.md.
Verification
I ran repository scans to verify current behavior:
$ python - <<'PY'from pathlib import Pathroot=Path('/home/runner/work/ai-github-actions/ai-github-actions/.github/workflows')files=sorted(root.glob('gh-aw-*.md'))create=[]with_dup=[]for f in files: t=f.read_text() if 'create-issue:' in t: create.append(f.name) if 'github-search_issues' in t or 'Check for duplicates' in t or 'title prefix' in t: with_dup.append(f.name)print('create_issue_workflows',len(create))print('with_duplicate_guidance',len(with_dup))print('without_duplicate_guidance',len(create)-len(with_dup))PY
create_issue_workflows 20
with_duplicate_guidance 12
without_duplicate_guidance 8
$ python - <<'PY'from pathlib import Pathroot=Path('/home/runner/work/ai-github-actions/ai-github-actions/.github/workflows')missing=[]for f in sorted(root.glob('gh-aw-*.md')): t=f.read_text() if 'create-issue:' in t and 'title-prefix:' not in t: missing.append(f.name)print('missing_title_prefix',len(missing))print('\n'.join(missing))PY
missing_title_prefix 1
gh-aw-plan.md
$ python - <<'PY'from pathlib import Pathroot=Path('/home/runner/work/ai-github-actions/ai-github-actions/.github/workflows')missing=[]for f in sorted(root.glob('gh-aw-*.md')): t=f.read_text() if 'create-issue:' in t and 'gh-aw-fragments/safe-output-create-issue.md' not in t: missing.append(f.name)print('create_issue_without_fragment',len(missing))PY
create_issue_without_fragment 0
/ai let's make title-prefix an input that can be configured in the workflow_call (with a default) and then let's just use that title-prefix var for the issue search script that's part of the fragment? Make sure you run compile and ensure it ends up in the lock file correctly.
TL;DR: the exact change should be to add a configurable issue-title-prefix workflow input (with default) in gh-aw-plan, wire it to safe-outputs.create-issue.title-prefix, and use that same input in the duplicate-search instructions in the shared safe-output-create-issue fragment.
Concrete edits
Add a new workflow_call input and wire title-prefix in .github/workflows/gh-aw-plan.md (current relevant block is at gh-aw-plan.md:20-77):
# .github/workflows/gh-aw-plan.mdon:
workflow_call:
inputs:
issue-title-prefix:
description: "Title prefix for issues created by this workflow"type: stringrequired: falsedefault: "[plan] "safe-outputs:
activation-comments: falsecreate-issue:
max: ${{ inputs.create-issue-max }}title-prefix: "${{ inputs.issue-title-prefix }}"
Extend .github/workflows/gh-aw-fragments/safe-output-create-issue.md (currently only limitations at safe-output-create-issue.md:1-13) to include duplicate preflight guidance that uses the prefix input:
## Duplicate Preflight (required before `create_issue`)1. Search prior issues by title prefix:
-`github-search_issues` with query
`repo:{owner}/{repo} is:issue in:title "${{ inputs.issue-title-prefix }}" sort:updated-desc`2. Review at least the most recent ~100 matching issues (paginate with `perPage: 20-30`).
3. If the same root cause/request already exists (open or closed), do **not** create a new issue; call `noop` and reference the existing issue number(s).
Update consumer docs for plan inputs in gh-agent-workflows/plan/README.md:25-32 to include issue-title-prefix.
Why this matches your ask
gh-aw-plan.md currently has no title-prefix input and no safe-outputs.create-issue.title-prefix (gh-aw-plan.md:20-77).
The shared create-issue fragment currently has only API limits and no duplicate-search script/instructions (safe-output-create-issue.md:1-13).
This makes the prefix configurable via workflow_call with a default, and then uses that same variable for the duplicate search logic in the shared fragment.
Verification run
I ran:
make compile
Result: compile completed with the repository’s existing known errors in gh-aw-mention-in-issue-no-sandbox.md and gh-aw-mention-in-pr-no-sandbox.md (threat-detection vs sandbox mismatch), unrelated to this change request.
Activity
github-actions commentedon Feb 25, 2026
3 related issues
What is this? | From workflow: Duplicate Issue Detector
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
github-actions commentedon Feb 25, 2026
TL;DR: the lowest-risk path is to add a single reusable duplicate preflight to
gh-aw-fragments/safe-output-create-issue.md(which allcreate-issueworkflows already import), and use each workflow’stitle-prefixto fetch/review the last ~100 prior reports before creating a new issue.Recommendation
Implement duplicate prevention centrally in the shared
safe-output-create-issuefragment, not per-workflow prompts, then enforce a consistenttitle-prefixfor every workflow that can callcreate_issue.This gives one place to maintain the behavior, matches your “no per-workflow duplication” goal, and uses tools already available (
github-search_issues+ pagination) without waiting on new MCP APIs.Findings
create-issueguidance is centralized but currently only documents API limits, not duplicate-preflight behavior:.github/workflows/gh-aw-fragments/safe-output-create-issue.md:1-14.github/workflows/gh-aw-agent-suggestions.md:92-96(explicit duplicate search).github/workflows/gh-aw-flaky-test-investigator.md:99-102(explicit duplicate check).github/workflows/gh-aw-branch-actions-detective.md:114-118(prefix-based check).github/workflows/gh-aw-duplicate-issue-detector.md:72-73, 121-127safe-outputs.create-issue.title-prefix;gh-aw-plan.mdis the only missing one.create-issueworkflows importgh-aw-fragments/safe-output-create-issue.md.Verification
I ran repository scans to verify current behavior:
Detailed Action Plan
Add centralized duplicate-preflight instructions in:
.github/workflows/gh-aw-fragments/safe-output-create-issue.mdcreate_issuecall:safe-outputs.create-issue.title-prefix(when present)github-search_issuesagainst open+closed issues within:title "(prefix)"perPage: 20-30) until ~100 recent items are reviewednoopinstead ofcreate_issueClose the one metadata gap by adding
title-prefixto:.github/workflows/gh-aw-plan.md(safe-outputs.create-issueblock at lines 73-77)Codify a strict matching rule in the same fragment:
noop”Optionally harden with a future MCP helper (separate follow-up):
github-search_issuesquery construction later, but is not required for immediate rollout.Validation pass:
make compilemake lintRelated Items
.github/workflows/gh-aw-fragments/safe-output-create-issue.md:1-14.github/workflows/gh-aw-plan.md:73-77create-issueworkflow block missingtitle-prefix.github/workflows/gh-aw-agent-suggestions.md:92-96.github/workflows/gh-aw-duplicate-issue-detector.md:72-73,121-127What is this? | From workflow: Issue Triage
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
strawgate commentedon Feb 26, 2026
/ai let's make title-prefix an input that can be configured in the workflow_call (with a default) and then let's just use that title-prefix var for the issue search script that's part of the fragment? Make sure you run compile and ensure it ends up in the lock file correctly.
That would work I think
github-actions commentedon Feb 26, 2026
TL;DR: the exact change should be to add a configurable
issue-title-prefixworkflow input (with default) ingh-aw-plan, wire it tosafe-outputs.create-issue.title-prefix, and use that same input in the duplicate-search instructions in the sharedsafe-output-create-issuefragment.Concrete edits
title-prefixin.github/workflows/gh-aw-plan.md(current relevant block is atgh-aw-plan.md:20-77):.github/workflows/gh-aw-fragments/safe-output-create-issue.md(currently only limitations atsafe-output-create-issue.md:1-13) to include duplicate preflight guidance that uses the prefix input:gh-agent-workflows/plan/README.md:25-32to includeissue-title-prefix.Why this matches your ask
gh-aw-plan.mdcurrently has no title-prefix input and nosafe-outputs.create-issue.title-prefix(gh-aw-plan.md:20-77).safe-output-create-issue.md:1-13).workflow_callwith a default, and then uses that same variable for the duplicate search logic in the shared fragment.Verification run
I ran:
Result: compile completed with the repository’s existing known errors in
gh-aw-mention-in-issue-no-sandbox.mdandgh-aw-mention-in-pr-no-sandbox.md(threat-detection vs sandbox mismatch), unrelated to this change request.What is this? | From workflow: Mention in Issue
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.