CodeIgniter saves session data in cookies. If session data has any special character which unsets the cookie, the session is also destroyed.
It also creates few more problem of size limit. Cookie can save a limited size of data depending upon the browser. If you try to store more data in a CodeIgniter session, and as CodeIgniter tries to save it in cookie, it may not save more than that limit.
Also as the cookie is sent over the network, it unnecessarily adds traffic on network. All session data should not be saved in cookie.
It's better to use a native session library. It uses PHP's native session.
https://github.com/EllisLab/CodeIgniter/wiki/Native-session
or
https://github.com/EllisLab/CodeIgniter/wiki/PHPSession
You can compare both.
Please refer the CodeIgniter session documentation for how CodeIgniter stores session data.
https://www.codeigniter.com/user_guide/libraries/sessions.html