# Timeouts and failures

Understand hosted execution limits and how extension failures affect a run.

Hosted extension work is bounded so customer code cannot hold the trusted model loop indefinitely.

## Default limits

| Operation                               | Timeout    |
| --------------------------------------- | ---------- |
| Built-in bash and custom tool execution | 10 minutes |
| Lifecycle hook execution                | 10 seconds |
| Extension host readiness                | 10 seconds |

These are platform limits, not expected durations. Tools and hooks should normally complete much faster.

## Failure behavior

A thrown error, timeout, malformed result, unavailable model/tool selection, or extension-host failure rejects the active operation. Salambo records bounded lifecycle and diagnostic evidence; it does not silently pretend the hook or tool succeeded.

## Write safe failures

```js
if (!record) {
  throw new Error('Customer record was not found.');
}
```

Do not include:

* provider or Salambo credentials;
* raw authorization headers;
* complete webhook payloads;
* unbounded customer content;
* internal filesystem contents outside the intended error context.

## Diagnose a failure

1. Open the run's Activity view and locate the failed extension stage.
2. Open Diagnostics for the sanitized technical event.
3. Confirm the pinned deployment and extension entrypoint.
4. Reproduce pure logic locally.
5. Redeploy only after changing the source or configuration.

See [run diagnostics](/docs/operate/diagnostics) for the full lifecycle timeline.
