Particle Argon Automatically goes to safe mode

once I connect my device to the app and cloud before running the program it is going into safe mode how to remove the device from the safe mode?

This sounds like a Safe Mode Healer attempt to update the device OS to fit the version your firmware is targeting.
So let it sit there without interference for about 5 minutes and see whether the update can still finish (since you seem to have interrupted the process this might not work anymore tho’).

Is there any other way to rectify this?

You could try DFU update via USB.

  • put the device in DFU Mode
  • run particle flash --usb tinker -v
  • run particle update -v
  • check whether the update has been successful via particle serial inspect (in Listening Mode)
  • flash your own firmware again (targeted at the same version now installed on the device)

Thank you will try and get back to you