Skip to content

fix(startup): set NODE_OPTIONS=--experimental-sqlite for voice-agent#1872

Open
bassilkhilo-ag2 wants to merge 2 commits into
sonichi:mainfrom
bassilkhilo-ag2:fix/startup-node-options-sqlite
Open

fix(startup): set NODE_OPTIONS=--experimental-sqlite for voice-agent#1872
bassilkhilo-ag2 wants to merge 2 commits into
sonichi:mainfrom
bassilkhilo-ag2:fix/startup-node-options-sqlite

Conversation

@bassilkhilo-ag2

Copy link
Copy Markdown
Contributor

What

Prepend NODE_OPTIONS="--experimental-sqlite" to the npx tsx invocation that starts the voice agent in src/startup.sh.

Why

node:sqlite (used by conversation-store.ts) requires the --experimental-sqlite flag on Node v22.x. Without it the voice-agent crashes immediately on startup with ERR_UNKNOWN_BUILTIN_MODULE.

This regression is environment-dependent: a process that inherits the flag from Sutando.app's launch environment starts fine, but a bare npx invocation (e.g. manual restart from the terminal, or health-check --fix restart) does not inherit it and fails immediately.

Change

One line in src/startup.sh:

# Before
npx tsx src/voice-agent.ts > "$LOGS_DIR/voice-agent.log" 2>&1 &
# After
NODE_OPTIONS="--experimental-sqlite" npx tsx src/voice-agent.ts > "$LOGS_DIR/voice-agent.log" 2>&1 &

Test plan

  • bash src/startup.sh from a clean terminal (no existing voice-agent) starts voice-agent and port 9900 responds within ~3s
  • Manually kill voice-agent (lsof -i :9900 | grep LISTEN | awk '{print $2}' | xargs kill) then re-run bash src/startup.sh — restarts cleanly without ERR_UNKNOWN_BUILTIN_MODULE
  • health-check.py --fix restart path (if it kills + restarts voice-agent) starts cleanly

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KXQJogmVSdYrKtYX1LwzwT

bassilkhilo-ag2 and others added 2 commits June 30, 2026 18:58
node:sqlite (used by conversation-store.ts) requires the
--experimental-sqlite flag on Node v22.x. Without it the voice-agent
crashes immediately on startup with ERR_UNKNOWN_BUILTIN_MODULE.

Surfaced when restarting voice-agent manually after a stale-process
health-check warning — the process started on app launch had inherited
the flag from the app's launch environment, but a bare npx invocation
did not.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HgadGF8wZKK8bKkPt9Mp8S
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@cla-assistant check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant