Process does not retry when it should

I have a nextflow process with errorStrategy = 'retry' which does not consistently retry when it fails.

With some failures it will retry as expected, up to the retry limit. However, when the process has a different error is does not retry at all.

Are there some types of error that cannot be handled by the directive?

The specific error which fails to trigger the process to retry is when the script tries to do a git commit to a repo and fails because the git file lock is in place (because another process is doing the same and git does not do concurrency).

I was hoping to get the process to keep retrying until the git file lock is removed.

I’m using nextflow. 25.10.0 with Java “openjdk version “17.0.17” 2025-10-21 LTS”

Do you check if the exit code is 0? Some tools may fail an operation, but still “succeed” because the exit code is 0. In that case Nextflow won’t know there’s an error. It relies on the tool to return a different exit code ( and set -e in the bash directive ).