Add more debug logging to agent interaction