🎉 Giảm 20% cho đơn hàng đầu tiên!✦🚚 Miễn phí vận chuyển cho đơn trên 500.000₫✦⚡ Flash Sale — Số lượng có hạn!✦🎁 Quà tặng kèm cho đơn từ 1.000.000₫✦🎉 Giảm 20% cho đơn hàng đầu tiên!✦🚚 Miễn phí vận chuyển cho đơn trên 500.000₫✦⚡ Flash Sale — Số lượng có hạn!✦🎁 Quà tặng kèm cho đơn từ 1.000.000₫✦
Shopify CEO: $2,000 in Tokens, One Weekend to Rewrite a System — and the Lesson on Verifying AI Code
Quay lại Blog

Shopify CEO: $2,000 in Tokens, One Weekend to Rewrite a System — and the Lesson on Verifying AI Code

1 tháng 12, 202612 phút đọcVũ Khôi
English
#English#AI Agent#Học tập & Nghề nghiệp
Vũ Khôi

Vũ Khôi

Tác giả tại Wotech Electronics Blog

Shopify CEO: $2,000 in Tokens, One Weekend to Rewrite a System — and the Lesson on Verifying AI Code

Tobi Lütke — who wrote Shopify's first lines of code himself more than 20 years ago — recently made some remarkable remarks on David Senra's Founders podcast. He revealed that almost all engineering work at Shopify now happens through "factories" — clusters of AI agents, each handling a different job. And Shopify's CEO uses this approach himself: he decided on a Friday, and by Monday there was production code.

Quick answer

  • Almost all engineering at Shopify now runs through AI agent "factories": clusters of agents with different jobs, working together to write code, test, analyze, and handle technical tasks.
  • In a single weekend, with $2,000 in tokens (about 52 million VND), Lütke rewrote the Beta system — where thousands of Shopify engineers push code every day, previously maintained year-round by a dedicated team. Shopify's PR merge speed is now 10 to 100 times the company's historical peak.
  • When AI can produce code at a terrifying speed, a new problem appears: who will review all that code? Humans cannot review line by line at the pace hundreds of AI agents generate.
  • Lütke's answer is Formal Verification: use AI to find hidden state machines in code, use TLA+ to model and check the states a system can reach, review security vulnerabilities, then rebuild the system in a safer language like Rust.
  • "Agents love rules but not abstractions": AI agents like clear rules, but dislike complex layers of abstraction — some abstraction layers that once saved humans time can now become a burden for AI.
  • The twist: the very walgit project Lütke built that weekend was later found to have a distributed systems bug involving a conditional delete on Amazon S3 — the test suite still passed because the mock environment behaved differently from real S3. $2,000 can buy a huge amount of code, but it cannot buy the guarantee that all of it is correct.

What are Shopify's AI agent "factories"?

Picture a software factory, where many AI agents coordinate to write code, test, analyze, and handle technical tasks. That is how Lütke describes engineering at Shopify today: almost all of it runs through "factories" — clusters of agents with different jobs, communicating through chats or message boards on longer assignments, loosely mirroring how a human organization works.

According to summaries of the episode, Lütke compares the productivity gap between people who use agent factories and those who do not to the difference between a modern factory and a medieval blacksmith. He also says AI should be treated like an instrument you learn to play, not a button you press and forget.

Notably, Shopify did not start from zero: the company has treated internal tooling as high-status work for years, with some of its best engineers assigned to it. That culture and infrastructure is what makes agent factories so effective now that AI has arrived.

One weekend, $2,000 in tokens, rewriting the Beta system

The concrete story that makes the abstract argument real: Beta — Shopify's internal source repository system, where thousands of engineers push code every day. When pull request volume surged thanks to AI, the old system could not keep up. Lütke decided on a Friday, and by Monday there was production code.

He describes it as a weekend project, not a multi-year rewrite. One important nuance from Lütke himself, recorded in episode summaries: the word "rewrote" should not be taken literally as replacing everything. But the essence of the story stands: a database-layer job that might once have needed a team of specialists coordinated for a year — and would probably never have been approved as a side quest at a commerce company — is now "worth $2,000 of tokens." Time has stopped being the constraint; cost has replaced it.

