Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.108 Home All releases olderv2.1.107 v2.1.109newer
Claude Code v2.1.108

JavaScript REPL Tool

What

A new built-in tool that lets Claude execute JavaScript code in a persistent VM context with programmatic access to Claude Code tools (Read, Write, Edit, Glob, Grep, Bash).

Usage: Claude can now run JavaScript directly to perform file operations, chain tool calls, and compute results. Variables persist across multiple REPL invocations within the same conversation.

Details
  • Supports top-level await for async operations
  • State persists across calls — variables defined in one REPL call remain accessible in subsequent calls
  • Provides registerTool(), unregisterTool(), listTools(), and getTool() for dynamic tool management
  • Includes a haiku(prompt, schema?) function for lightweight model sampling
  • Includes shQuote(s) for safe shell string quoting
  • import/require are not available (VM context is sealed); use the built-in tool functions for file and shell operations
  • REPL VM state is cleared on /compact — a notification informs you: "Your REPL VM state has been cleared as part of this compaction"
  • Includes a replay mechanism for validating REPL execution determinism across compaction boundaries
Evidence

REPL tool registration with "Execute JavaScript code with access to Claude Code tools" description (search for "Execute JavaScript")

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.108 →