{"version":"2.1.318","anchor":"stopped-tool-result-wait-for-async-repl-tools","canonical_anchor":"stopped-tool-result-wait-for-async-repl-tools","heading":"Stopping a tool can keep a result that is already on its way, behind ae()","tier":"internal","area":"REPL Mode","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318\/e\/stopped-tool-result-wait-for-async-repl-tools","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.318","markdown":"### Stopping a tool can keep a result that is already on its way, behind ae()\n\nBehind an unresolved ae() check, interrupting a running tool waits briefly so an arriving result can be kept instead of replaced by an interruption error\n\n**Unclear.** It is not clear whether the feature check behind this is switched on for anyone.\n\n**What**\n\nThe part of Claude Code that runs tools had empty placeholders for what happens when you stop a tool. Now `armStoppedResultWait`, `takeKeptResult` and `stoppedResultWaitOf` have real code, behind a check, `ae()`, whose value was not worked out:\n\n- Stop wait: when you interrupt a running tool whose name matches `B8o`, a timer holds back the stop. A result that arrives before the timer runs out can be kept and saved, taken, or withdrawn. Otherwise the tool is marked as interrupted and `onStopWaitChange` is called. Before, the result was replaced by a made-up `user_interrupted` error.\n\n- Receipt marker: an `asyncReplReceipt` marker is added to the information about why a tool stopped.\n\n- Detached runs: when an async REPL run has a receipt and `turnAbortDetachesEval(e.reason)` is true, the function that gives the reason for an interruption returns nothing.\n\n- Quiet tool calls: one new branch can make a tool call collapsible and quietly absorbed when `Cy()` is true.\n\n- Waiting on scripts: `_V()` returns `scriptAskHolds` or nothing. What calls it was not traced.\n\n**Why**\n\nWhen this is active, pressing Esc during a turn may let a running REPL job keep going, or keep its result, instead of being reported as interrupted. This changes what you get back from a tool after pressing stop.\n\n- Area: REPL Mode\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}