{"version":"2.1.318","anchor":"code-field-javascript-repair-for-tool-inputs","canonical_anchor":"code-field-javascript-repair-for-tool-inputs","heading":"JavaScript code sent to tools can be repaired before it runs","tier":"internal","area":"Code Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/code-field-javascript-repair-for-tool-inputs","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### JavaScript code sent to tools can be repaired before it runs\n\nWhen certain internal checks pass, JavaScript in a tool's code field is repaired before the input is used and checked\n\n**Unclear.** It is not clear what the two checks test, so it is unknown whether any user gets this.\n\n**What**\n\nWhen a tool's input includes a piece of code, Claude Code can repair that JavaScript before it uses the input and when it checks the input is consistent. This only happens when two internal checks pass. This repair step is changed from the previous build.\n\n**Why**\n\nThis is likely tied to tools that run code in a REPL, an environment where code runs one piece at a time.\n\n- Area: Code Mode\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}