Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Lenny’s AI Builders

Lenny’s AI Builders artwork

make Claude Code use fewer tokens with one new setting - and when it backfires | LAB 0045

Nov 18, 202614 minAudioEpisode 45
ShareXLinkedInFacebookWhatsAppEmail

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

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Claude is cooked? Google just came for Opus - the same week Anthropic went public | LAB 0047

    Nov 23, 202615 minAudio

    Claude is cooked? Google says Gemini 4 Neon beats Opus 5.5 on most benchmarks, for 25% less: $3 per million tokens in and $15 out, against $4 and $20 for Opus 5.5. so i let Neon build alone for four hours on my own...

    Credit the people on this episode

  2. GPT-6.2 just dropped. here's which one to use - and when the 4x price is worth it | LAB 0046

    Nov 19, 202615 minAudio

    GPT-6.2 just dropped, and Theo called Astra "the worst model OpenAI has ever released" (to be fair, he later posted that one feature made it usable for him). so is it worth it? if you build but don't code, this one's...

    Credit the people on this episode

  3. stop babysitting your AI agents - Claude Code's coordinator does it now, you set 3 rules | LAB 0044

    Nov 15, 202614 minAudio

    if you run AI agents, you know the babysitting. Claude Code's coordinator now does more of it for you, and all you set is three rules. Anthropic says the coordinator in Claude Code projects is now more proactive: it...

    Credit the people on this episode

  4. how to cut your AI bill with $1.50 Gemini 4 Hydrogen - and the jobs i'd never give it | LAB 0043

    Nov 15, 202612 minAudio

    here's how to cut your AI bill with Google's $1.50 model, Gemini 4 Hydrogen. it shipped at $1.50 per million input tokens and $7.50 per million output tokens. Opus 5.5 is $4 and $20. so the token price is about 60%...

    Credit the people on this episode

  5. Grok Bot 1.0 isn't new - here's the one upgrade that actually matters | LAB 0042

    Nov 15, 202613 minAudio

    Grok Bot 1.0 isn't new. the bot has been out since August, and xAI's own page calls 1.0 a major update to its AI teammates. the headline feature, team bots, is for Team and Enterprise plans. so if you're solo, you got a...

    Credit the people on this episode