Feature #5592: Fix callback runtime issue of AgentManager