The Marines, the air traffic controllers, the prison guards and the rest of the federal bureaucracy's five million military and civilian employes will be on the job today. The Social Security and Medicare checks will be in the mail.

But Congress' last-minute dickering over executive branch appropriations bills last night put federal budget and personnel officers through an exercise in wheel-spinning that they are in no hurry to see repeated.

House and Senate conferees considering the stopgap funding measure reached agreement last night, just an hour short of the midnight deadline on a compromise to an antiabortion rider that stymied the bill. Early today, the House approved the budget measure, but the compromise ran into opposition in the Senate.

But yesterday afternoon, there were hastily called meetings, blizzards of memos about "orderly termination of operations' and finally a decision at the Office of Management and Budget that common sense dictated that all federal workers be told to report for work today, regardless of how Congress acted on a continuing resolution to keep the federal government running.

That midafternoon directive from OMB Director James McIntyre followed some confusion and mixed signals. The day before, for instance, Justice Department officials were told that only essential law enforcement personnel would be reporting for work today. "Someone blinked," said one official about the more liberal interpretation of the attorney general's opinion.

Congress has been slow before in approving new fiscal year appropriations. But there was an added twist this time: Attorney General Benjamin R. Civiletti's strongly worded April 25 legal opinion to President Carter said that without appropriations federal agencies could spend money only to protect life and property and to go out of business.

Many departments still were blase about the possible consequences. "We just assume Congress will pass the bill by midnight," a Pentagon spokesman said.

"I consider myself an expert in closing down," said an attorney at the Federal Trade Commission, which has been forced to begin shutting down twice before. "I'll just wait until 4:45 and pull out our contingency plan from the last time. Then I'll plan some home repair projects."

Others were conscientious about the amount of time and effort that they had to put into contingency plans for closing down billion-dollar-budget agencies, but also a little perturbed. "We do have better things to do over here," said one top aide at OMB.

"This is a lot of wheel-spinning, but it's better to be prudent, even if everything is moot by midnight," said Herb Persil, the deputy budget director at the Department of Housing and Urban Development.

Bill Wise, spokesman at the giant Department of Health and Human Services, said his agency was prepared with detailed guidance for its program directors. Applications for Social Security, black lung and other federal medical benefits would continue to be processed, he said. He even had an eight-page memo prepared to tell his program press officers how to respond to inquires from reporters.

Charles R. Neill, the controller at Justice, said he didn't want to sound melodramatic, but he thought yesterday's eleventh-hour scurrying represented a "potential constitutional crisis" because of Congress' power over executive branch appropriations. "The system has broken down that we're even this far in this mode," he said.

Neill estimated that only about 15,000 of the department's 55,000 employes might actually be carrying out their regular law enforcement duties today. They include members of the Border Patrol, guards at the Bureau of Prisons and FBI agents on high-priority investigations. Without congressional action, other employes would be closing down the department, he said.

In his memo of guidance to agency heads yesterday, Alan K. Campbell, director of the Office of Personnel Management, noted that while federal employes should report to work, none may be ordered in, and those who worked would only be certain of being paid if and when Congress finally passed the continuing resolution.

McIntyre's memo on "Agency Operatins in the Absence of Appropriations" said a department's contingency plans must be ready to be put into effect, "however slight the possibility might be" that Congress would not pass the continuing resolution on appropriations.

Examples of activities that could be continued, he said, were providing for the national security, benefit payments from trust funds such as Social Security, borrowing and tax collection by the Treasury, and protection of public health and safety activities.