Oops: Anthropic Accidently Leaked the Entire Code for Its “Claude Code” Program

One of Anthropic’s biggest wins has been its wildly-popular Claude Code program, that can do nearly all the grunt work of programming. Properly prompted, it can build new features, migrate databases, fix errors, and automate workflows.

So, it was big news in the AI world last week when an Anthropic employee accidently exposed a link that allowed folks to download the source code for this crown jewel – – the entire code, all 512,000 lines of it, which revealed the complete logic flow of the program, down to the tiniest features. For instance, Claude Code scans for profanity and negative phrases like “this sucks” to discern user sentiment, and tries to adjust for user frustration.

Gleeful researchers, competitors, and hackers promptly downloaded zillions of copies. Anthropic issued broad copyright takedown requests, but the damage was done. Researchers quickly used AI to rewrite the original TypeScript source code into Python and Rust, claiming to get around copyright laws on the original code. Oh, the iron: for years, AI purveyors have been arguing that when they ingest the contents of every published work (including copyrighted works) and repackage them, that’s OK. So now Anthropic is tasting the other side of that claim.

The leak has been damaging to Anthropic to some degree. Competitors don’t have to work to try to reverse engineer Claude Code, since now they know exactly how it works. Hackers have been quick to exploit vulnerabilities revealed by the leak. And Anthropic’s claim to be all about “Safety First” has been tarnished.

On the other hand, the model weights weren’t exposed, so you can’t just run the leaked code and get Claude’s results. Also, no customer data was revealed. Power users have been able to discern from the source how to run Claude Code most advantageously. This YouTube by Nick Puru discussed such optimizations, which he summarized in this roadmap:

There have actually been a number of unexpected benefits of the leak for Anthropic. Per AI:

Brand resonance and community engagement have surged, with some observers calling the incident “peak anthropic energy” that generated significant hype and validated the product’s technical impressiveness.  The leak has acted as a massive free marketing campaign, reinforcing the narrative of a fast-moving, innovative company while bouncing the brand back among developers despite the security lapse. 

Accelerated ecosystem adoption and bug fixing are also potential benefits, as the exposure allowed engineers to dissect the agentic harness and create open-source versions or “harnesses” that keep users within the Anthropic ecosystem. Additionally, the public scrutiny likely helps identify and patch vulnerabilities faster, while the leaked source maps provide a roadmap for competitors to build “Claude-like” agents, potentially standardizing the market around Anthropic’s architectural patterns.

The leak also revealed hidden roadmap features that build anticipation, such as:

  • Kairos: A persistent background daemon for continuous operation. 
  • Proactive Mode: A feature allowing the AI to act without explicit user prompts. 
  • Terminal Pets: Playful, personality-driven interfaces to increase user engagement.

Because of these benefits, conspiracy theorists have proposed that Anthropic leaked the code on purpose, or even (April Fools!) leaked fake code. Fact checkers have come to the rescue to debunk the conspiracy claims. But in the humans vs. AI debate, this whole kerfuffle doesn’t make humans look so great.

Education is a core US export

While there is no shortage of examples of willful ignorance and outright lying in politics, the idea that blocking foreign students from attending US universities is anything other than disastrous to US students is positively enraging. The real curiousity here is whether the value of a US degree has yet dipped below the full tuition price tags that foreign students almost always pay. Beyond the billions in tuition received and tuition subsidies indirectly consumed, I couldn’t even begin to put a price on the cultural power accrued from being the global center for higher education for the last century. This administration’s capacity to find new and innovative ways to tear down US institutions is unrivaled and beyond even the grandest dreams of our most optimistic enemies.

Should Practicing Economists Read Tyler’s New Marginalism Book

Tyler Cowen’s new (free online) book entitled The Marginal Revolution: Rise and Decline, and the Pending AI Revolution is going to be “interesting,” but should you read it?

Mike Makowsky explained that Academic economists are overcommitted

