# Runner initialization timed out

**URL:** <https://community.livekit.io/t/runner-initialization-timed-out/404>\
**Category:** Agents\
**Tags:** node-js\
**Created:** [February 26, 2026, 11:35pm UTC](https://community.livekit.io/t/runner-initialization-timed-out/404 "2026-02-26T23:35:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kauan\_Passos\_ataide](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/kauan_passos_ataide/32/512_2.png) [@Kauan\_Passos\_ataide](https://community.livekit.io/u/Kauan_Passos_ataide)\
**Post date:** [February 26, 2026, 11:35pm UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/1 "2026-02-26T23:35:19Z")

</div>

Hello guys.

I’m trying run my agent, was working, but now, every time that I try run it, show the error message bellow.

Some one know mean what is happen in my code? Or possible motive?

Error: runner initialization timed out  
at Timeout.\_onTimeout (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\ipc\supervised\_proc.ts:176:24)  
at listOnTimeout (node:internal/timers:581:17)  
at process.processTimers (node:internal/timers:519:7)

Node.js v20.19.5

——-

Bellow, is my initialization:

export default defineAgent({

prewarm: async (proc: JobProcess) =\> {

```
if (!proc.userData.vad) {

  proc.userData.vad = await silero.VAD.load();

}

```

},

entry: async (ctx: JobContext) =\> {

```
try {

  await ctx.connect();

  const vad = ctx.proc.userData.vad! as silero.VAD;

  const participants = Array.from(ctx.room.remoteParticipants.values());

  const user = participants\[0\];

```

….

….

await session.start({

```
    agent: assistant,

    room: ctx.room,

    inputOptions: {

      noiseCancellation: BackgroundVoiceCancellation(),

    },

  });

  const handle = session.generateReply({

    instructions: “…“ });

  await handle.waitForPlayout();

  ctx.room.once('disconnected', () => {

    Logger.log(\`Cleaning up session for user\`);

    *// Nullify references to help Garbage Collection*

    (tools as any) = null;

    (authService as any) = null;

  });

} catch (error) {

  Logger.error(error);

  return;

}

```

},

});

cli.runApp(

new ServerOptions({

```
agent: path.resolve(process.cwd(), 'src/ai/agent.ts'),

```

}),

);

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [February 27, 2026, 12:51am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/2 "2026-02-27T00:51:22Z")

</div>

This error usually means the agent worker process didn’t finish booting in time, so the parent “runner” killed it. In Node.js, each job runs in its own process, and heavy or blocking code during module load or `prewarm` can cause this.

From the quickstart example, the expected pattern is:

- `export default defineAgent({ ... })`

- `cli.runApp(new ServerOptions({ agent: fileURLToPath(import.meta.url), agentName }))`

- No long synchronous work at the top-level

- `await ctx.connect()` inside `entry` (after session setup is fine, as shown in the quickstart)

Common causes of `runner initialization timed out`:

1. A top-level await, infinite loop, or long sync operation before `defineAgent` is exported.

2. `silero.VAD.load()` hanging (model files not downloaded). Make sure you ran:

3. Wrong `agent` path in `ServerOptions` (must point to the built JS file in production).

First step: run with debug logs:

```bash
pnpm start -- --log-level=debug

```

(as shown in Server options → Log levels: /agents/server/options/)

Can you confirm:

- Are you running `dev` or `start`?

- Did you recently change Node version or rebuild?

- Does it fail before any of your own logs print?

---

<div class="post-metadata">

**Author:** ![Kauan\_Passos\_ataide](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/kauan_passos_ataide/32/512_2.png) [@Kauan\_Passos\_ataide](https://community.livekit.io/u/Kauan_Passos_ataide)\
**Post date:** [February 27, 2026, 1:31am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/3 "2026-02-27T01:31:36Z")

</div>

> [@CWilson](#):
>
> `-- --log-level=debug`

For this error, I updated my agents and fix some tools that was without required atributes. But now, I have other error: Is starting my agent, saying the first phrase, but when I speak back, not understand…  
[22:24:36.542] DEBUG (5804): Task.runTask: task AgentActivity.pipelineReply done  
[22:24:38.334] DEBUG (5804): VAD task: START\_OF\_SPEECH  
[22:24:41.534] DEBUG (5804): VAD task: END\_OF\_SPEECH  
[22:24:41.535] DEBUG (5804): running EOU detection  
audioTranscript: “”  
[22:24:41.536] DEBUG (5804): skipping EOU detection  
[22:24:47.806] DEBUG (5804): VAD task: START\_OF\_SPEECH  
[22:24:55.355] DEBUG (5804): VAD task: END\_OF\_SPEECH  
[22:24:55.356] DEBUG (5804): running EOU detection  
audioTranscript: “”  
[22:24:55.356] DEBUG (5804): skipping EOU detection

What can be?

Other thing that I want know, is about ServerOptions and WorkerOptions, now I’m using ServerOptions, but before I was using worker. What is the difference between both? When is better use server or worker?

And thanks so much for help me bro.

---

<div class="post-metadata">

**Author:** ![CWilson](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/cwilson/32/135_2.png) [@CWilson](https://community.livekit.io/u/CWilson)\
**Post date:** [February 27, 2026, 1:39am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/4 "2026-02-27T01:39:52Z")

</div>

Try this agent and see if it works for you:

> <https://github.com/livekit/agents-js/blob/main/examples/src/basic_agent.ts>

---

<div class="post-metadata">

**Author:** ![Kauan\_Passos\_ataide](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/kauan_passos_ataide/32/512_2.png) [@Kauan\_Passos\_ataide](https://community.livekit.io/u/Kauan_Passos_ataide)\
**Post date:** [February 27, 2026, 1:59am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/5 "2026-02-27T01:59:35Z")

</div>

fileURLToPath not work with my configs, I’m using nestJs.

About the error, I found: The STT is not working. I tried change from assembly to cartesia, but not work too. The apy key is correct: “ASSEMBLYAI\_API\_KEY=”, stt: new inference.STT({

```
      model: 'assemblyai/universal-streaming-multilingual',

      language: 'pt-BR',

    }),

```

What can be?

---

<div class="post-metadata">

**Author:** ![Kauan\_Passos\_ataide](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/kauan_passos_ataide/32/512_2.png) [@Kauan\_Passos\_ataide](https://community.livekit.io/u/Kauan_Passos_ataide)\
**Post date:** [February 27, 2026, 2:04am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/6 "2026-02-27T02:04:36Z")

</div>

jobID: “AJ\_QaqtSSU8UhHU”  
error: {  
“type”: “Error”,  
“message”: “Unhandled error. ({\n type: ‘error’,\n error: APIConnectionError: Error connecting to LiveKit WebSocket\n at WebSocket.onError (C:\alfred\_system\back-end\node\_modules\@livekit\agents\src\inference\utils.ts:48:16)\n at Object.onceWrapper (node:events:639:26)\n at WebSocket.emit (node:events:524:28)\n at emitErrorAndClose (C:\alfred\_system\back-end\node\_modules\ws\lib\websocket.js:1046:13)\n at process.processTicksAndRejections (node:internal/process/task\_queues:82:21) {\n body: null,\n retryable: true\n },\n source: STT {\n \_events: [Object: null prototype] {\n metrics\_collected: [Function: onMetricsCollected],\n error: [Function: onModelError]\n },\n \_eventsCount: 2,\n \_maxListeners: undefined,\n opts: {\n model: ‘assemblyai/universal-streaming-multilingual’,\n language: ‘pt-BR’,\n encoding: ‘pcm\_s16le’,\n sampleRate: 16000,\n baseURL: ‘wss://agent-gateway.livekit.cloud/v1’,\n apiKey: ‘,\n apiSecret: ’,\n modelOptions: {},\n fallback: undefined,\n connOptions: [Object]\n },\n streams: Set(1) { [SpeechStream] },\n [Symbol(shapeMode)]: false,\n [Symbol(kCapture)]: false\n },\n createdAt: 1772157680332\n})”,  
“stack”:  
Error [ERR\_UNHANDLED\_ERROR]: Unhandled error. ({  
type: ‘error’,  
error: APIConnectionError: Error connecting to LiveKit WebSocket  
at WebSocket.onError (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\inference\utils.ts:48:16)  
at Object.onceWrapper (node:events:639:26)  
at WebSocket.emit (node:events:524:28)  
at emitErrorAndClose (C:\alfred\_system\back-end\node\_modules\ws\lib\websocket.js:1046:13)  
at process.processTicksAndRejections (node:internal/process/task\_queues:82:21) {  
body: null,  
retryable: true  
},  
source: STT {  
\_events: [Object: null prototype] {  
metrics\_collected: [Function: onMetricsCollected],  
error: [Function: onModelError]  
},  
\_eventsCount: 2,  
\_maxListeners: undefined,  
opts: {  
model: ‘assemblyai/universal-streaming-multilingual’,  
language: ‘pt-BR’,  
encoding: ‘pcm\_s16le’,  
sampleRate: 16000,  
baseURL: ‘wss://agent-gateway.livekit.cloud/v1’,  
apiKey: ‘…’,  
apiSecret: ‘…’,  
modelOptions: {},  
fallback: undefined,  
connOptions: [Object]  
},  
streams: Set(1) { [SpeechStream] },  
[Symbol(shapeMode)]: false,  
[Symbol(kCapture)]: false  
},  
createdAt: 1772157680332  
})  
at AgentSession.emit (node:events:513:17)  
at AgentSession.emit (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\voice\agent\_session.ts:255:18)  
at AgentActivity.onError (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\voice\agent\_activity.ts:598:25)  
at STT.onModelError (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\voice\agent\_activity.ts:138:10)  
at STT.emit (node:events:524:28)  
at SpeechStream.emitError (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\stt\stt.ts:256:15)  
at SpeechStream.mainTask (C:\alfred\_system\back-end\node\_modules@livekit\agents\src\stt\stt.ts:230:18)  
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)  
“code”: “ERR\_UNHANDLED\_ERROR”,  
“context”: {  
“type”: “error”,  
“error”: {  
“body”: null,  
“retryable”: true,  
“name”: “APIConnectionError”  
},  
“source”: {  
“\_events”: {},  
“\_eventsCount”: 2,  
“opts”: {  
“model”: “assemblyai/universal-streaming-multilingual”,  
“language”: “pt-BR”,  
“encoding”: “pcm\_s16le”,  
“sampleRate”: 16000,  
“baseURL”: “wss://agent-gateway.livekit.cloud/v1”,  
“apiKey”: “…”,  
“apiSecret”: “…”,  
“modelOptions”: {},  
“connOptions”: {  
“maxRetry”: 3,  
“retryIntervalMs”: 2000,  
“timeoutMs”: 10000  
}  
},  
“streams”: {}  
},  
“createdAt”: 1772157680332  
}  
}

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [February 27, 2026, 9:39am UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/7 "2026-02-27T09:39:15Z")

</div>

> [@Kauan\_Passos\_ataide](#):
>
> The apy key is correct: “ASSEMBLYAI\_API\_KEY=”, stt: new inference.STT({

That line implies you are conflating STT with LiveKit inference and STT with Plugins. Only the latter requires an API key whereas the former is specified by `inference.STT'`(not `new inference.STT`)

Inference docs for AssemblyAI: [AssemblyAI STT | LiveKit Documentation](https://docs.livekit.io/agents/models/stt/inference/assemblyai/)

Plugin docs for AssemblyAI: [AssemblyAI plugin guide | LiveKit Documentation](https://docs.livekit.io/agents/models/stt/plugins/assemblyai/)

Your error is probably related to that. I recommend you first try with the basic\_agent.ts that @CWilson pointed to above, since that is a known-working sample. That will use LiveKit inference, so can be run on the free tier without additional API keys.

---

<div class="post-metadata">

**Author:** ![Kauan\_Passos\_ataide](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/kauan_passos_ataide/32/512_2.png) [@Kauan\_Passos\_ataide](https://community.livekit.io/u/Kauan_Passos_ataide)\
**Post date:** [February 27, 2026, 3:40pm UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/8 "2026-02-27T15:40:23Z")

</div>

I found the problem: I was using assemblyAI with the inference… how can I run using an plugin in node? Is possible? Because assembly is very better then openai to STT… and the price is the same. Can I run e.g. other plugin with assembly credentials to work?

---

<div class="post-metadata">

**Author:** ![darryncampbell](https://sea1.discourse-cdn.com/flex001/user_avatar/community.livekit.io/darryncampbell/32/20_2.png) [@darryncampbell](https://community.livekit.io/u/darryncampbell)\
**Post date:** [March 1, 2026, 10:28pm UTC](https://community.livekit.io/t/runner-initialization-timed-out/404/9 "2026-03-01T22:28:47Z")

</div>

Unfortunately, the assemblyAI STT plugin is only available in Python: [AssemblyAI plugin guide | LiveKit Documentation](https://docs.livekit.io/agents/models/stt/plugins/assemblyai/) (see the ‘Available In’, towards the top of the page).

As you say, Inference interface for AssemblyAI is available in both Node.js and Python.
