#3549·Archon

bug(workflows): script node failures whose stderr mentions ENOENT are reported as 'executable not found in PATH'

Author: Kash597Created Sep 29, 2026Updated Sep 29, 2026

Problem

When a script node's own code fails with an error that mentions ENOENT, the engine reports that the runtime binary is missing. A bun script that tried to open a file that did not exist failed with:

Script node 'publish-pr-body' failed: 'bun' executable not found in PATH

Bun was installed and on PATH. The script started, ran and exited 1. Its stderr, recorded in the run's JSONL log as stderr_tail with exit_code: 1, was:

publish-pr-body: ENOENT: no such file or directory, open '{"intent": "…/pr-body-intent.json"}'

The script-node catch path appears to test the error message for the substring ENOENT (V.message?.includes("ENOENT") in the 0.11.1 binary). A child process that exits non-zero with ENOENT in its stderr matches that test. The bash-node path checks error.code === "ENOENT" instead, so it does not have this problem.

Why

The message sends the operator to the wrong fix. I spent a resume and a PATH change on a runtime that was never missing, and only found the real cause by reading the JSONL log. Any script that reads a missing file, or passes along a Node/Bun ENOENT, gets misreported the same way.

Desired outcome

A script node reports "executable not found" only when spawning the runtime fails. A script that runs and exits non-zero is reported with its exit code and stderr, like any other script failure.

Acceptance

  • A runtime: bun script that runs readFileSync('/does/not/exist') and exits 1 is not reported as "'bun' executable not found in PATH"; the failure shows the script's exit code and stderr.
  • A runtime: bun node on a machine with no bun binary is still reported as "executable not found".
  • The same holds for runtime: uv.

Evidence

Reproduction

  1. Add a named bun script node whose script is import { readFileSync } from 'node:fs'; readFileSync('/does/not/exist');.
  2. Run the workflow.
  3. The node fails with "'bun' executable not found in PATH", though the JSONL log shows the script ran and exited 1.

Environment

  • Archon version or commit: 0.11.1 (Homebrew binary)
  • Platform or adapter: CLI, archon workflow run … --detach, then archon workflow resume … --detach
  • Database: SQLite
  • OS: macOS 15 (Darwin 24.6), Apple silicon

Logs or screenshots

From the run's JSONL log (paths shortened):

{"type":"exec_output","step":"publish-pr-body","content":"<script>","exit_code":1,"stderr_tail":"publish-pr-body: ENOENT: no such file or directory, open '{\"intent\": \"…/pr-body-intent.json\"}'"}
{"type":"workflow_error","error":"DAG workflow 'archon-deliver' completed with failures: 'publish-pr-body': Script node 'publish-pr-body' failed: 'bun' executable not found in PATH"}

Constraints and related work

  • Related issues or PRs: #3367 (a genuine missing uv on Docker, reported with the same message); #3550 (sync-pr-body's JSON-wrapped output, which triggered this).
  • Solution steering: Hint: key on the spawn error's code, as the bash-node path does, rather than on the message text.