What REPL mode changes
REPL mode changes the tool surface shown to the model. When enabled, Claude Code can hide several primitive tools and exposeREPLTool instead. The point is not to remove capability, but to wrap those capabilities in a different execution model.
Enablement logic
src/tools/REPLTool/constants.ts shows the exact rules:
CLAUDE_CODE_REPL=0forces it offCLAUDE_REPL_MODE=1forces it on- otherwise it defaults on only for Anthropic internal interactive CLI entrypoints
Hidden primitive tools
TheREPL_ONLY_TOOLS set includes:
- read
- write
- edit
- glob
- grep
- bash
- notebook edit
- agent
Why this exists
The comment inconstants.ts explains the design: REPL mode forces Claude to use REPL for batch operations rather than mixing low-level primitives directly into the normal tool stream.
That is both a prompt-shaping and execution-shaping decision.