As the Defense Department continues adding to the burgeoning armada of ships and aircraft in the Persian Gulf region, some high-ranking military officials are expressing increased concern that the United States is trapped in a dangerous, costly mission with no end in sight.

They have watched as the Pentagon has used piecemeal planning to assemble an expanding collection of military might ranging from the world's most sophisticated warships to a fleet of aging, wood-hulled mine sweepers.

They have observed decisions on escorting "reflagged" Kuwaiti tankers disintegrate into internal military turf wars that ended in creation of a new command to take direct charge of the Middle East operations.

They have seen 37 U.S. sailors killed in an "accidental" attack by a "friendly" Iraqi pilot, a reflagged Kuwaiti supertanker crippled by a mine within short reach of naval ships that probably would have been sunk had they crossed the mine's path and an Iranian fighter plane come so close to U.S. aircraft that a U.S. pilot fired two missiles but missed.

Now, a little more than a month after U.S. warships escorted the first convoy of Kuwaiti tankers flying U.S. flags through the "Silkworm Alley" -- named after antiship Silkworm missiles -- of the Strait of Hormuz and the mine-infested gulf, many who initially supported the mission have soured on it.

"How do we know when we've won?" one Pentagon official asked. "Are we prepared for the long haul and a long-term commitment?"

President Reagan has said repeatedly that the tanker-escort operation is not open-ended, describing it as temporary and to ensure that international shipping channels remain open to free trade.

The number of military leaders who believe him appears to be dwindling.

"It is an open-ended commitment," one Navy official said emphatically. "We're in it for the long haul."

That has fostered increased concern about dangers and risks for U.S. personnel there, escalating costs that threaten to disrupt other naval operations and uncertainty about how long the military must sustain a presence that represents one of the largest buildups in recent peacetime history.

There is also growing concern that, rather than ensuring safety of the shipping lanes, the buildup will merely antagonize Iran and increase the vulnerability of U.S. forces.

"Adding significant numbers of ships doesn't buy you security," a Defense Department official said. "It buys you more vulnerability because there are more targets of opportunity."

That raises even more sobering questions for many military leaders.

"What is the government going to do once we get the goods on them {the Iranians}?" one Pentagon official asked, referring to proof that Iran has sown mines that have disrupted shipping in the Persian Gulf and nearby Gulf of Oman.

In a blistering report released today over dissent of Republican members, a House Armed Services subcommittee noted, "The course of events in the Persian Gulf could easily slip beyond our control."

The report by the defense policy panel and investigations subcommittees added, "The specters of Vietnam and Lebanon are casting a haunting influence on Americans as they sort out their views of the role of the U.S. military forces in the Persian Gulf."

In 1983, a terrorist attack on the headquarters of a Marine peace-keeping force near Beirut airport killed 241 U.S. servicemen.

"We've made a tactical error going in," said another official. "Now we're stuck. We can't pull out. We've got to do the best we can."

Some military officials question whether the Pentagon has done its best. Even though military leaders knew the risk of mines in the gulf, they did not send mine-detection and mine-sweeping equipment there until after the supertanker Bridgeton struck a mine that ripped a massive hole.

After the incident, the Pentagon decided to send its most sophisticated mine-sweeping helicopters, eight Sea Stallions, but waited almost a month to dispatch six ocean mine-sweeping ships. The 30-year-old, wood-hulled ships left last week for what is expected to be a seven-week voyage to the gulf.

Pentagon officials said field commanders in the gulf are making almost daily requests for additional equipment to improve defense of ships and weapons.

"There hasn't been a lot of thought given to long-range planning and long-range commitments in the region," a Defense Department official said.

The House subcommittee report blames lack of planning on an administration program "whose implications had obviously not been thought out beforehand and whose contribution to long-term American goals in the region were vague at best."

The report, vehemently criticized as too negative by Republican members, alleged that the justification for the escorts was political rather than military. It charged that the threat to oil flow is "in no way sufficiently serious to require armed escort by the United States or any other forces."

Dissenting Republicans said the report "only confuses an already complex issue."

"The bottom line is, quite simply, has the administration chosen the best policy alternative available to it under the present circumstances in the Persian Gulf?" they wrote. "Despite some individual reservations, our collective answer is yes."

Administration officials estimate that the gulf buildup is costing at least $1 million a day more than normal operating costs for ships, aircraft and other weapons in the region. The mission has cost the Navy an estimated $30 million extra, according to adminstration officials.

The military has ordered almost 40 ships and smaller vessels and additional helicopters, aircraft and special forces units to the region in recent weeks. Pentagon officials estimate that about 25,000 military personnel will have been massed there soon.

The gulf is a harsh, grueling environment for equipment and personnel. Frequent dust storms create major maintenance problems for helicopters and much shipboard equipment. The ships strain to cool their systems with water that can be 30 degrees hotter than what most of them normally use.

Servicemen are physically and mentally drained by searing heat and the constant stress of preparing for potential unseen and unknown attackers. That is compounded by canceled port calls, with virtually no relief from the strains of their jobs.

While those in the region grapple day to day, Pentagon officials are wrestling with long-term implications of administration decisions.

"One of the frustrations is that we feel we've been put in an untenable situation," one Defense Department official said. "It's a no-win situation without a clearly articulated military mission or political goal."