{"version":"2.1.318","anchor":"repl-mode-script-launched-agents-live-tool-rows-and-state","canonical_anchor":"repl-mode-script-launched-agents-live-tool-rows-and-state","heading":"REPL script mode: tool-call reporting, display, resume and compaction support","tier":"notice","area":"REPL Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/repl-mode-script-launched-agents-live-tool-rows-and-state","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### REPL script mode: tool-call reporting, display, resume and compaction support\n\nA largely hidden REPL mode, where Claude runs scripts that call tools, gains reporting, display, resume and compaction support across Claude Code\n\n**Unclear.** It is not clear whether REPL mode is something you can switch on yourself or is controlled some other way.\n\n**What**\n\nREPL mode, also called code mode, lets Claude write a script that calls tools, instead of calling them one at a time. A tool call is a single action Claude takes, such as reading a file. Many parts of Claude Code now handle this mode when it is switched on; the switch is a built-in check, so most people will not see it yet.\n\n- If you interrupt or refuse a script, Claude gets a report of every tool call the script started, plus the instruction \"STOP what you are doing and wait for the user to tell you how to proceed.\"\n\n- The transcript shows live REPL tool calls and shell progress. REPL progress rows are no longer collapsed into one, old finished rows are removed, and wrapped tool calls show the script's source in a `ScriptSourceRow`.\n\n- Summaries read `<repl-output>` blocks and show script errors on one line. A running call's hint is shown.\n\n- Tool calls made from inside a script (`repl_tool_call`) now appear in the recent activity of subagents (helper agents Claude starts) and background tasks. Collapsed tool groups can hold a stopped script and show it as interrupted.\n\n- When you resume a session, Claude Code looks for agents that scripts started and reports script runs that were lost. Resumed background-agent notices gain a note about sending messages in code mode.\n\n- Compaction, which shrinks a long conversation to save space, keeps the script's saved variables (`replBindings`) and can note which were kept. A new note warns that earlier variables no longer exist.\n\n- Session logs record a `repl-mode` entry and bug reports include `replMode`.\n\n- An engine check can keep REPL mode off (\"REPL mode's engine check failed\").\n\n- Smaller changes: script helper calls are not treated as missing tools, a stopped wait for a result is withdrawn when its output does not match the expected shape, and some background task kinds skip the \"stopped\" notice.\n\n**Why**\n\nThis is a large new way for Claude to work, built so that interrupting a script, resuming a session or compacting a long one does not leave Claude confused about what ran. Since it is mostly switched off, expect to see it only where it has been turned on.\n\n- Area: REPL Mode\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 4\/5\n- Scope: individual\n- Heads-up: no"}