According to Lütke, Shopify's PR merge speed is now roughly 10 to 100 times the company's prior rate. That speed is why Beta needed rewriting — and also why the next problem appears.

PR merge speed up 10–100× — and a new problem appears

When AI can produce code at a terrifying speed, a new problem appears: who will review all that code?

Humans cannot sit and review every line at the speed hundreds of AI agents generate. Traditional code review — a person reading each line, reasoning about the logic, then approving — was already a bottleneck in many teams. When code production speed rises 10 to 100 times while human review speed stays flat, the gap can only be closed by a different kind of verification.

That is why Lütke places special emphasis on Formal Verification — a field he previously knew mostly from academia. According to episode summaries, he calls formal verification "by far the most important field in engineering" today, with code review serving as a weaker human substitute.

Shopify logo

Formal Verification — Lütke's answer to the verification problem

He shares a 4-step process that can be applied to an existing codebase:

  1. Use AI to find hidden state machines in code and make them explicit to catch logic bugs. Many bugs hide in states the code never states clearly — AI can help dig them out.
  2. Use TLA+ to model and check the states a system can reach. TLA+ is a formal specification language created by Leslie Lamport that lets you systematically check whether a design can fall into a wrong state — before writing code.
  3. Review security vulnerabilities.
  4. Rebuild the system in a safer language like Rust, based on formal verification and acceptance tests.

The message is clear: when writing code becomes cheap, proving the code correct becomes expensive. Formal verification — once an academic, math-heavy field — suddenly becomes the most practical skill an engineer can have in the agent era.

"Agents love rules but not abstractions"

He also offers an interesting observation: "Agents love rules but not abstractions." AI agents like clear rules, but dislike complex layers of abstraction.

Many frameworks and abstractions were born when the software industry was short of programmers, when companies had to find every way to boost human productivity. Now that the cost of generating code has collapsed, some abstraction layers that once saved humans time can become a burden for AI. Agents can write tens of thousands of lines for a specific purpose, but dislike tracing abstractions across dozens of files. Conversely, agents thrive on strict linting rules and explicit constraints that human engineers often find oppressive.

The practical consequence: the software structure optimized for humans typing code is not necessarily the structure optimized for agents generating code. When human typing productivity no longer dictates software structure, clear constraints become more valuable than clever layers of abstraction.

The common mistake: unambitious requirements

Lütke also argues that many people use AI ineffectively because they set requirements that are too unambitious. They rush to tell AI how to solve a problem before letting AI consider whether the problem needs to be solved that way at all.

This is worth pondering: in an era where the cost of generating code is near zero, the scarce resource is no longer "writing code fast" but "asking the right question." An ambitious requirement — rewrite an entire system in a weekend — opens possibilities a modest one ("fix this function for me") never reaches. And letting the agent think about the problem before diving into the solution is itself a new skill: don't point fingers too fast; let the agent reason about the problem first.

The twist: the S3 conditional delete bug in walgit

But the story does not stop there. According to the post, the very walgit project Lütke built that weekend was later found by engineer Kelly Sommers to have a distributed systems bug involving a conditional delete on Amazon S3. The test suite still passed because the mock environment behaved differently from real S3.

Quite a twist: the very product the Shopify CEO used to illustrate the power of AI also revealed the limits of AI-generated code.

$2,000 can buy a huge amount of code. But it cannot buy the guarantee that all of that code is correct.

Verification note: the core claims of the episode — agent factories, the $2,000 weekend project, the 10–100× PR merge speed, formal verification, and the rules-vs-abstractions observation — all match multiple independent summaries of the Founders episode "Tobi Lütke: Why Jensen Huang Is Irreplaceable" (published 22/11/2026). The specific detail about the S3 conditional delete bug in walgit and the engineer who found it is as stated in the original post and was not independently corroborated in this check.

