coleam00/Archon · error
Node '${node.id}' failed: SDK returned ${subtype}${errorsDet
Error message
Node '${node.id}' failed: SDK returned ${subtype}${errorsDetail} What it means
Thrown when the model SDK stream delivers an error result message (an isError result with a subtype other than the budget cap, which has its own error). The executor logs dag.node_sdk_error_result and fails the node, including the SDK subtype and any collected error details, because silently breaking out of the stream previously produced empty output disguised as success.
Source
Thrown at packages/workflows/src/dag-executor.ts:2653
// clean stop_sequence termination. The Claude provider already filters
// this out, but the guard here keeps a third-party IAgentProvider that
// forwards the SDK pair raw from producing a "SDK returned success"
// false failure.
if (msg.isError && msg.errorSubtype !== 'success') {
const subtype = msg.errorSubtype ?? 'unknown';
const errorsDetail = msg.errors?.length ? ` — ${msg.errors.join('; ')}` : '';
getLog().error(
{
nodeId: node.id,
errorSubtype: subtype,
errors: msg.errors,
sessionId: msg.sessionId,
stopReason: msg.stopReason,
durationMs: Date.now() - nodeStartTime,
},
'dag.node_sdk_error_result'
);
throw new Error(`Node '${node.id}' failed: SDK returned ${subtype}${errorsDetail}`);
}
if (backgroundTasks.shouldBreakOnResult()) {
break; // Result is the "I'm done" signal — don't wait for subprocess to exit
}
// Result arrived with background Agent tasks still live (#2083).
// Breaking here would .return() the generator chain → SDK cleanup →
// SIGTERM the CLI → kill the tasks and lose their pending artifacts.
// Keep consuming: the SDK holds the subprocess open until the tasks
// drain, runs a follow-up turn to integrate their output, and emits a
// final result (whose fields overwrite the captures above — correct,
// since SDK cost/usage are session-cumulative). Bounded by the
// existing idle timeout; task_progress chunks reset it.
getLog().warn(
{
nodeId: node.id,
taskCount: backgroundTasks.count(),
taskIds: backgroundTasks.ids(),
},View on GitHub (pinned to 0773b97458)
Solutions
- Read the `subtype` and errorsDetail in the message to identify the SDK failure cause.
- Fix authentication if the subtype indicates auth/permission problems (check API keys/env).
- Retry on transient subtypes (overloaded/api_error) — ideally via the node's retry policy.
- Check provider status/incidents if errors persist; upgrade the provider SDK if the subtype is unknown to your version.
Example fix
// before
node:
id: plan
# after — add retry for transient SDK errors
node:
id: plan
retry:
attempts: 3
on: [overloaded_error, api_error] Defensive patterns
Strategy: retry
Validate before calling
// validate credentials/config before the run
if (!process.env.ANTHROPIC_API_KEY && !hasStoredCredentials()) throw new Error('No provider credentials configured'); Try / catch
try {
await runNode(node);
} catch (e) {
const m = String(e).match(/SDK returned ([\w_]+)/);
if (m && ['overloaded_error','api_error','rate_limit_error'].includes(m[1])) {
await retryWithBackoff(() => runNode(node), { attempts: 3 });
} else throw e;
} Prevention
- Configure node-level retry for transient SDK subtypes.
- Verify API keys and provider status before long runs.
- Keep the provider SDK updated to get accurate subtypes.
When it happens
Trigger: The provider SDK surfaces a terminal error result during a node's agent turn — e.g. api_error, overloaded, invalid_request, authentication failures — and `subtype` names it in the message.
Common situations: Provider outages or rate limiting (overloaded_error); expired/invalid API credentials; malformed request rejected by the model API; network interruption mid-turn.
Related errors
- Provider(s) ${entry.agents.join(', ')} declare credential ve
- Node '${node.id}': unknown provider '${provider}'. Registere
- Provider '${provider}' cannot run inside a container yet (co
- Node '${node.id}' exceeded cost cap${cap !== undefined ? ` o
- Node '${node.id}' could not resume the exact session from '$
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/6f292419e0bfde4e.
Report an issue: GitHub.