-
My goal:Restore the draft Preview environment for our production Apps Builder application without publishing the currently untested draft.
-
Issue:Our production application works normally, but the draft Preview no longer starts. It remains stuck at “Reconnecting to preview / Almost there…”.
We traced the failure to Retool’s BackendAgent sandbox provisioning request:
/api/ai/retool-next-agent/start
which repeatedly fails with an HttpError. The sandbox health check then reports the sandbox as dead, and automatic recovery eventually reaches the maximum retry count. As a result, no new Vite/app Preview runtime starts.
Organization: clavislogistic
Apps Builder app:
clavislogistic--containers-inventory-explorer.retool.app
Production runtime observed: 4.71.0-f8dde02, build 395128.
Production continues to work normally and has not been changed.
-
Steps I've taken to troubleshoot:
-Reloaded the Retool editor
-
-Used the supported Reconnect flow
-
Retried Preview startup multiple times
-
Verified that the relevant draft source is saved and statically validates without a new file-specific TypeScript/build error
-
Confirmed that production remains operational
-
Investigated the documented Retool CLI path, but no CLI is currently installed and the app has no linked local checkout
-
We deliberately did not publish the untested draft, push a new build, call undocumented internal endpoints, or perform an unsupported sandbox reset
Could you please investigate whether the Preview/BackendAgent sandbox for this application is stuck and advise how it can be safely re-provisioned or reset?
- Additional info: (Cloud or Self-hosted, Screenshots): Retool Cloud / Apps Builder.
I can provide screenshots or additional diagnostic information if required.
Summary
On Retool Cloud using the new App Builder, the draft Preview for a production React app is stuck at 'Reconnecting to preview / Almost there…' because the BackendAgent sandbox provisioning call (/api/ai/retool-next-agent/start) repeatedly fails with an HttpError and the sandbox is reported dead after max retries, while the published production app continues to work; the goal is to safely re-provision the Preview sandbox without publishing the untested draft.
AI Response
This symptom matches a known pattern in the new App Builder where the in-editor/authoring sandbox fails to provision or start while the published app keeps running normally, and recovery has required a Retool-side fix rather than any self-service or unsupported sandbox reset. In reported cases the cause has been server-side — in one instance Retool rolled back a code change that was breaking generation-worker startup, and in another it was a context-window limit breaking the app's websocket connection to its sandbox, fixed per-app with unpublished work left intact. Both resolutions preserved draft work, so avoiding a 'Reset branch' is appropriate here since on Retool-managed git that resets to a baseline snapshot rather than merging changes. As a first step, try reopening the app in a fresh editor thread/tab to confirm an older thread isn't pinned to a stale sandbox state and re-triggering the failure. Because these sandbox fixes have been app-specific, this scenario warrants a dedicated report so the specific sandbox can be inspected and re-provisioned.
Sources
My original Retool React App Builder app is frozen at “Starting preview server”
A solved new App Builder report with the same 'frozen at Starting preview server' sandbox symptom; resolved by a Retool-side fix for a sandbox websocket/context-window issue with unpublished draft work preserved.
Production React app authoring agent silently fails to start
A solved report where the production React app's authoring/generation sandbox silently failed to start while the published app kept working; resolved server-side when Retool stopped rolling out the breaking code change.
The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a
,
, or
. Or by marking this post as the "Solution"! Let us know if you have any feedback here. 