Skip to content

When node is launched as snap-packaged node runtime, the child process always returns empty results#13

Open
vsavkov wants to merge 1 commit into
disler:mainfrom
vsavkov:spawn-node
Open

When node is launched as snap-packaged node runtime, the child process always returns empty results#13
vsavkov wants to merge 1 commit into
disler:mainfrom
vsavkov:spawn-node

Conversation

@vsavkov
Copy link
Copy Markdown

@vsavkov vsavkov commented Mar 1, 2026

If pi is launched via the snap-packaged node runtime,
the snap wrapper (/snap/bin/node → /usr/bin/snap) applies AppArmor confinement.

When pi (a snap process) tried to spawn another pi subprocess, snap's confinement silently brakes the stdout pipe — the child process ran but produced no readable output, always returning empty results.

Use process.execPath (the real node binary that snap internally uses) and invoke the pi CLI script directly, to bypass the snap wrapper and its pipe-breaking confinement.

the snap wrapper (/snap/bin/node → /usr/bin/snap) applies AppArmor confinement.

When pi (a snap process) tried to spawn another pi subprocess,
snap's confinement silently brakes the stdout pipe — the child process ran but produced no readable output,
always returning empty results.

Use process.execPath (the real node binary that snap internally uses) and invoke the pi CLI script directly,
to bypass the snap wrapper and its pipe-breaking confinement.
jetnet pushed a commit to jetnet/pi-coms that referenced this pull request May 23, 2026
agent-team.ts, agent-chain.ts, pi-pi.ts, subagent-widget.ts:

- Deduplicate parseAgentFile() → use shared agent-loader (SEC-001, PR disler#3)
- Clamp renderCard width to prevent RangeError: Invalid count -1
  on narrow terminals (Issue disler#17, PR disler#20)
- Use process.execPath + findPiCli() for snap-safe subprocess
  spawning (PR disler#13)
- Forward damage-control.ts extension to subagent processes when
  present, falling back to --no-extensions (Issue disler#24)
- Normalize CRLF line endings in all readFileSync calls (PR disler#1)
- Wrap 'No experts found' message with truncateToWidth() (PR disler#20)
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