Skip to content

chore(ci): fix agent-fix issue targeting and PR token usage#2200

Merged
naqvitalha merged 2 commits intomainfrom
chore/fix-agent-workflow-issues
Mar 23, 2026
Merged

chore(ci): fix agent-fix issue targeting and PR token usage#2200
naqvitalha merged 2 commits intomainfrom
chore/fix-agent-workflow-issues

Conversation

@naqvitalha
Copy link
Copy Markdown
Collaborator

Description

Fixes two issues found in Agent Fix run #23455139708 ($12.70, 136 turns, 60 min):

1. Agent fixed the wrong issue — Was assigned #1914 but fixed #2175 instead. The prompt said "Fix this GitHub issue" without specifying which one. Now passes #${{ github.event.issue.number }} and title explicitly, matching how agent-triage already works.

2. Agent created PR with wrong token — PR #2196 was created as app/github-actions (unmergeable) because the agent used bare gh pr create instead of GH_TOKEN="$AGENT_PR_TOKEN". Adds pre-flight token verification, fallback to SHOPIFY_GH_ACCESS_TOKEN, and post-creation author check to the raise-pr skill.

Reviewers' hat-rack 🎩

  • agent-fix.yml: compare the prompt with agent-triage.yml which already passes issue context correctly
  • raise-pr/SKILL.md: check the new blockquote verification steps are clear enough to prevent the agent from skipping them

Test plan

  • Next agent-fix run targets the correct issue
  • Next agent-fix run creates PRs with the correct author (not app/github-actions)

Add token verification step and fallback to prevent PRs being created
with the wrong token (default GITHUB_TOKEN shows as app/github-actions
and can't be merged). Adds post-creation author check.
The prompt said "Fix this GitHub issue" without specifying which one,
relying on claude-code-action to inject context. Over long runs the
agent drifted to a different issue (#2175 instead of #1914). Now the
issue number and title are passed explicitly in the prompt.
@naqvitalha naqvitalha force-pushed the chore/fix-agent-workflow-issues branch from f684057 to 295287e Compare March 23, 2026 21:16
@naqvitalha naqvitalha merged commit b5a7d30 into main Mar 23, 2026
13 checks passed
@naqvitalha naqvitalha deleted the chore/fix-agent-workflow-issues branch March 23, 2026 21:17
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.

Dynamic item height causes items to overlap during fast scroll

2 participants