The term
parameter should actually be terms
, even when providing just one term:
$args = array( 'post_type' => 'course',
'tax_query' => array(
array(
'taxonomy' => 'course_codes',
'field' => 'slug',
'terms' => 'h001'
)),
'post_status' => 'publish'
);