@@ -99,6 +99,15 @@ end
```
+## Gotchas
+
+- `System: Reload` via `editor.invokeCommand` is **asynchronous**: it returns before the reload has actually completed. Any verification that must observe the post-reload runtime state should happen in a separate `execute_lua` call a moment later, not immediately after the reload in the same script.
+ ```lua
+ local ok, err = pcall(editor.invokeCommand, "System: Reload")
+ if not ok then return { reload_ok = false, reload_err = tostring(err) } end
+ return { reload_ok = true }
+ ```
+
## Notes
- Always `return` values from lua_script because `print()` output is not captured