Errors
DEFER_CAPABILITY_MISSING
The active scope or host cannot honor this defer() operation.
What failed
Crux found an execution scope or binding, but the host cannot honor the requested operation.
Common cases:
- Inline
defer(callback)on a Convex or Lambda named-only host - Next
after()or VercelwaitUntil()is unavailable - A Workers binding has no request
ctx - A strict wrapper attempts named work without durable finalization
Why
Crux refuses to accept work the host cannot retain or finalize. A retention-port failure propagates after deterministic scope sealing; callback execution failures after successful acceptance remain contained.
Fix
- Inline unsupported: use
await defer(target, input)with Runtime, or choose a host with a real retention port. - Next/Vercel port missing: install the supported platform package and configure its binding.
- Workers context missing: use
@use-crux/cloudflarewithCrux, or passworkers({ ctx })to a per-request boundary. - Strict named finalization missing: use a binding advertising
durableFinalization: truewith a configured Runtime.
Config-only named calls use the caller's await as their acceptance barrier;
they do not provide strict handler outcome or response commit semantics.
See Host support and Troubleshooting.