SIGN IN SIGN UP

Stop the tool-call repair recursing into itself (#63)

`repairUnansweredToolCalls` took an id source named `newId` defaulting to
`newId()`. Inside the default, `newId` resolves to the parameter, not the
import, so the default calls itself until the stack goes.

It hangs exactly when the function does its job: the parameter is only invoked
on the repair branch, and the one real caller omits the argument. Every test
passed its own ids, which is why no test ran the default and why this survived.

Renamed so it cannot shadow the import, and there is now a test that calls it
the way the real caller does, with the argument left out.

Found by Guido Vizoso. Biome had said so too, as an unused import on line 2,
which I had waved through as a warning.
D
David McKay committed
f8885b6d635c585d8daf47876e8af500de261f0e
Parent: 6c365f4
Committed by GitHub <noreply@github.com> on 8/20/2026, 10:55:37 PM