# Continutations: what exactly can be put in there?

**URL:** <https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805>\
**Category:** Making Packs\
**Created:** [February 24, 2024, 11:19pm UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805 "2024-02-24T23:19:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![louca.developer](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/louca.developer/32/22685_2.png) [@louca.developer](https://connect.superhuman.com/u/louca.developer)\
**Post date:** [February 24, 2024, 11:19pm UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/1 "2024-02-24T23:19:03Z")

</div>

I am looking to make use of the continuation functionality of Sync Tables, and understand how data returned gets handled. I want to know whether closures returned as part of the object can be accessed properly at the next invocation (implying the pack runtime is preserved between invocations).

The docs indicate:

> The continuation will be passed verbatim as an input to the subsequent invocation of the sync formula.

I am not sure whether this is sentence should be taken literally to mean the exact same runtime object will be handed over to the next invocation, or just a representation of it (serialized and deserialized).

I suspect the latter, but wanted to confirm before implementing. Also, maybe the docs wording can be adjusted, since the way the object is serialized should be mentioned IMO.

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [February 25, 2024, 12:33am UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/2 "2024-02-25T00:33:52Z")

</div>

@Eric_Koleda to the rescue for the accurate answer. But if I remember correctly myself, we had this conversation on our internal chat, and the consensus was: it’s only safe to put JSON’able stuff in there, such as literal strings, numbers etc, as well as arrays or objects of those but not functions, closures, symbols etc.

That’s logical too. If I understand it right, pack functions run on AWS lambdas. There is no guarantee that the same instance will be handling the subsequent request to your sync formula. Actually it’s probably almost certain that all the context would be lost, since pack invocations are additionally sandboxed with isolated-vm.

Wondering what Eric would say.

---

<div class="post-metadata">

**Author:** ![louca.developer](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/louca.developer/32/22685_2.png) [@louca.developer](https://connect.superhuman.com/u/louca.developer)\
**Post date:** [February 25, 2024, 5:26am UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/3 "2024-02-25T05:26:35Z")

</div>

I see, thanks for the answer.

From the docs I later found in a different guide:

> The continuation must be an object of type `Continuation`, which allows for storing string and number values.

I will confirm empirically what exactly happens to other data types returned, but seems to point towards some form of serialization.

---

<div class="post-metadata">

**Author:** ![Eric\_Koleda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/eric_koleda/32/50286_2.png) [@Eric\_Koleda](https://connect.superhuman.com/u/Eric_Koleda)\
**Post date:** [February 25, 2024, 2:26pm UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/4 "2024-02-25T14:26:18Z")

</div>

That’s correct, we serialize the value to pass between executions, and we only allow strings and numbers. Passing a closure won’t work, unless you can find some way to serialize it to a string that preserves state.

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [February 25, 2024, 5:01pm UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/5 "2024-02-25T17:01:06Z")

</div>

I think I did put plain objects and lists there though… nothing fancier than numbers and strings at the deepest but a little bit more structured IIRC

---

<div class="post-metadata">

**Author:** ![Martin\_Portevin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/martin_portevin/32/26357_2.png) [@Martin\_Portevin](https://connect.superhuman.com/u/Martin_Portevin)\
**Post date:** [February 26, 2024, 7:23pm UTC](https://connect.superhuman.com/t/continutations-what-exactly-can-be-put-in-there/46805/6 "2024-02-26T19:23:15Z")

</div>

I do too and it works.
