fix: Gate the Actor-not-found recovery hint on the loaded tools (#1302)
Third instance of the #1295 bug (tracked in #1296), this time in the actors family. Review turned up two more, all fixed here. Result text is gated by nothing, and `tools.mode_contract.test.ts` scans `description` only, so none of this was covered. | Site | Names, ungated | Session that hits it | | --- | --- | --- | | `fetch-actor-details` not-found | `search-actors` | `?tools=fetch-actor-details` | | `call-actor` not-found | `search-actors` | `?tools=call-actor` | | `search-actors` footer | `fetch-actor-details` | `?tools=search-actors`, on every success | None of those names are in `AUTO_INJECTED_TOOLS`. The first two need only a typo to reach. All three are gated in place, so a session holding every tool gets byte-identical output. Verified against master, not assumed. `call-actor`'s not-found branch does not reuse `buildCallFailureRecoveryHint`, because its second offer is a detail lookup, which for a nonexistent Actor fails the same way. `fetch-actor-details`'s description also gained the missing "resolve the name first" instruction. Only the `search-actors` half is gated; the rest names no tool and renders everywhere. ## This does not fix the guessing habit `task-chain-hard-1` (#1294's `tasks-evals`): Sonnet 3/3, Haiku ~7/10 before this wording and 5/8 with it. No measurable change. The case is well-formed and the Haiku gap is a capability limit, so further rewording is not the lever. That 5/8 predates the review, which split the sentence, so it does not describe what ships. Re-running is a one-variable comparison: the case loads `tasks` + `actors`, so every gate here is a no-op for it. ## Not fixed here Same bug, unfiled, left out to keep this one thing: - `actor_tools_factory.ts:124`: Actor tool descriptions name `call-actor`, and `?tools=<actor>` serves none. `mode_contract`'s stub description hides it from the sweeping guard. - `call_actor_widget.ts:96`: names `call-actor` in an apps widget-only session. That sentence is the whole recovery path, so it needs replacement wording, not a gate. 1464 unit tests, type-check, lint, format, and `check:agents` clean. Merges cleanly with #1190 and #1294. Written and reviewed with Claude Code. --------- Co-authored-by: Claude <noreply@anthropic.com>
J
Jiří Spilka committed
9876f54780042bb1a34eef9301fc3bb0ab18ce39
Parent: 67a8750
Committed by GitHub <noreply@github.com>
on 8/24/2026, 1:14:00 PM