AI Help

How do I verify that an AI coding agent worked on the right commit?

Record the checkout's commit SHA and branch before editing, then compare the final patch with the task's intended base.

Steps to follow

  1. Run git rev-parse HEAD and inspect the current branch and worktree status.
  2. Compare that SHA with the requested PR head, branch or release commit. Identify any preexisting local changes.
  3. Record the base and final commit with validation results so later reviewers can reproduce the work.

Example in practice

Illustrative example. A fix requested for a release branch should start from that branch's actual commit, which may differ from main.

Related AI help

Official guidance

OpenAI documentation