Est.

Encoding a GitHub Issue so It Becomes a Complete Claude Code Brief With No Human Relay

Four elements let a cold-start agent open a PR unaided.

· 9 min read
Cover illustration for “Encoding a GitHub Issue so It Becomes a Complete Claude Code Brief With No Human Relay”
Slack Agent Workflows · November 11, 2026 · 9 min read · 1,991 words

A GitHub issue becomes a complete Claude Code brief only when it contains verifiable acceptance criteria, runnable reproduction steps, explicit scope boundaries, and a written stop condition. Those elements let the agent start cold and open a PR without a human relaying missing context. A bring-your-own API key cloud coding agent runner supplies the execution environment, but it cannot replace the brief.

Why a GitHub issue fails as an agent brief by default

A typical issue assumes its reader remembers what was decided earlier. A human fills in the gaps with Slack history, what they know about the repository, and conversations that never reached GitHub. A coding agent has none of that shared memory when it starts. Its recollection is ephemeral, so a decision explained during an earlier session is unavailable unless it was written into an artifact the next session can read.

That gap can remain hidden during the first implementation, when a human walks the agent through the task. It becomes an operational problem when later runs proceed unattended. The remedy is to record decisions in the issue and have the agent re-read it with gh issue view N at the start of each session. More prose is not the goal. The issue must contain the decisions that otherwise require a person to interpret the request, constrain the work, or declare it complete.

How the trigger fires and what the agent reads first

Claude Code Action v1 has three interactive triggers that can be configured, including an @claude mention, an assignee trigger, and a label trigger such as claude-implement. The action detects its mode from the event. The label path needs no newly composed prompt when a write-permitted user applies the configured label, but that does not make it automation mode. Label and assignee triggers use Tag Mode, while an explicit workflow prompt selects automation mode.

This distinction determines where the initial directive comes from. In automation mode, the workflow’s explicit prompt directs the agent, which can also read the repository, shell output, and GitHub API through its granted tools. The workflow therefore needs to direct the agent to read the issue at session open, rather than assume that the triggering event supplies a complete brief.

The issue body is the artifact its author controls completely. Encoding it before the trigger fires removes the need to supply missing decisions after execution has begun. Otherwise, the agent may invent an interpretation or wait for clarification that never arrives. The same requirement applies when work originates in Linear or in error-monitoring alerts escalated to GitHub, because the authoring surface does not change what a cold session needs.

Acceptance criteria written so the agent can verify them without asking

Acceptance criteria must describe observable conditions. “The button should feel snappier” leaves both the desired behavior and the standard of proof undefined. The agent cannot verify a feeling without interpreting it. A usable criterion instead names a test, an expected HTTP status, a response shape, a lint rule, or a string that must appear in output.

For a small checkout bug, the contrast is straightforward. Before encoding, the issue might say “Fix checkout so the payment flow works.” After encoding, it could say “The checkout test in src/payments/checkout.test.ts passes when run with npm test -- src/payments/checkout.test.ts.” That is a condition the agent can evaluate. Where the test alone does not capture the intended behavior, the issue must also specify the expected result rather than leave the agent to infer it from the command.

Claude Code Action’s solutions guide names “Custom Review Checklists — Enforce team standards” as a workflow pattern. The workflow still needs to instruct the agent to evaluate it. Checkbox formatting alone does not establish autonomous task-state behavior.

Writing precise criteria takes work, but tasks that come up again need not start from a blank page. Bug fixes, migrations, and API endpoint additions can each use a template with the relevant checklist skeleton already present. The author then supplies task-specific commands and expected results.

Reproduction steps that give the agent a runnable starting point

Reproduction steps are the agent’s first executable entry point. “Run the payment flow” describes an activity without specifying how to perform it. By contrast, npm test -- src/payments/checkout.test.ts gives the agent a concrete tool invocation. A runnable starting point lets the agent investigate the reported failure instead of first searching for the intended workflow.

A bug brief needs environment preconditions, an exact command sequence, and an observable symptom. Preconditions include the required seed data, environment variables, and feature flags. The symptom tells the agent what failure it is trying to reproduce. Without those details, a clean environment may produce a clean result, leading the agent to conclude that the reported bug does not exist.

For CI failure triage, the issue should name both the failing test and the files it exercises. That gives the agent a bounded path from reproduction through diagnosis and patching to a draft PR. Without those names, it must look through the test suite before it can start the repair.

Feature issues need a different framing of the same requirement. There may be no existing failure to reproduce, so the issue should provide a “how to verify this works” sequence instead. That sequence still needs preconditions, commands, and an expected observation. It establishes the runnable route by which the agent will demonstrate the new behavior.

Scope boundaries that keep the agent inside safe territory

An acceptance criterion defines the required result, but not every acceptable way to reach it. Without clear boundaries, an agent may change nearby files, upgrade a dependency, or refactor a helper as part of an otherwise reasonable fix. Each addition expands the review surface. The issue must therefore state where the agent may work and what remains outside its authority.

