Dev.to AI 🤖 Ai 👁 0 📖 5 min read

What to put in a GitHub issue so an AI coding agent can fix it

Several coding agents can start from a GitHub issue. You assign the issue to GitHub Copilot's coding agent, or you mention @claude in it with Claude Code's GitHub Action, and some time later a pull request shows up. Open

Several coding agents can start from a GitHub issue. You assign the issue to GitHub Copilot's coding agent, or you mention @claude in it with Claude Code's GitHub Action, and some time later a pull request shows up. OpenAI's Codex and Google's Jules work on GitHub repositories too.

Whether that pull request is worth your review depends mostly on the issue. An agent reads your code well, but an issue written for a colleague who already knows the context is often too thin for it.

I built Vroni, an AI coding agent for GitHub that works the same way. You give it a task in plain words, from its dashboard or from a GitHub issue, and it opens a pull request for you to review. What follows applies to all of these agents.

What the agent finds by itself

Before it writes code, a good agent reads the repository. It finds the files involved and the patterns your code already uses. You don't need to tell it that the project uses Laravel or where the controllers live.

What it can't find in the code is the reason for the change. It doesn't know what your users expect, or which of three possible approaches you'd accept. Those are the parts that belong in the issue.

What a good issue answers

What should change?

Describe what you want to see when it's done, and leave the implementation to the agent. "Customers can download their invoices as PDF from the billing page" tells the agent much more than "add a PDF library".

Where?

Name the page, URL, file or class if you know it. If you don't, describe what a user sees, like "the orders table in the admin area".

How will you know it's done?

Write down what you will check in the pull request. "The button downloads a PDF with the invoice number in the file name" gives the agent something to test against.

What should stay as it is?

Say what the agent should leave alone. "Don't change the public API" and "keep the current design" are short and save you a round of changes.

Four issues that work

A bug:

On /settings/members, removing a member doesn't revoke their open invitations. The invitations list still shows their email until the page is reloaded. Removing a member should also revoke their open invitations, and the list should update right away.

A feature:

Add a "Copy link" button next to each shared report on /reports. It copies the public URL of the report and shows "Copied" for two seconds. Use the existing Button component in resources/js/Components.

An upgrade:

Upgrade the app from Laravel 11 to Laravel 12. Follow the official upgrade guide and update the packages that need it. Run the test suite before and after. Don't change how the app behaves.

Tests:

app/Services/InvoiceTotals.php has no tests. Write unit tests for discounts, tax rounding and invoices with zero items. Don't change the class unless a test shows a bug. If it does, explain the bug in the pull request.

None of these needs special wording. They read like a message to a developer who knows how to code but is new to your project.

An issue form for agent tasks

GitHub issue forms make people fill in the parts that matter. Save this as .github/ISSUE_TEMPLATE/agent-task.yml:

name: Task for a coding agent
description: A change an AI coding agent can turn into a pull request.
title: "[agent] "
labels: ["agent"]
body:
  - type: textarea
    id: change
    attributes:
      label: What should change?
      description: The result a user or developer will see, not the code.
      placeholder: Customers can download their invoices as PDF from the billing page.
    validations:
      required: true
  - type: input
    id: where
    attributes:
      label: Where?
      description: Page, URL, file or class, if you know it.
  - type: textarea
    id: done
    attributes:
      label: How will you know it's done?
      description: What you will look for in the pull request.
    validations:
      required: true
  - type: textarea
    id: keep
    attributes:
      label: What should stay as it is?
      placeholder: Don't change the public API. Keep the current design.
  - type: markdown
    attributes:
      value: |
        Don't paste passwords, API keys or customer data here.
        Everyone with access to this repository can read issues.
        On a public repository, that's anyone.

Create the agent label in the repository first, because GitHub only adds labels that already exist. Some agents start from a label of their own, like vroni for Vroni. Put that one in the form only if every issue from it should start a task, because each task uses credits.

Issues that don't work

An agent can't log in to your servers or your outside dashboards. "Find out why the nightly export is slow on the live server" won't work. "The export in app/Jobs/ExportOrders.php loads all orders into memory; make it process them in chunks of 500 and keep the CSV the same" will.

Vague issues cost you. "Improve the dashboard" leaves the agent to guess, and you review the guess. With agents that bill by the minute, like Vroni, you also pay for the guessing. "The dashboard takes several seconds to load for accounts with more than 1,000 orders; make it faster without changing what it shows" gives it a target.

Two unrelated changes belong in two issues. Small pull requests are easier to review, and when one of them is wrong, you throw away less.

Secrets don't belong in issues at all. The agent doesn't need your API keys to write code, and the issue text stays on GitHub for everyone with access to the repository.

Tests and checks

Vroni runs the checks your project already has and fixes failures before it hands the work back, and the other agents can run your tests too. If the repository has no tests, the agent has no way to notice that it broke something.

So a good first issue for a new agent is often a test issue, like the InvoiceTotals example above. It's easy to review and can't break anything. Every later pull request is then checked against those tests.

Protect your main branch too. Vroni never pushes to main, but a branch rule that requires a pull request and passing checks protects you from every tool and every person who works on the repository. On a private repository, branch rules need a paid GitHub plan.

Reading the pull request

Compare the pull request description with the issue. Then look at the list of changed files before you read any diff. Every file should belong to the task, and a surprise file is the first thing to ask about. If you can, check out the branch or open a preview build and try the change yourself.

When the pull request isn't what you meant, you don't have to start over. Most agents take a comment on the pull request. With Copilot you mention @copilot, and with Vroni you mention @vroni or choose Request changes on the task. Be as specific in that comment as in the issue. "Use the format 25.11.2026 for dates in the export" works, and "fix the dates" gets you another guess.

📰 Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.