[BUG] v7 preview: GitHub publish files a ticket twice when a relation fails

Author: JakeSelbyCreated Sep 24, 2026Updated Sep 24, 2026

Description

The GitHub store's write verb creates each issue with --parent and --blocked-by on gh issue create (skills/bmad-preview-ticketing/config/gh-ticketing.toml, lines 51-52). gh creates the issue first and applies those relations afterwards (pkg/cmd/issue/create/create.go, DeferredUpdateIssue), and it prints the url only when both steps succeed. When the relation step fails, the issue exists but the agent never sees its number, so tracker_id is never written back and the next publish files the ticket again.

The error doesn't give it away either: for a stale reference it reads resolving --parent reference "N": ..., which sounds like a check that ran before anything was created.

Steps to reproduce

  1. With gh 2.101.0, in any repository: gh issue create --title test --body x --blocked-by 999999 (or --parent 999999).
  2. It exits 1 and prints no url.
  3. gh issue list --state all shows the new issue anyway.

Through the skill, headless in Claude Code: a gh wrapper let the create succeed, then failed the relation step with a rate-limit error and printed no url, the way gh does, and a second publish ran clean. With a smaller model the agent retried the create, and story 1 of two was filed four times in 2 of 3 trials. A larger model found the orphan by title and kept one issue per story in 6 of 6.

Expected behavior

One issue per ticket, with its number in the ticket file, however many times publish runs.

Actual behavior

An issue the ticket tree doesn't know about, and a second issue for the same ticket on the next publish.

Which module is this for?

BMad Method (BMM) - Core Framework

BMad Version

6.13.0-next (skills from main at 1b59caa; config/gh-ticketing.toml is the same on dev at bc5f6ac)

Which AI IDE are you using?

Claude Code

Operating System

macOS

Relevant log output

bash
$ gh --version
gh version 2.101.0 (2026-09-15)
$ gh issue create --title "repro: relation after create" --body x --blocked-by 999999; echo "exit=$?"
resolving --blocked-by reference "999999": GraphQL: Could not resolve to an Issue with the number of 999999. (repository.issue)
exit=1
$ gh issue list --state all --json number,title
[{"number":1,"title":"repro: relation after create"}]

Confirm

  • I've searched for existing issues
  • I'm using the latest version

A fix follows as a small PR against dev.

Source: bmad-code-org/BMAD-METHOD