Repository navigation
Description
Summary
Step 1 of gh-aw-issue-triage (and gh-aw-issue-auto-triage) instructs the agent to enumerate the repository's labels and treat that list as the authoritative menu:
Before anything else, use the GitHub read tools to list every label that exists in
${{ github.repository }}and record the exact names. That list is the menu: for the rest of this run it is the only source of labels you may apply.
Across nine runs in elastic/docs-actions-sandbox — same workflow, same repository, same model (anthropic/claude-haiku-4.5 via OpenRouter) — the agent did this three different ways, and only one of them matches the instruction.
Observed behaviors
1. Full enumeration (as specified). Run 34952784103 listed all the repository's labels, including ones irrelevant to the issue.
2. Partial confirmation. Run 34960187031 checked only a handful of labels and wrote "I now have confirmed the following labels exist" over a seven-item list. Six of the repository's labels never appeared in the log at all.
3. Inference from other issues. Run 34961374303 wrote:
Now I can see the available labels from other issues. Let me compile the menu of available labels
It reconstructed the menu from labels observed on neighbouring issues rather than listing the repository's labels.
4. Substituting the safe-outputs config for the menu. Run 34962563018 wrote:
Now I have the label menu from the safe-outputs section. The allowed labels are: …
and its list included Team:Experience, which does not exist in that repository. So the reconstructed menu contained a label that was never on it.
Why it matters
The design premise in the repo's own guidance is "select from a fetched list; never generate-then-verify" — small models copy reliably from a list and invent names when asked to recall them. That premise only holds if the fetch is reliable. When the menu is partial, inferred, or drawn from the safe-outputs config:
- Guardrails phrased as "only labels in the menu" bind against an inconsistent set.
- A label absent from the reconstructed menu is unreachable even when the instructions call for it.
- A label the agent invented can enter the menu, as in behavior 4.
It also makes behavioral testing expensive. Four of six runs in a recent A/B had to be discarded because the agent never fetched the labels the test depended on (#339).
Reproduction
Trigger /triage on several fresh issues in a repository with ~30 labels, then for each run download the *-agent artifact and compare the label names in agent-stdio.log against gh label list.
Suggested direction
Make the menu an input rather than an agent task — resolve the label list in a pre-agent step and interpolate it into the prompt, the way the safe-outputs config is already injected. That removes the retrieval variance entirely and would be strictly cheaper than the current tool round-trips.
Run IDs are all in elastic/docs-actions-sandbox.
Activity
Triage: resolve the label menu before the agent starts