coleam00/Archon · warning

Script node '${node.id}' stderr: ``` ${stderr.trim()} ```

Error message

Script node '${node.id}' stderr:
```
${stderr.trim()}
```

What it means

In packages/workflows/src/dag-executor.ts:4122, when a script: node finishes with non-empty stderr, the executor logs 'script_node_stderr' and forwards the stderr to the conversation as a fenced message. Like the bash-node variant, it is informational and does not fail the node by itself.

Source

Thrown at packages/workflows/src/dag-executor.ts:4122

      timeout,
      env: subprocessEnv,
      protectedEnvKeys,
      protectedCredentialValues,
      retention: {
        logDir,
        workflowRunId: workflowRun.id,
        nodeId: node.id,
        label: '<script>',
      },
    });

    // Trim trailing newline from stdout (common shell behavior)
    const output = stdout.replace(/\n$/, '');

    if (stderr.trim()) {
      getLog().warn({ nodeId: node.id, stderr: stderr.trim() }, 'script_node_stderr');
      await safeSendMessage(
        platform,
        conversationId,
        `Script node '${node.id}' stderr:\n\`\`\`\n${stderr.trim()}\n\`\`\``,
        nodeContext
      );
    }

    const duration = Date.now() - nodeStartTime;
    getLog().info({ nodeId: node.id, durationMs: duration }, 'dag_node_completed');
    await logNodeComplete(logDir, workflowRun.id, node.id, '<script>', { durationMs: duration });

    const persistedOutput = formatPersistedNodeOutput(output, artifactsDir, stepName);

    deps.store
      .createWorkflowEvent({
        workflow_run_id: workflowRun.id,
        event_type: 'node_completed',
        step_name: stepName,
        data: {

View on GitHub (pinned to 0773b97458)

Solutions

  1. Fix the script source of the stderr output
  2. Route intentional diagnostics to stdout or a log file
  3. Review the run log keyed 'script_node_stderr' for the full output

Example fix

// node script
# before
console.error('done processing', n)
# after
console.log('done processing', n)
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the script writes no stderr in a pre-run check:
const proc = Bun.spawnSync(['bun', 'run', scriptPath]);
const noise = proc.stderr.toString().trim();
if (noise) console.warn('script emits stderr:', noise);

Type guard

function isStderrSilent(r: { exitCode: number; stderr: string }): boolean {
  return r.exitCode === 0 && r.stderr.trim().length === 0;
}

Prevention

When it happens

Trigger: A script: node's interpreter or code writes anything to stderr — runtime warnings, tracebacks from caught-but-logged errors, dependency deprecation notices — regardless of exit code.

Common situations: TypeScript/Python warnings printed on stderr; console.warn/console.error in the script; library logging configured to stderr; unhandled promise rejection messages printed by the runtime.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/7de2aa5bd640d4b9. Report an issue: GitHub.