---
url: >-
  https://adk.nht.io/api/batteries/isolation/child_process/type-aliases/ChildResolver.md
description: >-
  A BYO-spawner resolver — the seam for callers who need their own process
  manager (a pool, custom stdio, a sandboxing wrapper, or a library like
  `execa`) instead of this module's own default `fork()`. Invoked once per
  `connect()` (including every `recycle()`), i.e. once per guest spawn.
---

# Type Alias: ChildResolver

```ts
type ChildResolver = (ctx: {
  spec: IsolatedServiceSpec;
}) => IsolatedChildLike | Promise<IsolatedChildLike>;
```

Defined in: [src/batteries/isolation/child\_process/transport.ts:141](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/child_process/transport.ts#L141)

A BYO-spawner resolver — the seam for callers who need their own process manager (a pool, custom
stdio, a sandboxing wrapper, or a library like `execa`) instead of this module's own default
`fork()`. Invoked once per `connect()` (including every `recycle()`), i.e. once per guest spawn.

## Parameters

| Parameter  | Type                                                                                                       |
| ---------- | ---------------------------------------------------------------------------------------------------------- |
| `ctx`      | { `spec`: [`IsolatedServiceSpec`](../../../../@nhtio/adk/batteries/interfaces/IsolatedServiceSpec.md); } |
| `ctx.spec` | [`IsolatedServiceSpec`](../../../../@nhtio/adk/batteries/interfaces/IsolatedServiceSpec.md)                |

## Returns

| [`IsolatedChildLike`](../interfaces/IsolatedChildLike.md)
| `Promise`<[`IsolatedChildLike`](../interfaces/IsolatedChildLike.md)>

## Remarks

The resolver receives the fully-resolved @nhtio/adk/batteries/isolation!IsolatedServiceSpec so it can name/label the spawned process (e.g. for
logging), but is otherwise free to spawn however it likes — this transport only requires the
returned value to satisfy [IsolatedChildLike](../interfaces/IsolatedChildLike.md).

A returned execa `{ ipc: true }` subprocess is itself thenable (execa mixes `.then`/`.catch`/
`.finally` onto it so it can double as "the child" and "a promise for its exit result"). This
transport's own `spawnChild` internals guard against that value being mistaken for a real `Promise`
and adopted (which would silently defer "spawned" until the child EXITS) — a resolver author does not
need to do anything special here, this is called out purely so the mechanism is documented in one
place close to where a resolver returns its child.
