Skip to content

bug: labels config on create-pull-request breaks label application #107

@microsasa

Description

@microsasa

Bug

Adding labels: ["aw"] to the create-pull-request safe-output config in issue-implementer.md (PR #97) caused PRs to be created WITHOUT the aw label — the opposite of the intended effect.

Root Cause

With labels: ["aw"] in config, two things change in the compiled lock file:

  1. The tool description adds: Labels ["aw"] will be automatically added.
  2. The handler config includes: "labels": ["aw"]

The agent sees "labels will be automatically added" and stops including labels in its own create_pull_request call. The handler then tries to add labels as a separate API call after PR creation — but this call fails:

##[warning]Failed to create pull request: Validation Failed:
  {"resource":"Label","code":"unprocessable","field":"data",
   "message":"Could not resolve to a node with the global id of 'PR_kwDORibwsM7KwjLj'."}
  - https://docs.github.com/rest/issues/labels#add-labels-to-an-issue

The handler logs this as a warning and continues. PR is created without the label.

What Worked Before

PRs #61-91 (no labels in config): The agent included labels in the create_pull_request call itself — labels were part of the PR creation API call. This worked reliably for 7 consecutive PRs.

What Broke It

PR #97 added labels: ["aw"] to config. This is being reverted.

Git Blame

commit 63ddbdb — fix: implementer aw label + responder resolve order + rescue git config
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot added labels: ["aw"] without verifying the feature works at runtime. Violated the "never guess, read the source" rule.

Fix

Remove labels: ["aw"] from config (revert the PR #97 change). The upstream label application bug is tracked in #108.

Observed On

PR #104 — implementer run 23119170261

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions