Adding check_if_direct_access_mode() to instrument and platform agents