It may be one of the world's biggest office buildings, but even if you are the former secretary of defense, there is not a spare room to be had in the Pentagon.

That is why Caspar W. Weinberger has had to work out of an office in the Old Executive Office Building since his retirement as defense secretary Nov. 23.

"The Pentagon is full," said Kay Leisz, Weinberger's former confidential assistant. Previously, former defense secretaries were offered space for a transition in the Forrestal Building, which used to be part of the Defense Department, she said.

The building now is headquarters for the Energy Department, and that left Weinberger with no place for a transition office as he ended seven years at the Pentagon. The result was that the White House volunteered space in the EOB, where the longtime friend of the president is just across from the Oval Office.

What is Weinberger doing? Mostly answering his mail, Leisz said.

"He was just such a popular man that most of the mail is protesting his decision to retire," she said.

When he departs, Weinberger will split his time between Washington and Maine to write a book to be published by Warner Books next year. The book, Warner President Laurence Kirshbaum said, will include Weinberger's "firsthand observations" of the Reagan administration.