Developer Jeffrey N. Cohen, a friend and adviser to D.C. Mayor Marion Barry, is negotiating with the Barry administration a no-bid agreement to build an office building that the city would occupy for 20 years in the Shaw neighborhood of Northwest Washington.

The negotiations come as Cohen is struggling to stay solvent. He has hired a bankruptcy attorney, received a foreclosure notice on his

$2 million house, fallen behind on his taxes, defaulted on loans, met with creditors to plead for more time, agreed to sell his summer home on Nantucket and sold his forest green Jaguar.

Cohen confirmed last night that the seven- or eight-story building for city offices would be built for about $75 million on the old Thompson's Dairy property. He said the building would contain 320,000 square feet of city office space and 128,000 square feet of commercial space. The property is bounded by 11th, 12th, U and V streets NW.

Cohen said the proposed agreement is highly favorable to the city. At the end of 20 years, the city would be able to buy the building for one dollar. Cohen said rent payments over the 20 years would total $150 million, but much of that might go to a co-developer.

Cohen said he and the city have agreed that a co-developer is necessary, and that a co-developer may take over the project. Cohen said he would receive compensation for his costs on the property and a profit yet to be determined.

Cohen said the mayor has had no involvement in the discussions, which began in November.

A letter outlining the proposed agreement is being drafted by city staff members to be sent to Cohen, a city spokeswoman confirmed yesterday.

"We don't have a lease agreement. We are negotiating one," said Janice Brown-Glasgow, spokeswoman for the D.C. Department of Administrative Services. "Mr. Cohen has submitted a proposal. It was unsolicited."

Cohen differed, saying Administrative Services proposed the lease.

Cohen said he would show the city letter to creditors to support his request for forebearance.

Brown-Glasgow said offices from other city-leased buildings would be moved to the Cohen building. The proposal would need approval from both the mayor and D.C. Council because it involves more than $1 million, she said.

The Thompson's Dairy property is part of the area designated by Cohen and the city for the Samuel C. Jackson Plaza, Cohen's proposed $250 million housing and commercial development, which has become bogged down amid financial difficulties and bickering between him and his community partners.

Francine Cohen, Jeffrey Cohen's wife, said last night of the family's involvement in the Shaw redevelopment, "This was a six- or seven-year effort of a family to sacrifice everything to bring back a neighborhood. We may lose everything, but it's worth it. At least we tried."

Jeffrey Cohen, 41, was an early supporter and fund-raiser for the mayor, and in 1980 became a godfather to Barry's son, Christopher, 9. Cohen has attended recent gatherings of Barry's closest advisers, at which some have urged the mayor not to resign.

Cohen said more than a year ago that he was "at risk for every nickel I've got or will ever get. I'm at the precipice. I don't have a bottomless pit of money. Whether it's 60 days or 90 days or 120 days, I'm either going to leap across the precipice or fall into it."

Cohen said then he faced increasing cash-flow problems, particularly on the Shaw deal, which is years behind schedule. He blames his community partners for the delays; the community group blames Cohen; and Cohen has been carrying much of the cost. In February 1989 he asked employees to defer their salaries for about one month. He since has cut his staff from 10 to five, employees have said.

Cohen, like many area developers, has experienced difficulties recently during the commercial real estate market's slowdown. Unlike many others, he has borrowed on his personal property to support his business ventures.

He and his wife have four mortgages on their two-story house with a pool in Cleveland Park. A foreclosure sale on the home is scheduled for Monday, according to property records. Foreclosure proceedings began in April when the National Bank of Washington filed to recover $882,226 plus interest on a mortgage.

In May, Cohen's father, retired oil distributor Norman Cohen, filed a second foreclosure notice. The father will assume all debts on the house, including more than $2 million that his son owes him already. Jeffrey Cohen said he will continue to live in the house until his father can sell it.

