Sugar limits keep public creations fast, predictable, and safe. The editor stays lightweight while you type. JOI compiles and checks the complete program in Sandbox Mode or when the creation actually runs.
Authoring limits
| Resource | Limit |
|---|---|
| Variables on an Item, Item action, or Boop | 50 |
Options on a choice variable | 50 |
| Variable or media name | 32 characters |
| String variable value | 2,000 characters |
| Read-only expression | 2,000 characters |
| Program | 16,000 characters |
| Functions per Item, Boop, or App | 50 |
| Mixins per App | 50 |
| Parameters per function, mixin, or embed | 20 |
| Sugar text pool | 50 entries |
| Media Pools per App, Item, or Boop | 50 |
| Candidates per Media Pool | 50 |
| Item custom actions | 10 |
| Item action description | 80 characters |
| App Main module | 172,000 characters |
| Boop Code module | 212,000 characters |
| Item Code module | 252,000 characters |
| App Automations module | 45,000 characters |
| Media Library | 100 resources |
| Local Embed Templates | 50 |
| Session declarations per App | 20 |
| Interaction declarations per module | 50 |
| Interactive components per message | 5 |
Program limits
| Behavior | Limit |
|---|---|
Instructions across a program and its if and match branches | 100 |
| Creator function calls during one run | 100 |
| Operations during one run | 1,000 |
| Generated output | 16,000 characters |
| Custom chips per use | 20 |
| Custom chip text | 80 characters |
| Displayed embeds per use | 3 |
| Dice calls per program | 10 |
| Dice rolled across one program | 50 |
A single dice expression may roll up to 10 dice using d2, d4, d6, d8, d10, d12, or d20. Dice modifiers may not exceed 1000 in magnitude.
Creator functions cannot use direct or indirect recursion.
Collection limits
| Behavior | Limit |
|---|---|
| Collection nesting | 5 levels |
| Entries in one list | 100 |
| Properties in one object | 100 |
| Values in one range | 100 |
| Serialized collection value | 16,000 characters |
Collections may contain text, numbers, booleans, None, lists, and objects.
Embed limits
| Resource | Limit |
|---|---|
| Saved templates per App, Item, or Boop | 50 |
| Highlighted embeds per Item | 2 |
| Compiled template program | 16,000 characters |
| Fields per embed | 10 |
| Title | 256 characters |
| Description | 2,000 characters |
| Footer | 256 characters |
| Field title | 256 characters |
| Field text | 1,000 characters |
Banner, thumbnail, and field icon media must resolve to named images, not videos or arbitrary URLs.
Chip limits
| Resource | Limit |
|---|---|
| Named chips per module or action | 50 |
| Highlighted chips per Item | 8 |
| Chips shown by one program | 20 |
| Chip text | 80 characters |
App limits
| Resource | Limit |
|---|---|
| Apps per account | 3 |
| Variables per App | 50 |
| Named media entries per App | 100 |
| Embed Templates per App | 50 |
| Automations per App | 10 |
| App or Automation name | 80 characters |
| Automation program | 16,000 characters |
| Manual Automation cooldown | 5 minutes |
| Seats per Session | 6 |
| Current Sessions per JOI | 3 |
A chat and a host Item can each belong to one current Session. A lobby expires after one hour if it never starts. An active Session expires after 24 hours without activity. Standalone message interactions expire after one hour; interactions belonging to a Session live with that Session.
Apps require account Plus.
Libraries produced while migrating older per-action media keep every resource even when the combined result exceeds the normal Media Library limit. New uploads remain unavailable until the library is brought below that limit.
Common errors
Unknown variable
Check spelling and capitalization. Add $ for App variables.
Cannot be assigned
This type of code cannot change the variable. Common examples are const declarations, Item objects, and App variables outside the Automation’s selected scope.
Unexpected statement
Check for a missing semicolon, unmatched { }, or an if, else if, or else branch without braces. Value-producing conditionals still require both then and else.
Expected a list
A one-entry list needs a trailing comma:
({ title: "Score", text: score },)
Media does not exist
Check the exact name and confirm that the media is available to the Item, Boop, or linked App. Embed image properties require an image, not a video.
Function cannot be used here
Conditions and templates cannot change outside variables. Automations cannot add message content or use functions that require confirmation.
Item changed before use
The inventory or Item changed while the confirmation screen was open. Run the action again so JOI can use the latest values.
Not enough Lore
The available balance cannot cover every requested payment. Sugar includes earlier charges and transfers from the same program when checking the balance.