The auto-merge workflow's orchestrator re-trigger lived inside the LLM prompt and (a) was dropped when the agent hit max-turns, and (b) the token had workflows:write but not actions:write (which gh workflow run needs), and gh workflow run without --ref fails a default-branch lookup. Net: the loop stalled after a successful merge.
Found on MaKlaude. Fixes proven in bc5c0b9 (push-trigger token + --ref main) and bc8efc4 (move re-trigger to a deterministic if: always() step + actions:write).
Also: merging green bot PRs is mechanical — per deterministic over agentic, the merge itself should be gh pr merge --squash gated on author+checks, not a claude-code-action prompt. Relates to permission issues #14/#5.
The auto-merge workflow's orchestrator re-trigger lived inside the LLM prompt and (a) was dropped when the agent hit max-turns, and (b) the token had
workflows:writebut notactions:write(whichgh workflow runneeds), andgh workflow runwithout--reffails a default-branch lookup. Net: the loop stalled after a successful merge.Found on MaKlaude. Fixes proven in
bc5c0b9(push-trigger token +--ref main) andbc8efc4(move re-trigger to a deterministicif: always()step +actions:write).Also: merging green bot PRs is mechanical — per deterministic over agentic, the merge itself should be
gh pr merge --squashgated on author+checks, not a claude-code-action prompt. Relates to permission issues #14/#5.