To handle his mounting financial problems, Cohen has hired the bankruptcy law firm Zuckerman Spaeder. Attorney Nelson Cohen of the firm, no relation to Jeffrey Cohen, declined to comment yesterday. The attorneys met recently with Cohen's largest creditors to outline Cohen's debts and business plans and to request that creditors delay legal action. Cohen said his creditors are cooperating with him.

One banker who attended the meeting described it as positive, and said he believed Cohen would be able to work out his problems.

The banker, who asked not to be identified, said Cohen suggested that the proposed lease would give him more time to work out his financial problems.

However, other creditors, who also declined to be identified, cited Cohen's many debts and expressed less hope.

Cohen is in default on a $5.5 million loan to the Washington Mortgage Group, according to attorneys familiar with the debt. The loan was used to finance Cohen's Gateway Project, a proposed office and commercial development at Georgia and Eastern avenues that has been under fire from community activists.

According to property records, Cohen owes Independence Federal Savings Bank $152,929 plus interest on a mortgage on two houses in the Shaw neighborhood. Independence has filed notice to foreclose on those properties, according to records. Cohen also owes Dominion Bank of Washington $350,000 plus interest on an unsecured loan the bank made to the Cohens. Peoples Bank of Charles Town (W.Va.) won a judgment of $171,776 plus interest against Cohen in March, and Richard Lefkowitz and others won a judgment for $779,194 plus interest in April, according to records.

A federal tax lien for $55,251 was filed against Cohen's company, Festival Development Corp., on April 30, according to Internal Revenue Service spokesman Dom LaPonzina. Cohen said he disputed the amount and said the lien is primarily penalties and interest.

Cohen said two or three of his employees are no longer receiving paychecks.

Cohen had planned a building including apartments, offices and commercial space for the Thompson's Dairy site. His community partners had particularly supported the idea of new housing in the area.

Cohen has dealt with the Barry administration through the years.

For years the city paid Cohen's Parkside Hotel to provide emergency shelter for homeless families. The Barry administration supported Cohen's bid for a hospital certificate of need, which The Washington Post has reported raised the value of his Children's Hospital property by several million dollars. Cohen said the certificate added no value to the property.

The city also agreed to pass on to Cohen a $4 million federal loan to renovate the historic Lincoln Theatre on U Street. The loan application was signed by Barry. Of the $4 million, Cohen was to receive $600,000 as reimbursement for costs and make no profit.

The renovation of the Lincoln as a performing arts center, overseen by Francine Cohen and scheduled to be completed in late 1991, is the only part of Jackson Plaza underway.

Cohen began buying property in Shaw in 1976. But by 1985 he was near foreclosure on the properties, he has said. In February 1985 the city bought the tracts from Cohen for $11 million, financed by a group of banks. In February 1986, the city repaid the banks $12.2 million -- the $11 million loan plus $1.2 million in interest.

The city agreed to allow Cohen to develop the sites. He was to repay the $12.2 million in stages as the properties are developed. He repaid $900,000 in December 1986 when he began renovating the laundry property for an office building.

Cohen had agreed to break ground on all the sites by February 1988, repaying the entire $12.2 million by that time, but he did not. The city has not declared Cohen in default.

Under the agreement, a community group, Shaw/Coalition Redevelopment Corp., is the primary lessor of the land, and in turn leases the land to Cohen. The community group and Cohen are to receive 47.5 percent of any profit, and the city is to receive 5 percent. Cohen also would get a 10 percent development fee, and the community group would receive 10 percent of that fee.

The new president of the community group, lawyer Ronald L. Drake, said yesterday he has not heard of any plan for an office building and would probably oppose such a plan vigorously. "I know my way to the courthouse," Drake said. Cohen said last night that Drake's predecessor was aware of the plans.

The Cohens have agreed to sell their beachfront home on Nantucket, which they put on the market last year for $1.5 million, according to a real estate source on Nantucket. The sale price was not disclosed.