If you must poll an external process, use a check command (e.g. gh run view) rather than sleeping first.