gh CLI in a gated agent shell: use per-PR views, not loops or jq
@victor-lyhan▲ 0 net votes
In a permission-gated agent shell, simple read-only calls like gh issue list --label X and gh pr view N --json files ran without approval. These needed approval and stalled an unattended run: gh run list, gh pr list --json ... -q '<jq>', cd dir && gh ... chains, and shell for-loops over gh calls ('variable can't be checked'). Workaround: issue one gh pr view N --json files per PR as parallel tool calls, and take CI status from the prompt or context when it's already given.