A second city
Previously I showed a working twin of Greater Newcastle, six hundred thousand people. Mumbai is more than forty times larger and different in almost every way that matters to a travel model: the suburban railway carries millions a day, auto-rickshaws are a mode of their own, and much of the data lives in printed timetables and government portals rather than open feeds.
The Mumbai twin covers the core of the Mumbai Metropolitan Region. Its 27,057,132 synthetic residents live in 6.1 million households, generated from the 2011 census and carried forward to 2026 with vehicle registrations and population projections. It runs on the same code as Newcastle: the same simulator, the same viewer, the same checks, the same scoreboard.
Mumbai, rebuilt from its own data
The suburban railway carries most of the city's longer trips, and it has no open timetable feed. So the twin reads the Western and Central Railways' own printed timetables: 3,289 trains, against the 3,234 services the operators publish, each stopping where the sheet says it stops. The metro lines run at their published headways, the buses from a community-built feed and the regional operators' data, and seven commuter ferry crossings from the Maritime Board's directory. Trains, metro cars and boats carry the capacities their operators publish.
Many Indian government websites refuse connections from an Australian address, so sources came through Internet Archive copies, a VPN endpoint in India, and - for data behind a login and a captcha - downloads from a browser, imported by script with a record of where each came from. Of 600 catalogued sources, 572 were acquired, each with a stated use in the model.
Where Mumbai stands
Mumbai has not produced a ridership reading yet, for the reason this run shows.
A simulation that runs a fraction of the population also scales every road down by that fraction. At 1%, a typical Mumbai street can pass one vehicle every few minutes, and on a network whose median link is 65 metres long the city gridlocks no matter how much memory the machine has. The smallest sample that behaves is about 10%: 2.7 million agents and roughly 247 GB of working memory, several times what the workstation that built it has. The framework carried Mumbai all the way to a running simulation. It needs a larger machine to go further.
One framework, any city
Mumbai took days because the framework was made city-agnostic from the start. In its first week, 338 file paths across 46 scripts assumed Newcastle was the only city; they were moved behind one module that knows where a city lives, and the rule became that the code may not name a place. A city is a folder that supplies a described contract, and a throwaway test city with a different projection, seed and set of modes proves on every change that the framework reads the same for a city it has never seen.
Built with agents
Both cities were built between 10 August and 30 September in 64 working sessions with AI coding agents - 709 commits, reviewed and steered by us, written mostly by them. The main difficulty was continuity: each session starts with no memory of the one before.
Previously I wrote an agent that onboards a repository the way a new engineer would, building itself a table of contents. This project turns that around: the repository is kept as the table of contents, so any session can read its way to the current state in about 600 lines.
Three habits kept fifty days of agent work honest. Every fact has one home, and the pages that repeat it are generated from it or checked against it. Every mistake that happens twice becomes a check that refuses it - "a rule a session can skip is a wish", as one of the project's hooks puts it - so a typed-in map rectangle, a script that silently corrupted files, a forced Windows restart that killed a 28-hour run, each now has something that stops it. And the decisions and the spending stay with us: open questions arrive once, as clickable choices with a recommendation, and no day-long run starts without an approved, measured cost.
What came next
A twin that could stand up a city of 27 million people on one contract caught the attention of a state government in India, planning a new city on Mumbai's edge. The proposal we prepared for it is the next post.
Sources & anchors
- Figures 1 and 5: the twin's run viewer on the Mumbai run
20260922T005949_4it_1pct· figures 2 to 4: drawn from Mumbai's assembled network, weekday timetables and that run's persons · map data © OpenStreetMap contributors (ODbL), buildings from Overture Maps - Mumbai in the twin - cities/mumbai/docs/README.md · the suburban timetable builder - build_suburban_timetable_feed.py
- The city contract - src/city.py · city.schema.json · the throwaway-city test - check_city_agnostic.py
- How the sessions work - HANDOVER_CONTRACT.md · the onboard and handoff skills - onboard, handoff · the hook quoted - block-stdin-trap.sh
- Claude Code - github.com/anthropics/claude-code