Claude Code Code Mode: Does It Actually Save Tokens?
Long-form8:05Science & TechnologyPublished Dec 1, 2026, 5:00 AM · 1d ago
Views
1,094
+0 views/hour
Views / hour now
0
measured 17m ago
Peak views / hour
133
21h ago
First 24 hours
—
not tracked from upload
Engagement
0.8%
likes + comments / views
Likes
7
0.6% of views
Comments
2
0.18% of views
Est. ad revenue
$8–$18
lifetime, $7–16 RPM
Checked every 30 min while the video is this age · last check 17m ago · next in 12 min. YouTube itself updates public counts with a short delay.
Avg views / day
796
since upload
vs channel median
1.1×
this video's views ÷ the channel's usual
Rank in channel
#124
of 160 tracked
Views over time
37 readings
Total views Views gained per hour
Description
Claude Code Code Mode tested on my own repo: does Code Mode save tokens, or cost you more? 18 fresh Claude Code sessions with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE on and off, three jobs from the docs' own list, Opus 5.5. How to turn it on, what changes in auto mode permissions, and the job where it backfired.
----
🚀 DYNAMOUS AI COMMUNITY
Want to learn agentic coding with live daily events and workshops?
Check out Dynamous AI: https://dynamous.ai/?code=646a60
Get 10% off here 👉 https://shorturl.smartcode.diy/dynamous_ai_10_percent_discount
❤️ SUPPORT THE CHANNEL
Patreon: https://www.patreon.com/cw/DIYSmartCode
Higgsfield AI — Create AI Videos & Visuals
Get 10% OFF here: https://higgsfield.ai?fpr=thomas-dccf7e
⚡ HOSTINGER — RELIABLE HOSTING FOR YOUR PROJECTS (10% OFF)
Whether you're shipping a portfolio, a side project, n8n flows, or AI agents — I use Hostinger for fast, affordable VPS + web hosting.
Get 10% off here 👉 https://hostinger.com/DIYSMARTCODE
n8n: https://n8n.partnerlinks.io/diysmartcode
(Affiliate links — costs you nothing, supports the channel.)
----
Chapters
0:00 Claude Code Code Mode: Saves Tokens or Costs More?
0:41 What Code Mode Changes: One JavaScript Program (REPL Tool)
1:15 Why Code Mode Could Save Tokens: Parallel, Chain, Filter
1:50 How to Turn Code Mode On and Off (CLAUDE_CODE_EXPERIMENTAL_CODE_MODE)
3:06 My Test: 18 Sessions, Link Check -64% Tokens
4:10 Version Check -56%, and the Rename That Cost More (CRLF)
4:49 Why: 16 Tools Shrink to 3, Cached Tokens at 1/20 on Opus 5.5
5:19 Windows Warning: Git Bash and Hundreds of Commands
6:08 Auto Mode Permissions: Each Script Checked Once
7:10 Code Mode Limits: Experimental, Resume, 10-Minute Wait
7:35 Verdict: When to Use Claude Code Code Mode
Turn it on (from the Code Mode docs, Claude Code 2.1.323 or newer, terminal sessions only):
macOS, Linux, WSL: CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude
Windows PowerShell: $env:CLAUDE_CODE_EXPERIMENTAL_CODE_MODE = "1" then claude
Always on, in ~/.claude/settings.json: {"env": {"CLAUDE_CODE_EXPERIMENTAL_CODE_MODE": "1"}}
A project's settings file can't switch it on.
Turn it off: remove the variable or set it to 0. A 0 anywhere wins; in managed settings it blocks the whole organization.
The docs' ask rule for git push in auto mode: "ask": ["Bash(git push *)"]
What you will see in this 8-minute breakdown:
→ what Code Mode changes: Claude writes one JavaScript program (the REPL tool) instead of calling its tools one at a time; Ctrl+O shows the collapsed Code row
→ why it could save tokens: parallel commands, one result passed into the next call, output filtered before Claude sees it; Anthropic's engineering post cut 150,000 tokens to 2,000 in an MCP example (not Claude Code); the Code Mode docs give no savings number
→ how to turn it on and off: terminal only (no VS Code panel, desktop app or cloud sessions); the first-run dialog names the permission change; Bedrock, Google Cloud's Agent Platform and Microsoft Foundry work since 2.1.331
→ my test: 336 Markdown files, a clean config, no plugins or MCP servers, each job three times per mode; the link check used 64% fewer tokens but was not faster (49 s against 46 s), the version check used 56% fewer
→ the rename that cost more: two of three Code Mode runs rewrote files from JavaScript and turned CRLF line endings into LF; Git showed 9,858 changed lines for an 81-line rename and auto mode blocked the git checkout; with Code Mode off, one perl command did it
→ why: 16 tools shrink to 3, so every request starts about a third lighter, but cached input costs a twentieth on Opus 5.5; by price the link check saved 21% and the rename cost 31% more
→ Windows: Claude Code runs shell commands through Git Bash; on my PC one link check fanned out about 100 commands, no answer after 19 minutes (one slow PC, not a benchmark)
→ auto mode permissions: the safety check reviews each script once, not the calls inside it; deny and ask rules still apply under Bash; the sandbox covers shell commands only; an ask rule for REPL lets you approve each script
→ limits: experimental, sessions resume only with Code Mode on, a 10-minute limit on scripts you wait for, Remote Control, Claude in Chrome and computer use are off
My own test: Claude Code 2.1.332 on WSL, Opus 5.5, medians of three runs per job and mode, prices weighted at Opus 5.5 rates (cache reads 0.05x).
Claude Code docs, Code Mode: https://code.claude.com/docs/en/code-mode
Claude Code settings (env, permissions): https://code.claude.com/docs/en/settings
Claude Code changelog: https://code.claude.com/docs/en/changelog
Anthropic engineering, code execution with MCP: https://www.anthropic.com/research/code-execution-with-mcp
Claude API pricing (cache reads): https://platform.claude.com/docs/en/about-claude/pricing
So, would you let Claude run whole scripts in auto mode, or make it ask before every one?
#ClaudeCode #CodeMode #Anthropic #AICoding
Tags
AI CodingAnthropicClaude CodeCode Mode
Details
- Published
- Dec 1, 2026, 5:00 AM
- Length
- 8:05 (485 s)
- Format
- Long-form
- Category
- Science & Technology
- Audio language
- DE
- Quality
- HD
- Captions
- Yes
- Made for kids
- No
- Licensed content
- Yes
- Video ID
- ra0TUzEtWDY
More from DIY Smart Code
RSA-2048 Cracked by AI? What's Real and What to Do21 views · 1h ago · +13/h
RSA-2048 Cracked by AI? Nobody Can Show It148 views · 2h ago · +126/h
OpenAI Shirudo: Shield a Server You Can't Patch or Restart1.3K views · 15h ago · +113/h
Claude Code Code Mode: Does It Save Tokens?1.4K views · 1d ago · +34/h
Harvard AI Study: Everyone Quoted the Old Draft1.2K views · 1d ago
The Real Bottleneck in AI Coding (It’s Not the AI)1.1K views · 2d ago
Claude Code Saves Passwords to a File: Check Yours1.3K views · 2d ago · +1/h
Claude Code Security: Is Your Settings File the Way In?681 views · 2d ago · +2/h
Statistics from the YouTube Data API, tracked by FameX. Views per hour, revenue and comparisons are FameX estimates.