Flush agent state where in a non rpc threads.