Best practice for nested tools with agent.asTool() pattern?

I had a case where the model didn’t initialize the tools after switching the language, so I had to reinitialize them manually each time. The model explicitly responded that it was calling a function and passing a value to it, but nothing actually happened. There was no request in the API console, even though the model confidently claimed it was using the tools, knew about them, and could apply them again. But it didn’t. Most likely, the internal runtime was just resetting to a new one, while my code didn’t include reinitialization logic. I added a button — “apply tools” — to manually reinitialize the tools, but I guess it could have been automated somehow.