Can you clarify if your JSVM middleware is a “pre” hook, or “post” hook?
So, for example, if you trying to update existing session in “post” Tyk can just ignore your changes, since it is already loaded the session and keep it in memory. But even in this case, your tags should appear on the second call.
If you try to inspect this token by key id in dashboard, do you see this tags attached to the key?