All posts
Development Log 2 min read

Your AI coding agent finished. Is there anything to push?

Check the job’s starting commit, its working tree, and GitHub before deciding whether an agent run left anything to review.

Imagine you ask an AI coding agent to fix a bug. It finishes, and there’s no pull request. The agent might have found that the fix was already present. It might also have left edits on the runner or made a commit that never reached GitHub. Start by finding out which of those happened.

Check the checkout before you push

  1. Find the commit the job started from. Record it at the start of the run. Compare it with git rev-parse HEAD in the job checkout. Use the job’s starting commit so you can identify what happened during that run even if the base branch moved. Git rev-parse
  2. Look for local edits. Run git status --short --untracked-files=all in the same checkout. A job can leave uncommitted changes or untracked files while HEAD stays at the starting commit.
  3. Check GitHub for the job’s branch and open PR. If a branch exists, compare its tip with the checkout’s current commit and the job’s starting commit. A branch that moved past the starting point doesn’t prove it contains the job’s current commits. If the GitHub check fails, report that result as unknown and check again before declaring the job unchanged. Git status · GitHub’s guide to comparing commits

If the checkout and GitHub both confirm there’s nothing to review, record the no-change outcome and say what you verified. If the original bug is still reproducible, keep that evidence with the issue so the next attempt has a concrete starting point.

How Autop handles an unchanged run

On November 30, Autop merged a change that handles this case explicitly. When the job ends at its starting commit, the working tree is clean, and GitHub checks confirm there’s no remote branch or open pull request for the job, Autop’s publication check classifies the checkout as unchanged. A job can still report a failure separately. When a failed job reaches the step that would save work from the runner, Autop skips that push if the checkout is clean and still at the starting commit.

Topics

Get new posts by email