{"version":"2.1.334","anchor":"repl-rejects-function-declarations-inside-blocks-that-contai","canonical_anchor":"repl-rejects-function-declarations-inside-blocks-that-contai","heading":"The REPL tool refuses code that declares a function in a block that calls eval","tier":"notice","area":"REPL","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/repl-rejects-function-declarations-inside-blocks-that-contai","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### The REPL tool refuses code that declares a function in a block that calls eval\n\nThe REPL tool now rejects code that declares a function inside a block that also calls eval, and explains how to fix it\n\n**What**\n\nThe REPL tool is where Claude runs code step by step. It now checks code before running it. If a function is declared inside a block of code that also calls `eval` (a command that runs a piece of text as code), the tool stops with an error.\n\nThe error names the function and ends: \"REPL can't run eval. Remove the call, or declare the function outside the block.\"\n\n**Why**\n\nCode that used to be sent to the REPL tool may now be turned down before it runs. The message says what to change: remove the `eval` call, or move the function outside that block.\n\n- Area: REPL\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}