Don't misrepresent the truth. The U.S. wanted Soviet troops out of Afghanistan. The initiative to overthrow the Soviet-backed government was Pakistan's. That was when the break occurred. Lacking means to influence events other than the now-broken ISI connection the U.S. pulled out its few Afghan-related personnel from Pakistan and defunded the program. Little economic aid could be supplied to an Afghanistan that now consisted - as Zia wished - not of a government but a group of destructive warlords. (Reference for pocket history: Deception: Pakistan, the United States, and the Secret Trade in Nuclear Weapons.)
The US didn't want Soviet troops out of Afghanistan, they wanted the Soviets to get stuck in a quagmire. Lets be honest here, the US government didn't get involved to help the poor Afghani's. Its purpose was to drain the Soviets through radical Islam.
Read the following:
1978: CIA Begins Covert Action in Afghanistan
The CIA begins covert action against the Communist government in Afghanistan, which is closely tied to the Soviet Union. Some time this year, the CIA begins training militants in Pakistan and beaming radio propaganda into Afghanistan. By April 1979, US officials are meeting with opponents of the Afghan government to determine their needs. [BLUM, 1995, PP. 344] Robert Gates, who will become CIA Director in the early 1990s, will later recall that in a meeting on March 30, 1979, Under Secretary of Defense Walter Slocumbe wonders aloud whether there is “value in keeping the Afghan insurgency going, ‘sucking the Soviets into a Vietnamese quagmire.’” [GATES, 1996, PP. 145] In March 1979, there is a major revolt in Herat province, and in June and August there are large scale army mutinies. [COOLEY, 2002, PP. 5] President Carter will formally approve covert aid to opponents of the government in July (see July 3, 1979), which will result in a Russian invasion in December (see December 8, 1979).
December 8, 1979: Soviet Forces, Lured in by the CIA, Invade Afghanistan
Soviet tanks entering Afghanistan in late 1979. [Source: Banded Artists Productions]The Soviet Union invades Afghanistan. The Russians were initially invited in by the Afghan government to deal with rising instability and army mutinies, and they start crossing the border on December 8. But on December 26, Russian troops storm the presidential palace, kill the country’s leader, Haizullah Amin, and the invitation turns into an invasion. [BLUM, 1995, PP. 342] Later declassified high-level Russian documents will show that the Russian leadership believed that Amin, who took power in a violent coup from another pro-Soviet leader two months before, had secret contacts with the US embassy and was probably a US agent. Further, one document from this month claims that “the right wing Muslim opposition” has “practically established their control in many provinces… using foreign support.” [COOLEY, 2002, PP. 8] It has been commonly believed that the invasion was unprovoked, but the Russians will later be proven largely correct. In a 1998 interview, Zbigniew Brzezinski, President Jimmy Carter’s National Security Adviser, will reveal that earlier in the year Carter authorized the CIA to destabilize the government, provoking the Russians to invade (see July 3, 1979). [MIRROR, 1/29/2002] Further, CIA covert action in the country actually began in 1978 (see 1978), if not earlier (see 1973-1979). The US and Saudi Arabia will give a huge amount of money (estimates range up to $40 billion total for the war) to support the mujaheddin guerrilla fighters opposing the Russians, and a decade-long war will ensue. [NATION, 2/15/1999]
You can read it all here: War in Afghanistan
As for Pakistan, this was one of the biggest mistakes made by its treacherous ruling elite. Neither party was in this for as a morally responsible party. The purpose was always political, and through militant Islam.