In SuccessProcessTreeResult when the session is create this session is used to be return to as the response. However this is problematic as if one write Session tree hooks to change the Session properties, the generate session will not have the new Session hook data. This is especially true for StatelessSession.
It may be good to reorder session hook execution to consider the hooks and using the resulting session after all these hooks are run.
It makes it impossible to write PAP equivalent style to add alter existing system level Session properties like FullLoginURL or injecting new properties thru session hooks.