Environment
- PAI v5.0.0 (release tag), Linux x64 (WSL2, Ubuntu), Bun 1.3.5
- Installed via
Releases/v5.0.0/.claude/install.sh (CLI mode, completed successfully)
Summary
PAI/PULSE/ ships with no package.json, bun.lock, or node_modules, so
Pulse relies entirely on Bun's runtime auto-install to resolve its external
imports (smol-toml, yaml, grammy, jose, minisearch, …). Bun
silently disables auto-install whenever a node_modules directory exists in
any parent of the working directory — which is common on developer machines
(e.g., a node_modules in $HOME). When that happens, Pulse cannot start
at all:
$ cd ~/.claude/PAI/PULSE && bun run pulse.ts
error: Cannot find package 'smol-toml' from '/home/user/.claude/PAI/PULSE/pulse.ts'
Bun v1.3.5 (Linux x64)
The same root cause breaks the SecurityPipeline hook during install
validation:
✗ SecurityPipeline hook (smoke test): Hook exited 1: error: Cannot find
package 'yaml' from '.../.claude/hooks/security/inspectors/PatternInspector.ts'
Auto-install also fails on offline/airgapped machines and adds latency +
non-determinism (unpinned versions) on first run even when it does work.
Steps to reproduce
- On Linux, have any
node_modules directory in $HOME (e.g., mkdir -p ~/node_modules)
- Install PAI v5.0.0 via
install.sh
cd ~/.claude/PAI/PULSE && bun run pulse.ts
Expected: Pulse starts (it does on a machine where auto-install kicks in).
Actual: immediate crash, Cannot find package 'smol-toml'.
Workaround
cd ~/.claude/PAI/PULSE
bun add smol-toml yaml grammy jose minisearch
After that, Pulse boots cleanly on WSL2 — dashboard on :31337, health
endpoint OK. (The Telegram module additionally wants
@anthropic-ai/claude-agent-sdk.)
Suggested fix
Ship a package.json + bun.lock in PAI/PULSE/ with the runtime
dependencies pinned, and have the installer run bun install there (it
already shells out to bun). Same for the hooks tree (yaml for
PatternInspector). This makes startup deterministic and removes the hidden
dependency on Bun's auto-install heuristics.
Related
Happy to provide the full install/startup logs if useful. Found while
testing v5.0.0 on WSL2 — with the two fixes above, Pulse runs well there
(audio/osascript/iMessage degrade gracefully as expected).
Environment
Releases/v5.0.0/.claude/install.sh(CLI mode, completed successfully)Summary
PAI/PULSE/ships with nopackage.json,bun.lock, ornode_modules, soPulse relies entirely on Bun's runtime auto-install to resolve its external
imports (
smol-toml,yaml,grammy,jose,minisearch, …). Bunsilently disables auto-install whenever a
node_modulesdirectory exists inany parent of the working directory — which is common on developer machines
(e.g., a
node_modulesin$HOME). When that happens, Pulse cannot startat all:
The same root cause breaks the SecurityPipeline hook during install
validation:
Auto-install also fails on offline/airgapped machines and adds latency +
non-determinism (unpinned versions) on first run even when it does work.
Steps to reproduce
node_modulesdirectory in$HOME(e.g.,mkdir -p ~/node_modules)install.shcd ~/.claude/PAI/PULSE && bun run pulse.tsExpected: Pulse starts (it does on a machine where auto-install kicks in).
Actual: immediate crash,
Cannot find package 'smol-toml'.Workaround
After that, Pulse boots cleanly on WSL2 — dashboard on :31337, health
endpoint OK. (The Telegram module additionally wants
@anthropic-ai/claude-agent-sdk.)Suggested fix
Ship a
package.json+bun.lockinPAI/PULSE/with the runtimedependencies pinned, and have the installer run
bun installthere (italready shells out to bun). Same for the hooks tree (
yamlforPatternInspector). This makes startup deterministic and removes the hidden
dependency on Bun's auto-install heuristics.
Related
serving on case-sensitive filesystems — already merged to main, but note
neither fix is in any tagged release yet; v5.0.0 installs hit both.
Happy to provide the full install/startup logs if useful. Found while
testing v5.0.0 on WSL2 — with the two fixes above, Pulse runs well there
(audio/osascript/iMessage degrade gracefully as expected).