Skip to content
mentoor

Topic 1 of 5 · 4 min read

Delegating an issue to a cloud agent

Goal: Rewrite a vague issue into one a cloud agent can turn into a reviewable pull request.

A cloud agent only knows what the issue, the repository and its instructions file tell it, so write the issue as if the reader cannot ask you a question. Nobody is watching the agent work. It will not stop to ask what you meant. It will guess, finish, and open a pull request.

Check yourself · 1 of 3

Which issue text is best for a cloud agent that cannot ask you questions?

Choose one answer

Why it matters

A cloud agent such as GitHub Copilot's cloud agent, Codex cloud or Claude Code on the web reads a task, works in a remote sandbox with a copy of your repository, and hands back a branch or pull request. You are not at the keyboard to correct it at minute two. A vague issue costs you a full review of a wrong answer instead of a quick redirect.

What a good issue holds

  1. The problem, in one or two sentences. What is wrong or missing, and for whom.
  2. Where to look. Name the files, modules or endpoints. The agent can search, but a pointer saves it from picking the wrong similar-looking module.
  3. Scope and limits. What to change, and what to leave alone: "do not touch the public API", "no new dependencies", "only the billing package".
  4. Done criteria that can be checked. Behaviour in the form "given X, the result is Y", plus the command that proves it, for example the test command.
  5. How to verify. Which tests exist, which new ones to add, and how to run them in the sandbox.
  6. A stop rule. "If the fix needs a schema change, say so in the pull request and stop."

Put rules that apply to every task (code style, test command, folders to avoid) in the repository's instructions file, such as AGENTS.md, CLAUDE.md or Copilot's instructions file, not in each issue.

Before and after

Before:

Dates are wrong on invoices. Please fix.

The agent has to guess which invoices, which dates and what "wrong" means. After:

Invoice PDFs show the due date in UTC, so customers in Sydney see the previous day. The date is formatted in src/billing/pdf/dates.ts. Format it in the customer's timezone field instead. Do not change the stored value or the API response. Add a test in dates.test.ts for a Sydney customer at 23:30 UTC. Done when npm test -- billing passes. If the customer has no timezone, keep UTC and note it in the pull request.

What goes wrong

  • A goal with no check. "Improve performance" ends in a plausible diff nobody can judge.
  • Hidden context. The real constraint lives in a chat thread the agent cannot see.
  • No scope fence. The agent fixes the bug, then also renames helpers and updates unrelated files, and the review grows.
  • Several tasks in one issue. The agent does part of each. Write one issue per outcome.

Treat the first run as a test of your issue. If the pull request is wrong, ask what the issue failed to say before you blame the agent.

Examples

Vague ticket to agent-ready ticket

Vague: "Search is slow."

Agent-ready: "The /api/search endpoint scans the whole products table for each request. Add an index on products.name through a new migration in db/migrations, and do not change the query code. Done when npm run test:db passes and the new migration applies and rolls back cleanly. If you think the query needs rewriting, say so in the pull request instead."

Moving a rule out of the issue

Three issues in a row end with "use our logger, not console.log". Move that line to the instructions file once. Every later task, from any agent, now starts with it, and the issues shrink to the part that is different each time.

Key points

  • A cloud agent works without you, so the issue must carry all the context it needs.
  • Name the files or modules to start from, and say what must not change.
  • Write done criteria as observable behaviour plus the command that checks it.
  • Put rules that apply to every task in the repository instructions file, not in each issue.
  • One issue should ask for one outcome, with a stop rule for the case where the plan does not fit.

Common mistakes

  • Writing the issue as a goal ("make it faster") with no way to check it.
  • Assuming the agent knows context that lives in chat, a meeting or your head.
  • Leaving scope open, so the pull request touches unrelated files.
  • Bundling two or three outcomes into one issue.

Check yourself · 2 of 3

Where should a rule that applies to every task, like "run npm test before finishing", live?

Choose one answer

Check yourself · 3 of 3

An issue asks an agent to fix a bug, rename two modules and update the docs. What is the best change?

Choose one answer

Practice items, not counted towards your mastery.

Start here