Without going to the county building department and asking you will never have a solution to your (potential) problem.
Things to think about:
Had a permit been pulled on the original structure and not finalized? If so you may be able to get it "finaled" by bringing it up to code. I did this for a client in Los Altos on a swimming pool that was not "finaled" but had a open yet expired permit.. He had to add some electrical upgrades for safety purposes but otherwise it was minimal. Note: on this project, the house was within all of the setback requirements at the time as well as current setback requirements.
Second option - see if you could get a variance for the project. I would check out the variance requirements for the county.
Third option - Is the property large enough to have a secondary structure built on it? If so and you want to add value to the property, you could tear down the original structure and add a new structure that meets all of today's building codes. This might be the most risky and expensive option.
Fourth option - tear the structure down and improve the landscaping for resale.
Lastly, you could sell the property without doing anything to the structure and let the new buyer deal with it. Note: if the structure is non-compliant (non-permitted), you must disclose this to any and all potential home buyers. Otherwise you will likely be sued.
Without being able to see the project and how it sits on the lot, these are the best options that I have for you. If you would like me to take a look at the project, I can be reached at 650 917-4250.
Coldwell Banker - Downtown Los Altos Office
If the structure has something that could be considered a kitchen, the city could see it as substandard housing and not be very helpful. If it is just a workshop and it meets the daylight plane requirements, you might be able to bring it up to code. (Typically you can build a workshop under 100 sf)
Generally you can talk to the planning department without triggering them to come out for an inspection. However each inspector interprets situations slightly differently. Short of applying for a permit, you won't get a "guaranteed" answer.
Los Altos real estate information at http://julianalee.com/los-altos.htm
Top 2 agent nationwide at Keller Williams Realty, the nations largest
Over 20 years experience
Over 1,000 homes sold in Santa Clara and San Mateo Counties
This is a situation where yes, you will be taking a risk......even though the structure has been there for a long time, if its not up to Code, they can ask you to remove it....on the other hand, City can give you permits to improve the structure and bring it up to current code, then perhaps you can add the sqft, once done with permits......I think that is feasible...
All the Best,