Cut Claude Code token use with experimental Code Mode

Chase AI turns on Claude Code's experimental Code Mode, which runs tool calls through a small JavaScript program. Adding a Django feature read 660K tokens instead of 2.3M, and finished 27% faster.

Chase AI · YouTube · published Nov 19, 2026 · Software & DevOps

Cut Claude Code token use with experimental Code Mode — video by Chase AI▶ Watch on YouTube
Prompt
Add the Code Mode experimental setting to my Claude Code settings file so it's active whenever I run Claude Code in the terminal.

Sponsored

Advertise here →

Visual breakdown

Claude Code's experimental Code Mode has the agent write a small JavaScript program that runs tool calls together and hands back only what's needed. In Chase's Django test it read 660K tokens instead of 2.3M and was 27% faster, and all tests still passed.

The problem: Normally Claude runs tool calls one at a time, rereading the whole conversation each round, which fills the context window and costs tokens.

Normal tool calls vs Code Mode

  1. Task with many tool callsFor example ten steps in one job
  2. Normal modeOne call at a time, each result goes into context, whole chat reread each round
  3. Code ModeClaude writes a small JavaScript program that runs the calls simultaneously
  4. Program filtersThe program filters tool output before Claude sees it
    Dropped: Bloat and junk output
  5. Claude gets the essentialsFewer tokens, slower context fill, you can keep chatting meanwhile
InputMechanicsClaudeResult

Benefits he lists

  1. Fewer tokens, the main selling point
  2. Often faster, not always
  3. About 20,000 fewer tokens at the start of a session
  4. Keep talking to Claude during long tool runs

By the numbers

660K vs 2.3Mtokens read, Django feature
71%fewer tokens read
27%faster on that task
48Kcontext at end of search test, 37% smaller

Turn it on

Add one line to the settings file in your .claude folder, or ask Claude to do it.

  1. Add the Code Mode setting shown in the video to your Claude Code settings file
  2. Or give Claude a prompt asking it to add the setting for you
  3. Run Claude Code in the terminal; a warning shows that Code Mode is active
  4. Compare token use on a bigger multi-step task

It is experimental and may change or be removed.

Caveats from the tests

  • Terminal only: it doesn't apply in the Claude Code desktop app
  • Doesn't work with computer use or remote control
  • On a simple README task it was slower (15s vs 11s) but still used fewer tokens
  • Gains are biggest on larger tasks with many tool calls
  • All tests passed with and without Code Mode

Distilled from the video’s captions

How to try it

  1. Open Claude Code.
  2. Copy the prompt and fill in the [placeholders].
  3. Watch Chase AI's video for the full walkthrough and setup.

Related use cases

Share