Run project pre-commit hooks before agent checkpoints (#4278)