Cox may have been the worst commander in the campaign.
1. He initially commanded the vanguard of the Union advance at South Mountain. He performed very badly. Scammon's brigade was first in the column with the cavalry and, with Pleasonton as senior officer on the field, pitched in driving the rebels pell mell up the hill to the safety of a low stone wall. Cox then arrived ahead of Crook's brigade, which steamed into the defenders, broke them and then Cox ordered everyone back into a defensive position, ending the initial phase.
He likely was influenced by his meeting of Col Moor who'd just been paroled and warned him to "be careful".
This halt was fatal. The division had smashed Garland's brigade and then GB Anderson's and for 4 hours could actually have marched over the hill and opened the gap with no organised resistance. Two of those hours with Willcox's division in place. Instead Cox sat down and waited for the rest of the Corps and Reno to come up.
2. The next day Cox disobeyed McClellan's orders to pursue the enemy from South Mountain. At Midday FJ Porter with Sykes' division found 9th Corps (which Cox was now in command of) sitting down and resting whilst everyone else went maximum speed. Hooker had pushed his force forward vigourously and hence Burnside's wing becomes separated.
3. At Antietam McClellan ordered Burnside to attack around 1100 hrs on the 16th (i.e. the day "before" Antietam). The next morning Cox still hadn't gotten a single division into assault position.
4. At Antietam Cox ordered a panicked general retreat of 9th Corps as his division commanders prepared to counterattack. Either him or Burnside ignored McClellan's order to counterattack AP Hill and regain the lost ground thus (from an old post):
"The attack having already had the effect of a most powerful diversion in favor of the center and right of the army, which by this means had been able to make decided and successful advances, and no supports being at the time available for our exhausted corps, I ordered the troops withdrawn from the exposed ground in front to the cover of the curved hill above the bridge, which had been taken from the enemy earlier in the afternoon. This movement was effected shortly before dark, in perfect order and with admirable coolness and precision on the part of both officers and men"
- Cox, Report of 23rd September 1862
While Cox was ordering the retreat, this surprised his division commanders who were about to counterattack:
"My right was all secure but Rodman & Scammon were pressed & the extreme left, Sturgis was in danger. I told Rodman's brigade commanders that we could hold the ground & would & agreed with them & Scammon to assist the left by a charge bayonet (our ammunition being exhausted) along the whole line, when we were ordered to fall back near the bridge." (letter from Willcox to his wife, 25th September 1862, emphasis in original. From Willcox, Forgotten Valor, 366).
Burnside sent word to McClellan that he needed reinforcement, and that he was preparing to recross the bridge.
"I want troops and guns. If you do not send them, I can not hold my position half and hour."
McClellan replied "I have no infantry... Tell General Burnside this is the battle of the war-he must hold his ground till dark at any cost…Tell him if he cannot hold his ground, then the bridge, to the last man! always the bridge! If the bridge is lost, all is lost!"
McClellan issued two orders:
"General: General McClellan directs me to say that whatever the result of your affair to-night, you must so guard the bridge with infantry and artillery as to make it impossible for the enemy to cross it."
- order from McClellan to Burnside timestamped 6.10 pm
and 5 minutes later, after McClellan asked the signallers what they could see he orders Burnside to counterattack:
"[McClellan] desires you to push the enemy vigorously. Let the General know if the enemy is retreating, and he will push forward with the center."
- from order to Burnside timestamped 6.15 pm
Reflecting afterwards Cox concluded it couldn't be his panicked order to retreat to the bridge that was the problem. It must have been McClellan denying him reinforcements! He then was very vocal in the years after that him ordering his corps to retreat and claiming they couldn't even hold the bridge had to be McClellan's fault. In fact in the heat of the moment he made a decision not to fight, but to retreat. You can argue about whether it was the right decision, and about Cox's decision making, but we can't argue that he made the decision to retreat. Whether Cox was informed of McClellan's order to counterattack I do not know, but we do know that 9th Corps did not put in the counterattack McClellan ordered, and hence the battle ended on the 17th.