---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/SpawnIsolatedOptions.md'
description: >-
  Options accepted by [`spawnIsolated`](https://adk.nht.io/api/@nhtio/adk/batteries/functions/spawnIsolated)/[`createWorkerTransport`](https://adk.nht.io/api/@nhtio/adk/batteries/functions/createWorkerTransport),
  layered on top of [`IsolatedServiceOptions`](https://adk.nht.io/api/@nhtio/adk/batteries/interfaces/IsolatedServiceOptions).
---

# Interface: SpawnIsolatedOptions

Defined in: [src/batteries/isolation/browser.ts:104](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L104)

Options accepted by [spawnIsolated](../functions/spawnIsolated.md)/[createWorkerTransport](../functions/createWorkerTransport.md), layered on top of [IsolatedServiceOptions](IsolatedServiceOptions.md).

## Extends

* [`IsolatedServiceOptions`](IsolatedServiceOptions.md)

## Properties

| Property                                                 | Type                                                                       | Description                                                                                                                                                                                                               | Inherited from                                                                                                                                                                                                                                                                                                                     | Defined in                                                                                                                                        |
| -------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|  `autoRespawn?`         | { `policy`: [`CrashPolicy`](CrashPolicy.md); }                           | Opt-in automatic recovery: on a transport-reported crash, consult `policy.record()` and `recycle()` automatically when it returns `'respawn'`. Default: not set (crashes are surfaced, never auto-healed).                | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`autoRespawn`](IsolatedServiceOptions.md#property-autorespawn)                                                                                                                                                                                                              | [src/batteries/isolation/host.ts:54](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/host.ts#L54)                     |
| `autoRespawn.policy`                                     | [`CrashPolicy`](CrashPolicy.md)                                            | -                                                                                                                                                                                                                         | -                                                                                                                                                                                                                                                                                                                                  | [src/batteries/isolation/host.ts:54](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/host.ts#L54)                     |
|  `debugPayloads?`     | `boolean`                                                                  | Include payload bodies on `call:*`/`wire:*` reports (see [IsolationReport.payload](IsolationReport.md#property-payload)). Default `false` — payloads may be large/sensitive, so this is opt-in even when hooks are wired. | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`debugPayloads`](IsolatedServiceOptions.md#property-debugpayloads)                                                                                                                                                                                                          | [src/batteries/isolation/observability.ts:135](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L135) |
|  `disposeGraceMs?`   | `number`                                                                   | Grace period `dispose()` gives the guest to exit cleanly after `shutdown` before forcing `transport.terminate()`. Default `2000`.                                                                                         | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`disposeGraceMs`](IsolatedServiceOptions.md#property-disposegracems)                                                                                                                                                                                                        | [src/batteries/isolation/host.ts:51](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/host.ts#L51)                     |
|  `encodables?`           | readonly { `name`: `string`; }\[]                                         | Classes to register with `@nhtio/encoder`'s custom-encodable round-trip on this side.                                                                                                                                     | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`encodables`](IsolatedServiceOptions.md#property-encodables)                                                                                                                                                                                                                | [src/batteries/isolation/host.ts:56](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/host.ts#L56)                     |
|  `onAbort?`                 | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `abort:sent` — the host sent an `abort` envelope for an in-flight call.                                                                                                                                                   | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onAbort`](IsolatedServiceOptions.md#property-onabort)                                                                                                                                                                                                                      | [src/batteries/isolation/observability.ts:128](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L128) |
|  `onCall?`                   | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `call:start` / `call:settle` — a single request/response method call.                                                                                                                                                     | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onCall`](IsolatedServiceOptions.md#property-oncall)                                                                                                                                                                                                                        | [src/batteries/isolation/observability.ts:124](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L124) |
|  `onCodecEscalate?` | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `codec:escalate` — the codec escalated an argument past the `'raw'` tier.                                                                                                                                                 | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onCodecEscalate`](IsolatedServiceOptions.md#property-oncodecescalate)                                                                                                                                                                                                      | [src/batteries/isolation/observability.ts:132](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L132) |
|  `onCrashReport?`     | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `crash` — the transport reported an unexpected guest exit/termination.                                                                                                                                                    | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onCrashReport`](IsolatedServiceOptions.md#property-oncrashreport)                                                                                                                                                                                                          | [src/batteries/isolation/observability.ts:120](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L120) |
|  `onDispose?`             | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `dispose:start` / `dispose:done` — graceful-then-forced teardown.                                                                                                                                                         | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onDispose`](IsolatedServiceOptions.md#property-ondispose)                                                                                                                                                                                                                  | [src/batteries/isolation/observability.ts:116](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L116) |
|  `onIsolation?`         | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | Fires on EVERY report (the firehose).                                                                                                                                                                                     | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onIsolation`](IsolatedServiceOptions.md#property-onisolation)                                                                                                                                                                                                              | [src/batteries/isolation/observability.ts:112](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L112) |
|  `onRecycle?`             | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `recycle:start` / `recycle:done` — terminate + reconnect through the same transport.                                                                                                                                      | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onRecycle`](IsolatedServiceOptions.md#property-onrecycle)                                                                                                                                                                                                                  | [src/batteries/isolation/observability.ts:118](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L118) |
|  `onRespawnAuto?`     | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `respawn:auto` — an `autoRespawn` crash-policy verdict was consulted and acted on.                                                                                                                                        | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onRespawnAuto`](IsolatedServiceOptions.md#property-onrespawnauto)                                                                                                                                                                                                          | [src/batteries/isolation/observability.ts:122](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L122) |
|  `onSpawn?`                 | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `spawn:start` / `spawn:ready` / `spawn:error` — guest connect lifecycle.                                                                                                                                                  | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onSpawn`](IsolatedServiceOptions.md#property-onspawn)                                                                                                                                                                                                                      | [src/batteries/isolation/observability.ts:114](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L114) |
|  `onStream?`               | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `stream:start` / `stream:end` / `stream:error` / `stream:cancel` — a streaming method call.                                                                                                                               | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onStream`](IsolatedServiceOptions.md#property-onstream)                                                                                                                                                                                                                    | [src/batteries/isolation/observability.ts:126](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L126) |
|  `onWire?`                   | [`IsolationReportCallback`](../type-aliases/IsolationReportCallback.md)    | `wire:out` / `wire:in` — every envelope crossing the wire (verbose; opt in deliberately).                                                                                                                                 | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`onWire`](IsolatedServiceOptions.md#property-onwire)                                                                                                                                                                                                                        | [src/batteries/isolation/observability.ts:130](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/observability.ts#L130) |
|  `readyTimeoutMs?`   | `number`                                                                   | Max time to wait for the guest's `ready` envelope after `transport.connect()` resolves. Default `30_000`. Rejects the pending `connect`/first call with `E_ISOLATION_READY_TIMEOUT`.                                      | [`IsolatedServiceOptions`](IsolatedServiceOptions.md).[`readyTimeoutMs`](IsolatedServiceOptions.md#property-readytimeoutms)                                                                                                                                                                                                        | [src/batteries/isolation/host.ts:48](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/host.ts#L48)                     |
|  `worker`                    | `string` | `URL` | [`WorkerResolver`](../type-aliases/WorkerResolver.md) | How to obtain the guest `Worker`: - A `string                                                                                                                                                                             | URL`— the guest script's URL;`createWorkerTransport`constructs`new Worker(url, workerOptions)`itself on every`connect()`. - A [WorkerResolver](../type-aliases/WorkerResolver.md) — full control: bring a `Worker`from any bundler pattern or pool. Invoked with`{ spec }`and may return a`Worker`synchronously or via a`Promise`. | -                                                                                                                                                 | [src/batteries/isolation/browser.ts:113](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L113) |
|  `workerOptions?`     | [`BrowserWorkerOptions`](BrowserWorkerOptions.md)                          | Forwarded verbatim to `new Worker(url, workerOptions)` — used ONLY for the `string                                                                                                                                        | URL`spawn form (ignored when`worker`is a [WorkerResolver](../type-aliases/WorkerResolver.md), which constructs its own`Worker`). Default: classic script (no `type`) — see [BrowserWorkerOptions](BrowserWorkerOptions.md)'s doc for why.                                                                                          | -                                                                                                                                                 | [src/batteries/isolation/browser.ts:117](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/browser.ts#L117) |