Those constraints should name the directories the agent may and may not use, the file types with limits on their use, and the commands it may not run. Workflow files, dependency manifests, and migration files warrant explicit treatment when they are off-limits. The brief should also say whether the agent may open files not referenced in the issue. Leaving that decision unstated delegates more discretion than a narrow task may require.

In its security research on Claude Code Action, Microsoft found that issue bodies can have prompt injection payloads hidden in HTML comments. Such comments can be invisible in the browser while remaining visible to the agent, and can instruct it to read sensitive files or create malicious PRs. Explicit task boundaries constrain the intended authority, but written instructions are not a substitute for enforced permissions.

CLAUDE.md sets constraints for the whole repository, while the issue sets them for the task. Both layers are needed because a global file cannot identify the relevant directories for every bug. A “Do not touch” section at the bottom of the brief makes prohibited paths and file types explicit and easy to review. Environment-level permissions must support those boundaries if they are to limit the consequences of an influenced agent.

Success signals that tell the agent when to stop and open the PR

Acceptance criteria define what must be true, while success signals define when to check it and stop. The agent needs a terminal condition it can evaluate without asking a person whether the work is sufficient. Otherwise, additional edge-case handling, refactoring, and test expansion can enlarge a PR beyond its original purpose.

The definition of done needs a CI gate, a scope gate, and a PR readiness gate. The CI gate names the tests and lint checks that must pass. The scope gate requires the diff to touch only files allowed by the issue. The PR readiness gate requires the description to include a completed version of the issue’s acceptance checklist. Together, these gates test the result, its boundaries, and the evidence presented for review.

The issue should give the exact shell command and expected output, and tell the agent to open a draft PR containing Closes #N once the required gates pass. The agent must stop once the PR is created. For CI failure triage, the brief and workflow configuration should also prohibit the agent from touching branches it already created. That guard prevents repeated intervention from becoming an infinite loop.

A reusable issue template that encodes all four elements by default

GitHub stores issue templates in .github/ISSUE_TEMPLATE/ on the repository’s default branch. Putting the structure there makes encoding part of authorship rather than a convention that each engineer must remember. Use required fields where possible so acceptance criteria cannot be omitted. A checklist placeholder should require at least one verifiable condition, while leaving the author responsible for its actual content.

The skeleton below is in paragraph form and can be copied and changed to fit template fields. Its labels identify the sections of the brief, and the placeholders identify the decisions the author must supply. For a bug template, reproduction comes first so the starting failure is immediately available.

Reproduction steps. [List the seed data, environment variables, and feature flags that are needed.] [Insert the exact command sequence.] [Describe the observable failure.] [Name the failing test and the files it exercises.]

Acceptance criteria. [Insert the acceptance checklist with at least one verifiable condition.] [Name each test command, endpoint response, lint rule, or output assertion needed to show that the behavior is as expected.]

Scope boundaries. [Name permitted paths and file types.] [State whether the agent may open files not referenced in this issue.] [Name prohibited commands and any task-specific restrictions beyond CLAUDE.md.]

Success signals. [Add the command for the final verification and the output it should produce.] [Require the diff to stay within the permitted files.] [Require the completed acceptance checklist in the PR description.] [Instruct the agent to stop and open a draft PR containing Closes #N when all gates pass.] [For CI triage, prohibit changes to branches the agent already created.]

Do not touch. [Name prohibited paths and file types explicitly, including workflow files, dependency manifests, or migration files where applicable.]

A feature template should lead with acceptance criteria and replace reproduction with the verification sequence for the proposed behavior. Its scope and success fields at the end keep the same structure, with the block of prohibited paths at the bottom. The action’s “Issue Triage & Labeling — Automatic categorization” pattern can route the issue to the appropriate workflow. Its review-checklist pattern can then use the encoded conditions as the standard for completion.

Running encoded issues at scale in isolated cloud environments

With a complete brief, agent runs have no need to share what was said in earlier conversations. Each issue can become an independent unit of work, with one agent operating in its own isolated environment. That makes the trigger-to-PR cycle parallelizable. It does not, by itself, settle conflicts between changes when their PRs reach review or merge.

Execution isolation must extend beyond separate branches. Agents on a developer laptop can still share filesystem state, credentials, and running processes, even when their changes target different branches. Git worktrees provide separate working directories, but do not solve task coordination. Isolated cloud VMs remove the shared-host interference that branch separation alone leaves unresolved.

For a team evaluating a bring-your-own API key cloud coding agent runner, the relevant infrastructure criteria include per-workspace credential scoping, audit logs, permission boundaries, and environment isolation. These controls support a consistent governance model across parallel runs. They do not supply missing acceptance criteria or authorize broader changes. The issue defines the task, while the environment limits what the agent can access and execute.

The merge gate remains human or CI-enforced. An agent’s authority ends at the stopping point encoded in the brief, even when execution requires no human relay. A PR linked to an issue with explicit criteria, boundaries, and completion evidence is easier to review and roll back than one linked to a vague request. The encoded issue preserves the authorized purpose as an audit artifact against which the resulting change can be judged.

Sources

  1. GitHub - anthropics/claude-code-action · GitHub

More in Slack Agent Workflows