If you are already struggling to meet your deadlines for referee reports you owe to editors, should you take the time? If you don’t have time to indulge your curiosity about the 18th century and dead thinkers, right in the middle of the semester, should you look at it now or maybe browse it over the summer?

I think it’s worth going straight to the last chapter right now.

“Chapter 4: Why Marginalism Will Dwindle, and What Will Replace It?

It was written for you and released quickly for this moment. Tyler does not personally have to worry about his job, but you might.

This link will take you straight to an in-browser e-reader https://tylercowen.com/marginal-revolution-generative-book/app/

Or you can download the PDF at https://tylercowen.com/wp-content/uploads/2026/03/TheMarginalRevolution-Tyler_Cowen.pdf

You might face mental resistance to reading this chapter, because you don’t want to hear the message. If that’s you, then it’s especially useful to read this chapter. He’s not correct about everything. Develop your counter argument, to go forth and save marginalism. You can only do that if you understand and name the threats. This is more about methods/professions and less about ideology than you might think from the title.

Here are some quotes that stood out to me

The ties of empirical work in economics to economic theory are evolving, and in particular the explicit ties to intuitive microeconomic reasoning, and marginalist thinking, are being cut. In much of traditional econometrics, the emphasis is on testing pre-existing models…

in machine learning, we let the algorithm build the “theory” for us, noting it may have tens of millions of variables and thus not count as a theory…

So much for prediction, what about hypothesis generation? Well, there is a new approach to that too, using machine learning.

A lot of economists do not regularly describe what they actually do for work. Yes, we are saving the world by writing papers, but what exactly do you do? Do you generate hypotheses? Is that what you are teaching your students to do?

It’s not fun to think of how the econ profession might need to reposition, but we owe it to students. Who better to work on this than tenured professors? 

I think the case for undergraduates students to major in economics is strong. I also think the case for doing 4 years of college is strong for students who want to learn.

Last summer I wrote: Students still need to learn principles

If economics is “more interesting” than hard science, then it might serve to scoop up good thinkers at the undergraduate level and get them doing something more technical than what they would end up doing in a humanities program. When I graduated from college, the fact that most econ student had accidentally learned to code was a benefit to them.

College graduate humans ought to be able to read and pass the Turing Test if they are going to be effective complements to AI.

Economists championing marginalism for students, today, write: For Gen Z, Economics May Be the Key to Success in the New AI World

Let me plug Mike as well for thinking about what research econs do in 2026: The actual AI problem in academic economics “Oh, what shall all the candlemakers do now that the sun has risen?” made me laugh.

An Expensive Easter

Americans like their food. Holidays are often known by the dishes that we serve. Thanksgiving is a bit unique in that most of us converge on turkey, though diversity obviously exists. What about Easter? There’s not really the same focus on a single food like there is for Thanksgiving. My impression is that people eat daytime or lunch foods that include ham, lamb, or just about anything. My family tends to make tacos.

What am I saying?! We eat candy! Solid or hollow chocolate bunnies, jellybeans, peeps, and on and on. We fill Easter eggs and keep candy around the office. We literally have baskets full of candy.

A Chocolate Bunny? In this economy?

Have you seen the price of chocolate? Yeesh! The latest figures are from February and the prices for chocolate and cocoa bean products are down 11.7%  year-over-year. That’s nice, you may think, our budgets can fit a bit more chocolate into our consumer – I mean Easter – baskets. Great news. The news seems a little less great when you realize that February’s price of chocolate was 90% higher than it was four years earlier in 2022. 90% higher is a lot like 100%, and 100% is double! In fact, the price had peaked at 142% higher by September of 2025, and now prices are quickly falling. See the chocolate-colored line in the graph below.

Continue reading

