deepseek-ai/deepseek-harness · error · AggregateError

subagent run failed: ${String(execution.reason)}; dispose fa

Error message

subagent run failed: ${String(execution.reason)}; dispose failed: ${String(disposal.reason)}

What it means

Error "subagent run failed: ${String(execution.reason)}; dispose failed: ${String(disposal.reason)}" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/subagent/tool-subagent/src/index.ts:197

      const error = stopReasonError(result)
      if (error !== undefined) {
        // The registry converts this throw to isError; partial output is not
        // success, but the preserved partial answer still reaches the parent.
        throw new Error(withDiagnosticAndPartialText(error, result))
      }
      return {
        kind: 'foreground',
        runId: run.id,
        // Content blocks already cross durable JSON boundaries elsewhere;
        // the registry performs the authoritative lossless snapshot here.
        output: result.output as unknown as JsonValue[],
      }
    }),
  ])
  const [disposal] = await Promise.allSettled([Promise.resolve().then(() => run.dispose())])
  if (execution.status === 'rejected') {
    if (disposal.status === 'rejected') {
      throw new AggregateError(
        [execution.reason, disposal.reason],
        `subagent run failed: ${String(execution.reason)}; dispose failed: ${String(disposal.reason)}`,
      )
    }
    throw execution.reason
  }
  if (disposal.status === 'rejected') throw disposal.reason
  return execution.value
}

/**
 * Model-facing wording from the provider's conversation-history descriptor
 * ({@link SubagentProvider.inheritsParentContext}).
 * A fresh child needs a standalone prompt; a forked child already sees the
 * conversation's completed turns — telling the model to restate everything
 * (or, worse, that the child "does not see this conversation") would be false
 * for a fork.
 * @param inheritsConversation - whether the child's conversation is seeded

View on GitHub (pinned to b150a551b8)

Solutions

  1. Fix the primary run failure first, then investigate the dispose failure cause reported after it.

When it happens

Trigger: Thrown at packages/subagent/tool-subagent/src/index.ts:197 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/918584d547d5d6d0. Report an issue: GitHub.