IMHO What you are proposing could (possibly) be misinterpreted as cloaking and if detected may have the opposite effect to the one you desire. However since the session IDs are generated by your scripts I think that you should be OK.
To be on the safe side, particularly if you decide to use a solution outside of your scripts, check what headers the server will be sending back to robots, ideally you want 200 OK.