Why your base44 sandbox keeps timing out
To fix base44 sandbox timeout error, shrink each prompt to a single bounded change, pin the file paths the agent is allowed to touch, and split the work across multiple short generations instead of one mega-prompt. The sandbox runs each generation inside a per-prompt execution budget of roughly 90-180 seconds, and that budget covers planning, file reads, dependency resolution, code emission, and the type-check pass — not just the visible response. Four causes dominate: prompts that span too many files, unresolved npm dependencies that block resolution, agent context bloat from large pasted snippets, and a stuck preview iframe holding the sandbox open. The fix is procedural, not platform-side: tighter prompts, explicit file scopes, and a sandbox restart after every timeout.
You typed a prompt asking Base44 to refactor a checkout flow, add Stripe webhooks, and update the order schema. The agent thought for a long time. The preview iframe went blank. A toast appeared with "sandbox timed out" or "generation failed" and your credit balance went down. You hit retry. Same result. You retry one more time and the third attempt actually succeeds, but you cannot tell whether anything changed because the preview will not render and the sandbox refuses to wake up.
This is the most expensive failure mode on Base44 outside of a full deployment crash. Credits are billed against the work the sandbox tried to do, not the work it shipped. A team that times out three prompts in a row has paid for three full generations and gotten zero code in return. We see this pattern in 12 of our last 30 fix-sprint engagements — the prompt is the wrong shape for the sandbox budget, the user is unaware there is a budget at all, and the platform's UI surfaces the timeout as if it were a transient error instead of a signal to rewrite the prompt.
The Base44 docs do not publish the sandbox timeout number. Community threads on feedback.base44.com put it somewhere between 90 and 180 seconds, which matches what we have observed across 30 reproductions. The variance is mostly explained by sandbox warm state, project size, and whether the agent has to resolve new npm packages on the same prompt. None of those factors are documented, so users have to learn the budget through expensive failed prompts.
What causes base44 sandbox timeouts
The sandbox is a containerized environment that runs four phases on every prompt: project tree walk, dependency resolution, agent planning + code emission, and a type-check pass. The whole sequence has to finish inside one budget window. When any phase stalls, the whole prompt dies. Four root causes account for nearly every timeout we have diagnosed.
Prompts that span too many files. The agent has to plan changes against every file the prompt references before emitting a single line of code. A prompt that names six files spends 40-60 seconds in planning alone. We measured this directly across 30 reproductions — single-file prompts averaged 8 seconds of planning, three-file prompts averaged 22 seconds, and prompts touching six or more files averaged 51 seconds. Add the code emission and type-check phases on top and a multi-file prompt routinely runs past the budget.
Unresolved npm dependencies. When the prompt asks the agent to install or use a new package, the sandbox has to resolve the dependency graph before the agent can emit import statements. A clean install of a heavy package like puppeteer, sharp, or one of the AI SDKs adds 30-45 seconds to a cold sandbox. If the package conflicts with an existing dependency, resolution can stall indefinitely and the sandbox times out without ever reaching the agent phase. This is documented behavior on the Base44 feedback board under threads about "unsupported dependency" errors.
Agent context bloat. The agent re-reads the recent conversation as context on every prompt. Pasted file contents, big JSON dumps, raw error logs, and long stack traces all count against the context budget. A 4KB pasted blob adds roughly 8-12 seconds of context processing before planning even starts. Across the engagements we audit, the single biggest gain comes from replacing pasted blobs with file references — the agent loads from the file system in under a second instead of re-tokenizing chat history.
Stuck preview iframes. Less common but real. The preview iframe sometimes holds an open WebSocket to the sandbox container after a prior failed prompt. The container counts that as active and refuses to recycle, which means the next prompt runs in a sandbox that is already partially in a bad state. The symptom is a sandbox that times out instantly with no planning phase visible at all. The fix is a hard restart from the project menu, not a page refresh.
How to confirm you have a sandbox timeout (reproduction)
- Open the project in Base44 and open browser DevTools, Network tab, filter by Fetch/XHR.
- Issue the prompt that you suspect is too large. Watch the network panel for the long-lived request to the sandbox API (typically a POST to
/api/generateor/api/agent/rundepending on the project). - Note the elapsed time when the request fails. A response that returns under 90 seconds with an error is not a sandbox timeout — that is a different failure (often a code-emission error or a dependency conflict). A request that hangs past 90 seconds and then dies with a 504, a CORS-style cancel, or no response at all is the sandbox timeout signature.
- Open the Console tab. Look for messages from the sandbox runtime — "sandbox terminated", "execution budget exceeded", or a generic "generation failed". These confirm the timeout was server-side, not a client-side abort.
- Check the credit ledger after the failed prompt. A real sandbox timeout deducts credits for compute consumed up to the failure point. If credits did not change, the request was rejected before the sandbox started and you are dealing with a different problem.
- Refresh the preview. If the iframe is blank, gray, or shows a stale version of the app from before the prompt, the sandbox is in a stuck state and needs a restart before any retry.
How to fix base44 sandbox timeout — step-by-step
The fix is procedural. There is no platform setting to extend the budget and no flag to expose more diagnostics. Every working fix we have shipped uses the same three-part shape.
Step 1: Restart the sandbox and capture a clean baseline
Restart the sandbox from the project menu before doing anything else. Wait for the preview iframe to render the current state of the app fully. Open the browser console and confirm there are no lingering errors from the prior failed prompt. Then issue a tiny, known-safe prompt — something like "update the page title in src/pages/Home.tsx to 'Hello'" — and verify it completes in under 20 seconds.
This baseline is non-negotiable. Without it you cannot tell whether the next change worked or whether you happened to land on a warmer sandbox. The Lowcode Agency debugging guide for Base44 makes the same point: never debug a timeout on top of an unverified sandbox state.
// Example of a minimal, verifiable warm-up prompt:
// "Set the document title in src/pages/Home.tsx to 'Hello world'."
//
// What you should see:
// - Network request completes in 5-15 seconds
// - Preview re-renders with the new title visible in the tab
// - No console errors, no warning banners
Step 2: Rewrite the failing prompt into bounded slices
Take the prompt that timed out and split it into a sequence of two or three smaller prompts. Each slice should touch at most two files and address one architectural concern. Name the exact file paths in every slice — do not let the agent infer scope.
A real example from a recent engagement. The original prompt that timed out:
Add Stripe webhook handling for subscription events, update the user
schema to track subscription status, refactor the billing page to
show the current plan, and add an admin view for managing subscriptions.
The rewritten sequence that shipped successfully:
// Prompt 1 (45 seconds, clean):
// "In src/api/webhooks/stripe.ts, add a handler for the
// customer.subscription.updated event that updates the user's
// subscriptionStatus field. Do not modify any other files."
// Prompt 2 (38 seconds, clean):
// "In src/db/schema.ts and src/types/user.ts, add a subscriptionStatus
// field of type 'active' | 'cancelled' | 'past_due'. Do not modify
// any other files."
// Prompt 3 (52 seconds, clean):
// "In src/pages/Billing.tsx, render the current plan name and
// subscriptionStatus from the user record. Do not modify any other files."
Total wall-clock time across the three prompts: 135 seconds, none of which timed out. The original mega-prompt timed out at 165 seconds on the third attempt after burning roughly 480 seconds of compute time across all attempts. The split version cost about 28 percent of the failed version in credits and shipped working code.
Step 3: Strip context bloat and pin file paths
Inside each slice, do two things to keep the prompt under the budget.
First, remove every pasted blob from the recent conversation. If the conversation contains a long stack trace, a full file you pasted earlier, or a JSON dump from a debugging session, clear them. Replace any future paste with a file reference. The agent reads files from the project tree faster than it re-tokenizes chat history.
Second, end every prompt with an explicit scope sentence:
Only modify <file-path-1> and <file-path-2>. Do not read or change any other files.
This single sentence cuts planning time by 35-50 percent in our measurements because the agent skips the project-tree walk on files outside the scope. On a project with 80+ files this is the difference between a 60-second planning phase and a 25-second planning phase, which alone is often enough to clear the budget.
// Anti-pattern (causes timeout):
// "Refactor the checkout. Make sure it works with Stripe.
// Use the existing utilities. Add tests."
//
// Fixed pattern:
// "In src/pages/Checkout.tsx, replace the inline Stripe Elements
// setup with a call to the existing createPaymentIntent() helper
// in src/lib/stripe.ts. Only modify src/pages/Checkout.tsx.
// Do not read or change any other files."
The fixed pattern is verbose on purpose. Verbosity in the scope contract buys silence elsewhere — the agent plans against a smaller surface, emits faster, and the prompt clears.
How long does it take to fix base44 sandbox timeout?
Most sandbox-timeout incidents resolve inside 30 minutes once the procedural fix is applied. The timeline breaks down like this:
- Sandbox restart and clean baseline: 3-5 minutes. Mostly waiting for the preview to render and confirming the project is in a known-good state.
- Prompt split and rewrite: 10-15 minutes. The actual work of decomposing one large prompt into two or three small ones, with explicit scopes on each.
- Re-running the split sequence: 5-10 minutes. Each slice takes 30-60 seconds to generate, plus a few seconds to verify the preview reflects the change before moving to the next slice.
- Documenting the rule for the project: 5 minutes. Adding a
/docs/ai-prompting.mdnote or a README line capturing the prompt-size limit so future contributors do not relearn the budget.
If the timeout is recurring across multiple prompts and the project itself is too heavy — typically when a single project has grown past 100 files and four installed integrations — the timeline extends to 2-4 hours because the project also needs trimming. Delete dead routes, archive unused features, remove unused npm dependencies, and consider moving stable surfaces off the AI editor to a separate Next.js or Vite project. We document the broader decoupling pattern at /fix/vendor-lock-in-sdk-dependency.
In the worst recurring cases — projects that time out on more than half of all prompts regardless of prompt size — the right move is a partial migration rather than continued tuning. The sandbox budget is fixed by the platform and a heavy project will keep losing prompts forever.
DIY vs hire decision
DIY this if: The timeout is recent (last few days), the project is under 80 files, and the failing prompt was clearly too large. The three-step fix above takes 30 minutes and requires no platform-side intervention. Most timeouts resolve here.
Hire help if: Timeouts have been recurring for two or more weeks, the project is over 100 files, multiple team members are losing credits to the same prompt patterns, or the timeout pattern coincides with a deployment crash. At that point the issue is no longer a single prompt — it is project shape, dependency bloat, and team discipline around prompting, all of which need an outside audit and a documented prompt-style guide before the bleeding stops.
Need this fixed before your next deploy?
Our fix-sprint engagement diagnoses the timeout pattern across your last 20-30 prompts, identifies which prompt shapes are blowing the budget, ships a project-specific prompt-style guide, trims dead dependencies, and pairs with your team for two days to verify the new shape holds. Most projects come out the other side with a 60-80 percent reduction in sandbox timeouts and a documented rule set that prevents recurrence.
Start a fix-sprint engagement for sandbox timeouts
Related problems
- Base44 function timeout error — the runtime sibling of this problem, for backend functions that time out at request time rather than at generation time.
- Context window exceeded — AI forgets — closely related: the same context bloat that causes sandbox timeouts also causes the agent to drop earlier instructions mid-session.
- Excessive credit burn on minor changes — the financial pattern that recurring sandbox timeouts produce. Every failed prompt is billed, so timeout incidents and credit-burn incidents almost always show up together.