How Much To Trust Research Papers? My Rules Of Thumb

  1. Trust literatures over single papers
  2. Common sense and Bayes’ Rule agree: extraordinary claims require extraordinary evidence
  3. Trust more when papers publicly share their data and code
  4. Trust higher-ranked journals more up to the level of top subfields (e.g. Journal of Health Economics, Journal of Labor Economics), but top general-interest journals can be prone to relaxing standards for sensationalist or ideologically favored claims (e.g. The Lancet, PNAS, Science/Nature when covering social science)
  5. More recent is better for empirical papers, data and methods have tended to improve with time
  6. Overall effects are more trustworthy than interaction or subgroup effects, the latter two are easier to p-hack and necessarily have lower statistical power
  7. Trust large experiments most, then quasi-experiments, then small experiments, then traditional regression (add some controls and hope for the best)
  8. The real effect size is half what the paper claims

That last is inspired by a special issue of Nature out today on the replicability of social science research. An exception to rule #4, this is an excellent project I will write more about soon.

Real Wages Today are Much Higher Than 1894, But Are Workers Still Getting Squeezed by Rent?

A recent viral Tweet shares a political cartoon from 1894, which shows a worker being squeezed by high rents and low wages. The Tweet claims “the problem has only gotten worse.”

Can this be true? Are workers today actually worse off than they were in 1894? At first blush, this seems obviously wrong. Here is a chart I created showing real (inflation-adjusted) wages since 1894. They are eight times higher today (I have combined two wage series and two price indices, so don’t take this as being perfect, but roughly accurate).

Figure 1

Whatever concerns we might have about high rents today, there must have been some other major improvements in the cost of living relative to wage increases since 1894, given that one hour of work can purchase about 8 times as many real goods and services today.

But is there a narrower case for the cartoon? What if we only focus on wages? We can do this by using a great new resource from the Philadelphia Fed, which provides some long-run data on housing prices in the US, for both purchasing a home and renters. The data series conveniently goes all the way back to 1890, so we can make the comparison with 1894 using the nominal rent index (it ends in 2006, but we can merge it with the modern CPI for rental housing). What if we compare this rental price series to the same wage series I used in the chart above?

Figure 2

The trend in this second chart is very troubling. Rents have increased much faster than nominal wages. While other goods and services may be more affordable, rents — which consume around 24 percent of household income for renters — are rising relative to wages. Sure, we can talk all day about how the quality has improved — larger apartments, indoor plumbing, modern safety features that didn’t exist in 1894 — yet still, renters can only rent what is available. And today rental housing is much more expensive than on April 1, 1894.

APRIL FOOLS!

The data was all correct, other than the fact that I tricked you by swapping the wage and rent lines. Wages have actually increased much faster than rents since 1894 (though they have increased roughly equal rates in recent decades). Sorry for that little trick, I’m a little surprised no one noticed. Perhaps I am just too well-known for being a straight shooter with data. Here is the real chart:

WW II Key Initiatives 4: Building Hundreds of Small, Slow, But Cheap Ships to Counter the U-Boat Threat

This is the fourth in a series of occasional blog posts on individual initiatives that made a strategic (not just tactical) difference in the course of the second world war. World War II was not only the biggest, bloodiest conflict, in human history. It played a definitive role in giving us the world we have today. Everyone can find something to complain about in the current state of affairs, but think for a moment what the world would be like if the Axis powers had prevailed.

Winston Churchill’s biggest single worry in WWII was that German submarines (U-boats) would sink enough cargo and troop ships to cut Britain off from America and other allied countries. The standard anti-submarine weapon for the stormy Atlantic was the full-sized destroyer. Destroyers were fast, largely weather-proof, and bristled with guns and depth charge launchers. Unfortunately, building a destroyer took a lot of resources and time, particularly for the state-of-the-art steam turbine engine. There was just no way in 1939-1942 to produce enough destroyers to cover all sides of every convoy in the Atlantic.

The British Admiralty knew they needed some sort of small ship that could be readily produced by civilian shipyards, but they did not know what exactly that would look like. It fell to William Reed, a naval architect at Smith’s Dock Company, to propose a workable design. He based his design on a successful whaling ship, which was just large enough to survive the Atlantic weather. It was powered by a low-tech triple expansion steam piston engine. This Victorian-era sort of engine could be built by even small shipyards. The resulting boat, called a corvette, was small (200 ft long), slow (16 knots), rolled horribly in the waves, and was lightly armed (one forward 4-inch deck gun for surface duels, and simple roll-off racks for depth charges at the stern). But it was good enough for its one mission, which was to sink or pin down U-boats trying to attack a convey.

By the end of January 1940, 116 ships were building or on order to this initial design. Over 200 were eventually built in UK and Canadian shipyards. Twenty-two of these Flower-class corvettes were sunk by enemy action, and the conditions for their crews were miserable, but they are credited with tipping the balance of the Battle of the Atlantic, which was a crucial phase of WWII.

For his contributions, Reed was appointed an Officer of the Order of the British Empire.

The actual AI problem in academic economics

There is a steady flow of takes on the impact of AI on academic economics research, whether its the example of someone writing an ostensibly legitimate, if somewhat trite, research paper with only a few hours effort to the implication that there is already no need to continue writing papers as the AIs are already better at at. Oh, what shall all the candlemakers do now that the sun has risen?

I think the idea that AI has already rendered the research paper an obselete endeavor is very wrong, almost to the point of negligence. It both vastly underestimates the quality of the median contribution provided in the 80 to 100 or so best journals and vastly overestimates the reliablity of current AI attempts at research on the margin. Putting such concerns aside for the moment, it’s still worth pondering how we can extrapolate from current AI as a tool for status quo research to forecast if it might reshape labor as an input 5 or 10 years from now. That’s far enough away that it borders on futurism and, more importantly, the kind of forecasting that I shy away from. Feel free to tell me in the comments where we are headed.

At this moment, however, we already are in the middle of a far more subtle disruption in academic research that I haven’t seen anyone write about yet. The quiet, but pronounced, uptake of AI tools in the writing of referee reports for academic journals. If you’ve submitted papers for review in the last 18 months, dollars to donuts you’ve received a referee report that has been lengthy, well-organized, with an unusual number of bullet points and headers discussing your paper, summarizing it’s contributions, and offering suggestions that on their face seem reasonable but upon a moment’s reflection are quickly realized to be entirely vapid by someone familiar with the structure of the data and relevant literature.

There is something uniquely frustrating about working on a research project for 3 to 5 years only to have judgement passed down on the basis, at least in part, of a review written by ChatGPT that is not just wrong but, well, kind of stupid. I’ve already personally had to deal with having a paper refereed via ChatGPT, rejected, and then, thanks to it being internalized by ChatGPT into their text base, it being reconfigured into a citaton hallucination cited by other papers that, to maxmize comedy, replaced 3 (including me) of the 4 authors with other (nicer? better looking?) economists. What’s most frustrating, however, is that this is hitting economics journals that do not seem to have any plan in place to deal with it. Not to suggest this is an easy problem to solve (not remotely), but it certainly should not be coming as a surprise to anyone. Let’s look at the facts:

  1. Academic economists are almost universally overcommitted.
  2. Journal referees are, for the most part, unpaid for their time.
  3. As the number of quality articles produced and submitted to journals has increased, so has the strain on the entire editorial process, including review writing.
  4. The only thing holding it together at all has been reputational incentives (i.e. nobody wants a bad reputation with the editors that are going to consider your future work) and a disciplinary sense of “civic duty”. Reputation is, of course, the load bearing mechanism here.
  5. A technology was introduced that, at the very least, pantomimes the review process well enough that it can produce a low quality fascimile of a review that, with a few sentences tossed in at the beginning and a short separate letter written directly the editor by the reviewer, can allow a task that used to take a 0.5 to 1.5 work days can now be crossed off your to-do list in less than an hour.

Is it really that hard to see what’s coming? Of course academic economists are going to be tempted to ask ChatGPT to write a review for them. There are almost no direct rewards for writing good reviews, while the costs are significant. Evaluating a genuinely new and distinct piece of research that has never been done before is hard work and takes significant time.

Now, how this is playing out across the body of journals is an open question. Here’s my best educated guess:

At the top journals, reputational concerns are the strongest, but so is the opportunity cost of everyone’s time and the competition for limited article space. Referees might not have the courage to outsource the actual decision to ChatGPT, but they’ll be awfully tempted to offload as much of the grunt work as they can. If I were an editor at a top 10-15 journal, I would expect a growing number of reports from referees who read the paper quickly (<15 minutes), then made a decision to recommend acceptance or rejection based on 1) if they knew any of the authors, 2) whether the content is a complement or a substitute for their own research, 3) whether they had seen the paper presented in person and was well-received, 4) the general bundle of status associated with the authors and the subject, and 5) whether they liked the paper (you can, in fact, have a strong opinion on paper you’ve looked at for 15 minutes. We’re all guitly of it). Having arrived at their positive or negative assessment, they then outsource the actual first draft of the the review to ChatGPT, with the instruction to write a positive or negative review. Now, given the strong reputational considerations that any credible reviewer at a top journal should have, I expect there to then be significant rewriting of the review, including that addition of the reviewer’s preferried economist gripes about identification, whether the results generalize, etc, giving an otherwise generic report some more bespoke vibes. This isn’t the real recommendation anyway, that’s the letter to the editor that goes unseen by the research authors. I don’t think most referees will have the brass to outsource that.

That’s probably not great, especially for young authors trying to break into a field. But honestly, none of those problems are new. If anything it takes a very old problem (i.e. overcommitted economist at top school asks his or her student to write a referee report rejecting an article for them) and just tweaks it slightly (i.e. overcommitted economist at top school asks ChatGPT to write a referee report rejecting an article for them, freeing up a PhD student to get back to work cleaning and analyzing their data for them). Not optimal, but hey, what is?

The real problem, I am sad to say, is the next tier down. The field journals. The second-tier general journals. The oddball and heterodox journals. The journals that used to struggle to get enough good submissions and now struggle to find anyone to referee for them. What used to be a trickle is now a deluge of higher quality research. That deluge, however, comes from authors who also constitute a referee pool that is far busier than they were before and without the same resources that come with appointment as top institutions.

I promise you, from experience, keeping a significant research agenda going during my salad days when I was teaching a 3-3 load was not easy. What happens when the 71st ranked journal that you might submit an article to one day sends a seemingly acceptable, if mediocre and slightly banal article to review? Are you really going to give it a precious work day? Or are you going to give it a once over, ask chatGPT to review it, and then give a recommendation based on a 5 minute skim? I want believe that I would never associated my professional reputation with a half-assed review, but that’s easier to say on this side of the R1 tenure fence.

Now’s the part where I smugly tell you the obvious solution and call it a night. As is often the case, however, I don’t have one. Not one that anyone is going to like, at least. Because, the only solution I have is precisely the suggestion that got Jerry Maguire fired. We could simply publish and write fewer papers. If we write fewer papers, we can review fewer papers. If we review fewer papers we can pay people to review them. If we can pay people to review them, we can hold them to higher quality standards. Editors can review the reviews. Every now and then someone suggests we get rid of anonymous reviewers, but I worry that anonymity is load bearing when it comes to the quality standards that are in many ways the hallmark of modern economics. I don’t think we can give up on quality. Quality is our comparative advantage. So maybe its time we let go of quantity. If your dean says you’ve written some good and important article, but there aren’t enough lines on your vitae, then what they’re really saying is that they don’t want research faculty, they want AI middlemen.

Don’t be an AI middleman.

Oil Price Lesson Plan for Economic Principles

Alex Tabarrok noted in Oil versus Ice Cream that he and Tyler, as textbook authors, “chose the oil market as our central example. Oil is always in the news…”

when a student sees that the price of crude has surged past $100 a barrel because Iran closed the Strait of Hormuz—choking off 20% of the world’s oil supply—they have the framework to understand what is happening. Supply shock, inelastic demand, expectations and speculation, the macroeconomic transmission to GDP—it’s all right there in the headlines.

In a classroom, a good way to begin is to ask the students to tell you what they have noticed recently about oil or gas prices. Having the students obtain the oil price data themselves could be fun, if you are in an environment with screens/computers.

A data source for undergrads is the FRED chart for WTI crude oil prices. It is clean and easy to explain in class. An instructor with slides could pull this up in real time. https://fred.stlouisfed.org/series/DCOILWTICO

Ask students: “Is this price change primarily explained by

  1. Increase in demand
  2. Decrease in demand
  3. Increase in supply
  4. Decrease in supply

Correct answer: d. Decrease in supply

If you cover elasticity, this is especially helpful as an example. “Why would the price jump more when demand is inelastic?”

It’s not too late to work this into a lesson plan for the Spring 2026 semester, economic teachers. I might use it to illustrate supply shocks next week.

This event is a classic example of a negative supply shock: a disruption in the Strait of Hormuz would reduce the amount of oil reaching world markets, pushing energy prices sharply upward. Because oil is an important input for transportation, manufacturing, and heating, higher oil prices raise costs across much of the economy. Firms may cut production, households may spend more on gasoline and utilities and less on other goods, and overall economic activity can slow. That is why economists worry that large oil supply shocks can contribute to recessions. They do not just make one product more expensive; they can ripple outward, reducing real income, lowering consumer confidence, and weakening GDP growth while inflation rises.

Related posts. The whole crew showed up this month:

James from March 12: Is a US Oil Export Ban Coming?

Jeremy from March 18: Gasoline Prices Have Increased at Record Rates, but Remain At About Average Levels of Affordability

Tyler from March 22: How much more will oil prices have to go up?

MattY from March 24: Why hasn’t oil gotten even more expensive?

Austin Vernon: https://www.austinvernon.site/blog/thestrait.html

Cournot & Stackelberg Math

This post solves for the equilibrium quantity of production with quadratic total cost under Cournot and Stackelberg competition.

Say that there are two firms. They produce the exact same quality and type of goods and sell them at the same price. Let’s also assume that the market clears at one price. Finally, let’s assume increasing marginal costs.

Let’s say that they face the following demand curve:

The firms have a total cost of:

The marginal cost is the derivative with respect to the choice variable for each firm, or their respective quantities produced:

The total revenue is just the price times the quantity sold.

This is all standard fare for economic modeling. You’re free to make different assumptions. You can even adopt different slopes in the demand curve to reflect goods with different characteristics.

Cournot Competition

If you imagine a lengthy production process, or otherwise that they physically attend the same market, then it’s reasonable to assume that they don’t know one another’s choice of quantity produced.

We know how firms maximize profit: They produce the quantity at which the marginal revenue equals the marginal cost. But, what is marginal revenue? The derivative of total revenue with respect to the choice variable:

Now we can set the marginal revenue equal to marginal cost and solve for the optimal level of output:

Notice that the optimal level of output depends on the production decision of the other firm. These are called response functions. If we solve for the quantities at which they intersect, then we are solving for where both firms are producing the best response to one another. This is known as a Pure Strategy Nash Equilibrium (PSNE).

Luckily, in many applications, one or more of the above terms are zeros, which makes things much simpler.

The general process for solving for the Cournot equilibrium is:

  1. Set MR=MC to find the response functions.
  2. Find where the response functions intersect.

Stackelberg Competition

Continue reading