Skip to content

fix: agent workflow dispatch chaining and duplicate issue prevention#28

Merged
microsasa merged 1 commit intomainfrom
fix/agent-session-prompts
Mar 14, 2026
Merged

fix: agent workflow dispatch chaining and duplicate issue prevention#28
microsasa merged 1 commit intomainfrom
fix/agent-session-prompts

Conversation

@microsasa
Copy link
Owner

@microsasa microsasa commented Mar 14, 2026

Two fixes for agentic workflows:

  1. create-agent-session fails with fine-grained PATs — requires OAuth tokens. Replaced with dispatch-workflow pattern using a new issue-implementer workflow (Claude Opus 4.6) that reads issue specs and opens PRs.

  2. Agents created duplicate issues on repeated runs — agents now read existing open issues before creating new ones and skip anything already reported.

Also:

  • dispatch-workflow max set to 2 to match create-issue max (review fix)
  • [aw][code health] and [aw][test audit] title prefixes and labels on agent-created issues

Closes #29
Closes #30

@microsasa microsasa changed the title ci: add issue-implementer workflow with dispatch chaining fix: replace create-agent-session with dispatch-workflow chaining Mar 14, 2026
@microsasa microsasa force-pushed the fix/agent-session-prompts branch 2 times, most recently from e608193 to d4977ca Compare March 14, 2026 06:59
@microsasa microsasa requested a review from Copilot March 14, 2026 07:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s agentic GitHub workflows to avoid create-agent-session (which requires OAuth tokens) by chaining from agent-created issues into a new workflow-dispatch-based “issue implementer” workflow, and it reduces duplicate agent-created issues by instructing agents to read existing open issues first.

Changes:

  • Replace create-agent-session safe output usage with a dispatch-to-issue-implementer workflow pattern.
  • Add a new issue-implementer workflow (and compiled lock) that reads an issue spec and opens a PR.
  • Update code-health/test-analysis agent instructions to avoid duplicates and to apply standard title prefixes + labels to created issues.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/test-analysis.md Switch safe-outputs to workflow dispatch chaining; update agent instructions to read open issues + add labels/prefixes.
.github/workflows/test-analysis.lock.yml Compiled workflow updates removing agent-session creation and adding dispatch workflow support/permissions.
.github/workflows/issue-implementer.md New workflow definition to implement a specified issue and open a PR.
.github/workflows/issue-implementer.lock.yml Compiled workflow for the new issue implementer pipeline.
.github/workflows/code-health.md Switch safe-outputs to workflow dispatch chaining; update agent instructions to read open issues + add labels/prefixes.
.github/workflows/code-health.lock.yml Compiled workflow updates removing agent-session creation and adding dispatch workflow support/permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…licate issues

Two fixes for agentic workflows:

1. create-agent-session fails with fine-grained PATs (requires OAuth).
   Replaced with dispatch-workflow pattern using a new issue-implementer
   workflow (Claude Opus 4.6) that reads issue specs and opens PRs.

2. Agents created duplicate issues on repeated runs. Added instruction
   to read existing open issues before creating new ones.

Also adds [aw][code health] and [aw][test audit] title prefixes
and labels to agent-created issues.

Closes #29
Closes #30

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@microsasa microsasa force-pushed the fix/agent-session-prompts branch from d4977ca to 17750d9 Compare March 14, 2026 07:05
Copy link
Owner Author

@microsasa microsasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: dispatch-workflow max increased to 2 to match create-issue max. The tool name mismatch in lock files is auto-generated by gh aw compile — recompile resolved it.

@microsasa microsasa changed the title fix: replace create-agent-session with dispatch-workflow chaining fix: agent workflow dispatch chaining and duplicate issue prevention Mar 14, 2026
@microsasa microsasa merged commit 8968c91 into main Mar 14, 2026
4 checks passed
@microsasa microsasa deleted the fix/agent-session-prompts branch March 16, 2026 07:08
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.

bug: agentic workflows create duplicate issues on repeated runs bug: create-agent-session fails with fine-grained PATs

2 participants