Enraged by leaks at his troubled Silicon Valley electric carmaker, CEO Elon Musk cooked up a sophisticated electronic scheme to catch the blabbers. It backfired hilariously on the brilliant entrepreneur, who's a bit blabby himself.

Tesla Motors is an icon of the new Silicon Valley, which is placing its bets on clean, green technology. Its $109,000 Tesla Roadster runs wholly on electricity and accelerates from 0 to 60 miles per hour in less than four seconds. But the company is in deep financial trouble, and is betting its future on government loans that may not materialize. Musk, the company's lead investor, took over as CEO last fall. But his reign has been marked by constant and, as Musk himself had admitted, deadly accurate disclosures of Tesla's parlous condition.

A tipster writes:

Life for the employees at Tesla Motors has got more depressing over the last few months. Elon Musk is now spying on everyone.

The inquisition began after an engineer named Peng Zhou revealed the company's perilously low $9 million cash balance to Valleywag last October. Musk ordered a heavy-handed investigation. He hired an outside IT contractor go through the company's email and instant messages, and then had an investigator take fingerprints off a printout discarded near a copier used to leak the email. The investigation implicated Zhou. Musk ordered Zhou to confess and apologize to the entire company, and then fired him.

In his latest witch hunt, which our tipster says took place recently, Musk set out to entrap potential leakers by sending each employee a slightly altered version of an email which he expected would get sent to the media. Musk began the memo, "I'm a big believer in trusting employees."

By altering phrases scattered throughout the email — changing "I'm" to "I am," for example — a Tesla IT employee created individualized memos which would have a detectable "fingerprint" in the text. In the memo, Musk asked everyone to sign a new, stricter nondisclosure agreement. The agreement wasn't the point of the email — it was just a ruse to catch the company's leakers.

Musk did not even let his executives in on the plan. That's where the scheme went hilariously wrong.

Hapless general counsel Craig Harding, who's overseen several legal setbacks for the company, forwarded his own personalized copy along with the agreement. As a result, everyone at Tesla had a copy of Harding's version to compare to their own, making Musk's scheme plain to see — and giving them a version that was safe to leak.

"What was surprising was that Elon failed to mention the entrapment to his executive team," says our tipster. "When they learned of the scheme, unhappiness ensued. Isn't trust a great thing?"

Can you guess what happened next? That's right — the memo made its way to Valleywag. We don't make a habit of disclosing our sources, but it's safe to say this leak came courtesy of Tesla's top lawyer. Thanks, Craig!

Here's Musk's memo — one version of it, anyway:

I'm a big believer in trusting employees and sharing information widely within the company, rather than confining it to a narrow set of senior execs and giving everyone else the mushroom treatment. Providing people with an understanding of what problems need to be overcome helps them align and prioritize their actions in pursuit of the greater good. It also ensures that all employees feel included and part of the same team.

This is why I'm so concerned about the continuing leaks to media. It really hurts free communication when even minor issues are leaked and blown way out of proportion. It is nutty that a company like Tesla, which is doing really well right now (how many companies can say that they're sold out through October?) should suffer from misleading articles on blog sites that would have no credibility, but for a purported inside leak. The leaks often aren't even accurate!

This kills trust and creates a negative atmosphere within Tesla. It has to stop.

Today, the legal department will circulate a declaration form to all employees and contractors within the Bay Area. People will be asked to provide their word of honor and signature that they haven't knowingly leaked any Tesla confidential information to the media. They'll be reminded in clearly written language of the substantial liability they would incur for disclosure of confidential information in willful violation of the confidentiality agreement they signed with Tesla. If someone does not tell the full truth here, please take my word that you will be prosecuted to the fullest extent of the law.

Alternatively, people will be given the option of listing every leak they have made, whether published or not. If you fully disclose any leak you have done, the consequences will be precisely nothing. You will be completely forgiven and, unlike Peng, won't be asked to publicly apologize to the company.

The actions of any one person can't be allowed to hurt the vast majority of people at Tesla who are working incredibly hard to make a difference in the world.

Elon

For the record: Tesla is not "doing really well right now." It is losing money on every car it sells, and plans to take deposits from customers for cars which it has no means to build. But this would not be the first time that Musk has invented fictions about the condition of his company.