### Answer
Based on the function node behavior you're describing, there are several settings that control when transitions happen [(1) ](
) . The
Wait for Result setting is key here - when enabled, the agent will wait for the function to finish executing before attempting to transition to any other node [(2) ](
) .
Here's what controls the timing behavior:
If
wait for result is turned off [(1) ](
) :
- If
speak during execution is turned on, the agent will transition once done talking
- If
speak during execution is turned off, the agent will transition immediately after function gets invoked, which is right upon entering the node
- If the user interrupts the agent, the transition can also happen once user is done speaking
If
wait for result is turned on :
- If
speak during execution is turned on, the agent will transition once function result is ready and agent is done talking
- If
speak during execution is turned off, the agent will transition once function result is ready
- If the user interrupts the agent, the transition can also happen once function result is ready and user is done speaking
The request will timeout in your specified timeout period, or 2 minutes if not specified [(3) ](
) . When request fails, it will be retried up to 2 times .
Check your function node settings to ensure
Wait for Result is configured as intended for your use case [(2) ](
) . If you're still experiencing issues similar to the caching problem mentioned in the Discord thread [(