The biggest shift: the engineer's value moves

The post's author concludes: this is the biggest change IT professionals need to prepare for. Companies used to pay programmers for their ability to write code. In the future, an engineer's value will increasingly lie in system design, finding errors, controlling risk, and verifying what AI creates.

Writing code is getting cheaper. Writing it correctly, running it correctly, and ensuring the system doesn't crash in production is what's expensive.

If tomorrow AI can write as much code as a 50-developer team, will companies need more code writers — or engineers good enough to control 50 AI agents?

Before Now
Value = writing code fast, in volume Value = system design, finding errors, controlling risk, verifying AI output
Biggest constraint = programmer time Biggest constraint = token cost and verification capacity
Abstractions helped humans save typing time Some abstractions become a burden for agents; clear rules are worth more
Human eyeball code review is the main line of defense Formal verification (TLA+, explicit state machines, safer languages like Rust) becomes practical

Apply it now

  1. Set more ambitious requirements before prescribing the solution: when assigning work to AI, describe the desired outcome and let the agent consider the problem first — don't rush to dictate each step.
  2. Organize agents as a "factory": split work across specialized agents (writing code, testing, analysis, review) instead of one agent doing everything; let them communicate via chat or message boards on long tasks.
  3. Write clear rules instead of complex abstractions: agents thrive on strict lint rules and explicit constraints; review abstraction layers that agents must trace across dozens of files.
  4. Start learning Formal Verification: get used to making state machines explicit in existing code, and learn TLA+ to model system states — the skill Lütke calls the most important today.
  5. Don't trust a passing test suite alone: mock environments can behave differently from real systems (as in the S3 conditional delete case) — for critical operations, test in an environment as close to production as possible.
  6. Remeasure team "productivity": don't just count lines of code or merged PRs; measure review speed and the rate of bugs slipping through — that is the new bottleneck.
  7. Invest in internal tooling: as Shopify did for years — good internal tools are the foundation that lets agent factories work, not a side cost.

Frequently asked questions

What are Shopify's agent factories?

That is how Shopify organizes engineering work: almost all of it runs through "factories" — clusters of AI agents with different jobs (writing code, testing, analysis…), coordinating via chat or message boards on longer assignments, loosely mirroring how a human organization works.

Why did Lütke rewrite the Beta system in one weekend for $2,000?

Because when the cost of generating code collapses, time stops being the constraint and cost becomes the constraint. A database-layer job that might once have needed a team of specialists for a year — and probably would never have been approved — is now "worth $2,000 of tokens." Note: Lütke himself says "rewrote" should not be taken literally as replacing everything.

What is Formal Verification, and why does it matter?

Formal Verification is a method that uses mathematics and formal models to prove a system behaves correctly in every reachable state. When AI generates code 10–100× faster, humans cannot review every line in time — formal verification becomes a systematic way to ensure code is correct, instead of relying on human eyes.

What does "Agents love rules but not abstractions" mean?

Agents like clear rules (such as strict lint rules) because they clarify what behavior is allowed, but dislike tracing abstraction layers across dozens of files. Many abstractions were created to help humans type code faster when programmers were scarce; when code is cheap, some of those abstractions become a burden for agents.

What does the S3 bug in the walgit project show?

According to the post, the walgit project Lütke built over the weekend was found to have a distributed systems bug involving a conditional delete on Amazon S3, even though the tests passed — because the mock environment behaved differently from real S3. The lesson: $2,000 buys a lot of code, but not the guarantee that it is correct; testing on mocks does not replace verification on the real system.

Source: Post by the page Hỏi Dân it Offical on Facebook, 30/11/2026, summarizing the Founders podcast episode with Tobi Lütke hosted by David Senra — "Tobi Lütke: Why Jensen Huang Is Irreplaceable" (published 22/11/2026). The cover image is a portrait of Tobi Lütke; the mid-article image is the Shopify logo. The first four photos in the original post show an investment forum in Hanoi and are unrelated to the content, so they were not used.