Claude Code Adds Experimental Code Mode to Orchestrate Tool Calls with JavaScript
Having the model write JavaScript to orchestrate its own tool calls does save context: one community test over eight runs reported context 20-25% smaller, and 37% fewer tokens with 19% lower cost on a bigger task. The part worth reading twice is the permission model — in auto mode the classifier reviews the whole script up front and can’t see values computed at run time, so your PreToolUse hooks need to handle compound commands.