“There are beginning to be relatively small-scale gardening operations that are running up against the constraints of the current code,” Ms. Rodgers wrote in a recent memo to city officials. “This is an issue that cities around the country are grappling with, and many big cities are revising or considering revising their zoning codes to support at least small-scale urban agriculture.”

San Francisco, Oakland and Berkeley are full of gardens in backyards and schoolyards and on rooftops and vacant lots. From the chef Alice Waters’s famed edible schoolyard at Martin Luther King Jr. Elementary School in Berkeley to City Slicker Farms and the People’s Grocery, which are trying to bring fresh produce to West Oakland, the Bay Area’s innovative horticultural endeavors are widely known.

But when vegetables are exchanged for cash, it’s a different story.

Sophie Hahn, a Berkeley community activist and stay-at-home mother, is growing enough vegetables for six families in her backyard. Wanting to recoup some of her investment from neighbors to whom she has been giving the vegetables, Ms. Hahn looked into getting the right paperwork from the city. She found that obtaining a permit for home businesses like teaching piano, tutoring and even growing medical marijuana was easy, without public hearings or great expense. A backyard “community supported agriculture” venture was a different story.

“It’s actually easier in Berkeley to have a pot collective than to have a vegetable collective,” said Ms. Hahn, a former candidate for City Council who is putting together a legislative solution she plans to take to the Council.

For now, Ms. Hahn gives away the beets, basil, beans and everything else that grows in her North Berkeley yard.

Little City Gardens started out small, with 2,500 square feet of donated land near 18th and Guerrero Streets. But Ms. Budner, a part-time illustrator, and Ms. Galloway decided they wanted to make an experiment of their venture: Could they  or anyone for that matter  actually make a living as urban farmers?