Lenny’s AI Builders

if you build with Claude Code, here's how to make it use fewer tokens with one new setting, and when it backfires. the setting is Code Mode: Claude writes code that makes several tool calls in one step. turn it on with one environment variable: CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 it's experimental, off by default (v2.1.323 or later) and only runs in the interactive terminal: not claude -p, the Agent SDK, the VS Code panel, the desktop app or cloud sessions. my test (0:13): the same jobs with Code Mode off and on, three pairs of runs on Opus 5.5. tokens dropped 36 to 38% in every pair. the catch: my first run cost 83% more at api prices, because it wrote far more to the one-hour cache, and on Opus 5.5 that write costs 40 times a read ($8 vs $0.20 per million tokens). the other two pairs came out 15% and 17% cheaper. so check your cost, not just your tokens. Anthropic's page never mentions tokens, so the token numbers here are from my own test. when to switch it on: Anthropic says tasks with many related tool calls, like a change that repeats across many files. the practical (10:47): Gabriel Petersson's prompt, "make 10 different increasingly high variance versions and show me, then i can pick the best one". i ran it on the hook of my Threads post with 444K views. number 1 stayed close: "okay, why the hell isn't anyone talking about this?" number 10 went far: "i found out something today and honestly wish i hadn't." try it on designs, landing pages and plans too, then pick your favorite parts of each. also this week: - Qwen4-Max and Hy4 flash (2:45): Hy4 flash is $0.07 in / $0.28 out per million tokens, and Tencent says it's close to Haiku 5.5 in a blind test with 85 of its own users. Qwen4-Max is $1.50 / $4.50, and Alibaba says cost per task drops about 60% on its own test. Haiku 5.5 is $0.10 / $0.50 (the $0.10 is for prompts up to 100,000 tokens), so Qwen4-Max costs more than Haiku. - Anthropic's guide to always-on agents (4:14): an event inbox, timers, memory, permissions and an outbox. the agent sleeps most of the time, your passwords sit in a proxy outside it, and memory only holds what it can't look up again. my version: one rules file it loads every run, plus one progress file per job. - iPhone Duo (6:53): Claude Code on desktop can run your app on an iPhone Duo in the iOS simulator, then fold and unfold it to test each layout. beta, Xcode 27.1 or later. - Hugging Face and OpenRouter (8:07): one token and one endpoint for every open model on the Hub that a provider serves, no markup from Hugging Face, setup guides for Claude Code and Codex, and $2 of credits a month on PRO. - Jensen Huang (9:30): a source told CNBC Nvidia's board is not considering bringing him back, and a petition to reinstate him has 180,000 signatures (per CNBC). after filming, Nvidia reported $115.8B revenue for the quarter, up 103% on a year ago. that was Jensen's quarter. today's sponsor is my software, Threadify: your lead generation agent for Threads, X and YouTube. it tracks your links, so you see which posts actually drive clicks, then you do more of what's working. free 7-day trial, card required: https://www.threadify.app/home?utm_source=podcast&utm_medium=audio&utm_campaign=lab-0045&utm_content=sponsor&video_slug=lab-0045&cta_slot=podcast_description&entry_angle=whats_working to sponsor a future episode, email sponsors@LennysAIBuilders.com links: - Code Mode docs: https://code.claude.com/docs/en/code-mode - Anthropic prices (cache, Haiku 5.5): https://platform.claude.com/docs/en/about-claude/pricing - Hy4 flash (Tencent): https://x.com/i/status/2122217770314301469 - Qwen4-Max (Alibaba): https://www.alibabacloud.com/en/press-room/alibaba-unveils-qwen4-max - always-on agents guide: https://claude.com/resources/articles/building-always-on-agents - iPhone Duo simulator docs: https://code.claude.com/docs/en/desktop-ios-simulator - Hugging Face and OpenRouter: https://huggingface.co/blog/openrouter - CNBC on Jensen Huang: https://www.cnbc.com/2026/11/16/nvidia-ceo-jensen-huang.html - Nvidia's results (SEC): https://www.sec.gov/Archives/edgar/data/0001045810/000104581026000088/q3fy27pr.htm - Gabriel Petersson's prompt: https://x.com/i/status/2122083139971416106 - my Jensen take (LAB 0042): https://youtu.be/JelRGipwZ_Y 0:00 make Claude Code use fewer tokens with one setting 0:13 Code Mode: my test, the catch, when to switch it on 2:10 this is the LAB 2:28 today's thread: the best model wins 2:45 Qwen4-Max and Hy4 flash vs Haiku 5.5 4:14 Anthropic's guide to always-on agents 6:12 today's sponsor: Threadify 6:53 iPhone Duo in the Claude Code simulator 8:07 Hugging Face and OpenRouter: one token for open models 9:30 Jensen Huang: the board, the petition, the earnings 10:47 the practical: 10 high-variance versions 13:26 the best model wins, so test it on your own work watch the full episode: https://youtu.be/863KczMCX6w

What is Lenny’s AI Builders?

less scrolling. more “oh shit, i could use that.”

i’m Lennox. i dig through the AI updates worth your time, then test tools, models and agents on real work. what worked, what broke, and what you can try yourself.

for people making products, content and useful systems with AI. you don’t need to write code to build something worth using. grab the field notes for prompts, steps and the bits to watch out for: https://lennoxsaint.com/lab

this feed also keeps the earlier L E S S O N S episodes from my journey building with AI.