You can stop recording the current session using the stopRecording command.

sessionstack("stopRecording");