Former president Zardari last week said that such courts might be used against politicians.
These parties wanted to create the courts through changes in the Army Act, but now they have dropped the opposition and agreed to amend the Constitution.
It was the second meeting of parties after a similar meeting last month continued for 11 hours and agreed to set up military courts.
During today's meeting, Gen Sharif dismissed concerns that the special courts would strengthen the role of the powerful army, saying it was the need of "extraordinary times" and not the military's desire.
Also Read
Former chief justice Iftikhar Chaudhry had also termed the proposed plan "unconstitutional".
The Supreme Court had declared in 1999 the setting up of military courts as unconstitutional and illegal.
Pakistan is struggling to come up with an adequate response to deal with militancy after the brutal Peshawar school massacre last month by the Taliban that killed 150 people including 134 children.