Not sure if this is of any use, but to properly share the session object, it could be serialized and passed through env and headers:
[CgiHttpKernel Session] --- CGI --> [Child script Session]
|
[serialized env var] |
v
[CgiHttpKernel Session] <-- CGI --- [Child script Session]
[serialized response header]
Not sure if this is of any use, but to properly share the session object, it could be serialized and passed through env and headers: