[Feature Request] CI-wait gate: prevent premature 'done' declarations

Resolved 💬 3 comments Opened Apr 10, 2026 by 2tbmz9y2xt-lang Closed Apr 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single report
  • [x] I am using the latest version of Claude Code

Summary

Follow-up to #45738 (Pattern 5: premature done) and #45731.

Claude declares PR work complete before CI finishes and review threads are resolved. In one session: 20 review threads across 8 fix-commits on a single PR. Each push generated new bot findings. Claude declared 'done' multiple times between rounds.

Proposed Solution

A CI-wait loop that Claude must execute before declaring done:

  1. Wait minimum 3 minutes after last push (bots need processing time)
  2. Check gh pr checks via API — all required checks completed
  3. Query review threads via GraphQL — 0 open threads confirmed programmatically
  4. If either fails → fix → push → restart wait loop

'Done' should require API-verified evidence, not visual inspection.

Why This Matters

Bot reviewers (Copilot, Codex, DeepSeek, Cursor) run asynchronously after each push. Claude's pattern: push → immediately declare done → user points out new threads → fix → push → declare done again → repeat. A mandatory wait+verify loop breaks this cycle.

Environment

  • Claude Code CLI (latest)
  • Model: Claude Opus (Max plan)
  • macOS

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