Claude Code's Code Mode cuts 16 tools down to three
Claude Code Mode Internals

Muthukumaran Navaneethakrishnan inspected the API requests Claude Code makes and found that normal mode sends 16 tool entries, while Code Mode sends just three: REPL, Poll, and advisor. The REPL carries built-in tool signatures, and a searchTools method pulls in the rest. He then built CLI CodeMode, a library that lets a CLI accept one composed JavaScript program instead of one process per command. In his tests, a ctx-optimize query dropped from 28,273 bytes across seven processes to 169 bytes in a single process.
Code Mode removes the trips to the model. It does not remove the process, the parsing and the raw output of every command. That cost sits in the CLI, so the CLI is where to fix it.