If you enable warnings/notices on your web server, you will see something like "Notice: Indirect modification of overloaded property".
How to accomplish what you want?
$bag = new \Phalcon\Session\Bag('testest');
$bag->person = ['name' => 'john', 'age' => 25];
// $bag->person['age'] = 30; // Triggers Notice and will not work
$temp = $bag->person;
$temp['age'] = 44;
$bag->person = $temp;
print_r($bag);
[person] => Array (
[name] => john
[age] => 44 )
If you are interested why this happens, you can read few explanations here PHP - Indirect modification of overloaded property