HOUSSEIN.IA
Free guide · CODE
Claude Code's Code Mode: the lines to copy to activate it and test it
Sent! Open the email I just sent you and click the button to open your guide. Not there within 2 minutes? Check your spam or Promotions tab.
The video's guide: what Code Mode is, the three steps to activate it on Mac and Windows, how to keep it activated or turn it off, the ten-minute test, the real limits, and who it is useful for.
Watch the video
Watch on YouTube →3steps to activate it
2.1.323minimum Claude Code version
≈ 10 minto run the test
offby default
Activate it, test it, decide
- Code Mode in one sentenceNormally, Claude Code does one step at a time (read a file, run a command, search the web), reads the whole result, then decides what to do next: every result lands in its working memory, the context window. With Code Mode, Claude writes a small program instead: the program does the heavy work and comes back with a short note, "done". The heavy stuff no longer goes through Claude's memory. An example: fifty end-of-month invoices to copy into a spreadsheet. Normally, every invoice goes through Claude's memory; with Code Mode, the program takes care of it. And this covers all of its tools: your files, your commands, the web and your connectors. It is a setting that is off by default.
- Before you start: where it worksFor now, Code Mode only works in Claude Code, in your terminal. Not yet in the desktop app, nor in the VS Code panel.
- Step 1: check your versionOpen your terminal and type the line below. You need version 2.1.323 or newer.
claude --version
- If your version is older: updateType this line, then check your version again.
claude update
- Step 2 on Mac: start Claude with this lineIn your terminal, instead of the usual command:
CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 claude
- Step 2 on Windows (PowerShell): two linesOn Windows, the line is a little different. In PowerShell, type the first line, press Enter, then type the second:
$env:CLAUDE_CODE_EXPERIMENTAL_CODE_MODE = "1" claude
- Step 3: confirmThe first time, Claude Code asks you to confirm. Choose "Yes, turn on Code Mode". It restarts, and you see a line at the top saying Code Mode is on: "Code Mode (experimental) is on · this session can be resumed only with Code Mode on".
- Keep it activated every timeAdd this same setting to your Claude settings file, the one that applies to all your projects: ~/.claude/settings.json. If that file already contains other settings, do not erase anything: only add this "env" part.
~/.claude/settings.json
{ "env": { "CLAUDE_CODE_EXPERIMENTAL_CODE_MODE": "1" } } - Turn it offStart Claude the normal way, without the line from step 2.
claude
- See the code Claude wrote: Ctrl + OBy default, you do not see the code, you only see the result. If you are curious, press Ctrl + O: you read exactly what Claude wrote. One more bonus highlighted by the Claude team: it can keep talking to you while a long task is still running in the background.
- The ten-minute test: pick your taskPick a task that touches a lot of files or apps at once: that is where Code Mode is most useful. Here is a good one. Open Claude in your Downloads folder and paste this request:
Go through all the files in this folder, and give me the list of the ones that exist twice.
- First run: normal ClaudeStart Claude the normal way, with the same model and the same effort level as usual. Give it the task. When it is done, type /context to see how full its memory is, then /usage to see what the session cost you. Write both down.
/context /usage
- Second run: Code Mode on, then compareExit, start Claude again with Code Mode on (step 2) and give it exactly the same task. Check /context and /usage again, and compare three things: 1) how much it used, 2) how long it took, 3) whether the answer was just as good. The only number that matters is the one you get on your own work: the official Code Mode guide gives no savings figure at all.
- The real limitsIt is experimental: it can change, or even disappear, with any update. A session started in Code Mode can only be resumed with Code Mode on. Long tasks stop after ten minutes, unless they run in the background. It does not work with Claude in Chrome, computer use, or remote control. You cannot move the session to the desktop app. You need a regular Claude subscription, or a Claude developer account, the pay-as-you-go one: if your company uses Claude through Google Cloud or Microsoft, it will not work.
- The most sensitive point: auto modeIf you let Claude act without asking for your approval at every step (auto mode), its safety check looks at the whole script at once, no longer step by step. So keep your important permission rules in place.
- Who it is useful for, and who can waitTest it this week if you are in the terminal every day and keep hitting your limits, even more so if your work touches a lot of files or connectors at once. You can skip it for now if you mostly use the desktop app, or if your requests are small one-step questions: you are not missing much, and it is still experimental. Either way, do not trust anyone's numbers until you have run it on your own work.
The Machine à shorts
A topic goes in, a finished vertical short comes out (script, edit, captions, cover). In Claude Code or Codex, on your computer.
Discover the Machine à shorts →