Skip to content

breeze: gh auth status --json hosts is an invalid flag, blocks daemon start #308

@yuezengwu

Description

@yuezengwu

Summary

first-tree breeze start (and breeze doctor / status) fails during GitHub identity resolution because it calls gh auth status --json hosts, but gh auth status does not support a --json flag on any current gh release.

As a result, breeze start is unusable with a correctly-authenticated gh CLI.

Environment

  • first-tree 0.2.10 (npm latest) — also reproduces on 0.2.9
  • breeze 0.3.0 (bundled)
  • gh 2.79.0 (2025-09-08)
  • macOS (Darwin 25.2.0), zsh
  • gh auth status output: logged in as yuezengwu via keyring, ssh protocol, scopes admin:public_key, gist, read:org, repo

Reproduction

gh auth status     # logged in OK
npx -p first-tree first-tree breeze start \
  --allow-repo "agent-team-foundation/first-tree"

Output:

breeze: start failed: gh auth status failed; run `gh auth login --hostname github.com` first
(gh resolve gh identity failed (exit 1): unknown flag: --json)

breeze doctor shows the same underlying failure:

login: unknown
git protocol: unknown
scopes: unknown
required auth scope: identity resolution failed: gh auth status failed; run `gh auth login --hostname github.com` first (gh resolve gh identity failed (exit 1): unknown flag: --json)

Direct check confirms the flag is not valid:

$ gh auth status --json hosts
unknown flag: --json

gh auth status --help only lists --active, --hostname, --show-token. There is no --json variant.

Source Pointer

The offending call path is in the bundled runner-skeleton:

  • dist/runner-skeleton-*.js — comments at lines 22, 32, 52, 75, and the error wrap at line ~92 all reference gh auth status --json hosts.

Suggested Fix

Replace the gh auth status --json hosts call with a portable identity lookup, e.g.:

  • gh api user --jq '{login, id}' for the active account, and
  • parse ~/.config/gh/hosts.yml (or shell out to gh auth status text output) for git_protocol and scopes.

Either approach works on all supported gh versions and avoids depending on a flag that does not exist.

Impact

Blocks breeze start, breeze run, and breeze run-once for every user on gh CLI — i.e. all currently supported configurations. breeze poll / watch that do not hit this code path still work.

Metadata

Metadata

Assignees

Labels

breeze:donebreeze has finished handling it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions