Developers

Karpathy's 7-Hour Claude Experiment: 45,000 Lines of Code and Missing States

OpenAI co-founder Andrej Karpathy tasked Claude Code with building an interactive map of U.S. data across 31 federal sources. The AI agent delivered a working application in seven hours—but left some geographic gaps unexplained.

4 min read
Andrej Karpathy let Claude Code run for 7 hours. It wrote 45,000 lines of code and skipped a few states.

Karpathy, a founding member at OpenAI who now works on pretraining research at Anthropic after joining in May, set Claude Code on an ambitious task: construct a web application that merges real U.S. data onto a Civilization-style game map. Running the agent through Claude Code's desktop interface using Opus 5.5 at medium reasoning effort with ultracode enabled, the system produced roughly 45,000 lines of code over seven hours, integrating 31 separate public data sources into a single geographic grid, as Karpathy detailed in a Wednesday post on X.

I don't exactly know where I was going with this, but it's really fun to browse and play with.

Andrej Karpathy

Karpathy added that the application could potentially expand into a full game experience. The scope of work—from data acquisition and reconciliation through domain modeling and front-end construction—was handled entirely by Claude, suggesting that human engineers tackling projects of comparable scale might invest more time validating results than the agent spent generating them.

Seven hours, 45,000 lines

Claude managed the entire pipeline, from sourcing geographic information to defining the application's data structures and building the user interface.

Reconciling 31 data sources

The agent pulled information from multiple federal agencies: the U.S. Census Bureau, Bureau of Economic Analysis, Bureau of Labor Statistics, Energy Information Administration, U.S. Geological Survey, and Federal Emergency Management Agency. These datasets covered economic output, employment figures, power plant locations and natural disaster records, all mapped onto a 25-kilometer hexagonal grid.

The central challenge involved forcing datasets built for different purposes onto a unified map. Metropolitan GDP, county-level employment and individual power plant coordinates each demand distinct spatial aggregation and assignment techniques. Claude then had to translate this data into Civilization game mechanics.

The data is converted into Civilization language, e.g., Gold yield is GDP.

Andrej Karpathy

San Jose received a Campus district because one in four of its workers are engineers, programmers or scientists—compared with one in 14 nationally—while Detroit was labeled "Motor City." Claude used national park attendance and university research spending to identify which locations qualified as in-game wonders.

The finished application offers 19 visualization lenses for exploring the map, detailed views of 524 metropolitan areas, and the ability to generate tables and scatter plots from data spanning more than 3,100 counties directly within the interface.

When agents decide alone

Karpathy's account of the project included a notable caveat regarding geographic completeness.

Claude decided to skip a few states and territories sry

Andrej Karpathy

The post did not clarify whether these omissions resulted from incomplete source data, technical difficulties in geographic processing or deliberate choices made by Claude during development.

In a production data pipeline, such gaps could skew regional analysis, introduce sampling bias or compromise calculations requiring complete geographic coverage. Tests built against the transformed dataset might never surface missing records unless coverage standards were defined independently of the implementation itself.

Karpathy made the source code accessible through the application's help menu, though his post did not detail how thoroughly he had independently verified individual data transformations.

The verification gap

With only half of his weekly Claude usage allowance remaining, Karpathy suggested that continued development might require someone else to take the lead. His account provided little information about the actual cost of the seven-hour session or the amount of manual effort required on his end.

Earlier this week, Confluent shared its experience migrating a Kafka client from Java to Rust, employing specialized agents and multiple validation rounds to ensure the Rust version matched the Java implementation's behavior.

Verifying Claude's work without an existing reference implementation presents a distinct problem. If Claude employed a flawed method for aggregating geographic data, its own tests could reinforce rather than expose the error. Seven hours proved sufficient to build a functional application, but Karpathy's experiment offers limited insight into how much additional time would be needed to independently confirm the work's accuracy.

Source: The New Stack · Reporting supplemented by The Silicon Ledger staff.