Releasing Retention
You want to make sure that all punch list items are complete, before releasing retention.
On very large projects, it is somewhat common to release retention for trades who have completed their contractual obligations.
For example, by the time roof installation occurs, the foundation contractor has often completed all their work and could have their retention released.
Regardless of when you release retention, it is always wise to explicitly state in writing what retention you are releasing and to make sure that all punch list items are satisfactorily complete before issuing the release.