From e93292de2a21aea95c3300779dd9639eace1c144 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Fri, 17 Apr 2026 17:17:45 +0300 Subject: [PATCH] fix(agent-runner): spawn built-in MCP server with bun, not node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Bun migration (c5d0ef8) dropped the in-image tsc build step, so /app/src/mcp-tools/index.js never exists — only index.ts. The spawn config in container/agent-runner/src/index.ts still pointed at index.js and invoked it with `node`, which can't execute TypeScript anyway. Net effect: every session failed to start the `nanoclaw` MCP server, so scheduling, send_to_agent, interactive questions, and self-mod tools were silently absent from the agent's toolset. Matches entrypoint.sh and src/container-runner.ts, which already use `exec bun run /app/src/index.ts` for the same reason. Co-Authored-By: Claude Opus 4.7 (1M context) --- container/agent-runner/src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container/agent-runner/src/index.ts b/container/agent-runner/src/index.ts index 1adb76d..a0b0dc8 100644 --- a/container/agent-runner/src/index.ts +++ b/container/agent-runner/src/index.ts @@ -73,15 +73,15 @@ async function main(): Promise { } } - // MCP server path + // MCP server path — bun runs TS directly; no tsc build step in-image. const __dirname = path.dirname(fileURLToPath(import.meta.url)); - const mcpServerPath = path.join(__dirname, 'mcp-tools', 'index.js'); + const mcpServerPath = path.join(__dirname, 'mcp-tools', 'index.ts'); // Build MCP servers config: nanoclaw built-in + any additional from host const mcpServers: Record }> = { nanoclaw: { - command: 'node', - args: [mcpServerPath], + command: 'bun', + args: ['run', mcpServerPath], env: { SESSION_INBOUND_DB_PATH: process.env.SESSION_INBOUND_DB_PATH || '/workspace/inbound.db', SESSION_OUTBOUND_DB_PATH: process.env.SESSION_OUTBOUND_DB_PATH || '/workspace/outbound.db',