The C.I.A. director, Gina Haspel, has raised logistical concerns about the plan with other administration officials, emphasizing that the agency operatives — who marshal the militias to hunt Taliban, Qaeda and Islamic State militants — largely depend on the military for airstrikes, overhead surveillance, medical support and bomb technicians.

Skeptics have also noted that American intelligence agencies do not believe the Islamic State’s presence in Afghanistan justifies a vast increase in resources given limited budgets. The Islamic State’s affiliate there is not an immediate threat to the West, despite its regular attacks on Afghan civilians and continuing fight with the Taliban, according to intelligence officials.

The disagreement about the future of the C.I.A. in Afghanistan underscores the fault lines within the administration between those who want a final withdrawal and those who fear it would expose the United States to terrorist threats. This article is based on interviews with a half-dozen current or former officials briefed on the administration’s discussions. The C.I.A. declined to comment, and the White House declined to respond on the record to a request for comment.