{"type":"rich","version":"1.0","provider_name":"Transistor","provider_url":"https://transistor.fm","author_name":"Lenny’s AI Builders","title":"make Claude Code use fewer tokens with one new setting - and when it backfires | LAB 0045","html":"<iframe width=\"100%\" height=\"180\" frameborder=\"no\" scrolling=\"no\" seamless src=\"https://share.transistor.fm/e/c6439429\"></iframe>","width":"100%","height":180,"duration":828,"description":"if you build with Claude Code, here's how to make it use fewer tokens with one new setting, and when it backfires.\n\nthe setting is Code Mode: Claude writes code that makes several tool calls in one step. turn it on with one environment variable:\nCLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1\nit'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.\n\nmy 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.\n\nwhen to switch it on: Anthropic says tasks with many related tool calls, like a change that repeats across many files.\n\nthe 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.\n\nalso this week:\n- 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.\n- Anthropic's guide to always-on agents (4:14): an event inbox, timers,...","thumbnail_url":"https://img.transistorcdn.com/P0B9fKUWl01KOkVXqQcDv5YBEKR1sflq-Hk71z-fa_U/rs:fill:0:0:1/w:400/h:400/q:60/mb:500000/aHR0cHM6Ly9pbWct/dXBsb2FkLXByb2R1/Y3Rpb24udHJhbnNp/c3Rvci5mbS84MzAx/ZGNmYzY1MmEwNjBk/NzUzN2NmODM3ZWUx/YzMzZi5wbmc.webp","thumbnail_width":300,"thumbnail_height":300}