The Army's principal device for warning combat troops that an enemy has begun using nerve gas is a thing called the M8 alarm, and it is marvelously sensitive.

Too sensitive, in fact.

Diesel truck and jet airplane exhausts also set it off. And on a battlefield, the Army has acknowledged, that could cause some serious problems.

At a closed session of the House Appropriations subcommittee on defense last September, Maj. Gen. Niles J. Fulwyler, director of the Army's nuclear and chemical warfare branch, said:

"The problem is there are many other things that set the alarm off other than nerve gas . I am wondering, considering the normal smoke and odors you are going to find on a battlefield, I think it will be difficult for the M8 to detect an agent."

The general's doubts, according to the hearing transcript, stemmed from the way the M8 performed last summer during the transfer of 888 Weteye chemical bombs from the Rocky Mountain Arsenal outside Denver to Tooele Army Depot in Utah. The Air Force agreed to transfer the aging bombs after residents in the Denver area said they were afraid the deadly contents might leak.

As the general related it, during the moving of the weapons " . . . there were several false alarms. Those were M8 detectors we located in the aircraft and on the vehicles. Occasionally, an alarm went off. In one case, it was the jet exhaust, the JP-4 exhaust. In another, it was diesel exhaust from the trucks."

Fulwyler told the legislators that he considered the M8 "inadequate."

"It does not give us the type and time of warning we need. It is not as good a piece of equipment as we need."

But on the other hand, he said, "It does give us some warning," and more M8s should be purchased "until we get something to take their place. It is better than nothing."

The problems of the M8 are only one little-publicized aspect of the realities of chemical warfare, a field in which the Reagan administration is planning to make major spending commitments over the next few years.

The alarm works by measuring changes in the molecular weight of the air. But it cannot distinguish between the weight effects of nerve gas and some other gases, such as exhausts.

It is not clear how much the Army has spent to date on the roughly 21,000 M8 alarms deployed with troops.

But to make these M8s more discriminating, Pentagon sources said yesterday, about $55 million has been set aside in fiscal 1982 funds to purchase 18,000 modification kits. These kits, set for delivery two years from now, are meant to eliminate some of the sensitivity problems and make the M8 easier to use since soldiers no longer will have to mix liquid chemicals as they must now.

But the problem of telling good gases from bad will persist, it seems.

"I am not saying the new alarm won't false alarm," a Pentagon official said yesterday, "but it will reduce false alarms."

"If it is stuck behind the exhaust of a truck," he said, "it will still go off."

Farther down the development road, this official said, is a much more exotic system to analyze the atmosphere and perhaps even distinguish among nerve gases, but it will be much more expensive than the current devices.

There also is a simpler nerve gas warning device in the hands of soldiers now, but it too has a fairly basic problem. It is "a simple paper detector," according to Fulwyler, "where if you get into contamination it changes color."

The problem with the paper detector, Fulwyler said, was that it "does not give much warning. You are in contamination before you realize it. Unless you promptly mask, you become a casualty."