Updated the OperationContext functionality which should now work properly for both http and cli requests.