{"record":{"id":"75e39e52176c38f1","repo":"deepseek-ai/deepseek-harness","slug":"agent-result","errorCode":"AGENT_RESULT","errorMessage":"child agent run failed: ${renderThrown(error)}","messagePattern":"child agent run failed: (.+?)","errorType":"exception","errorClass":"WorkflowError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/runtime.ts","lineNumber":315,"sourceCode":"      }\n      const info: WorkflowAgentInfo = { seq, label, ...phase !== undefined ? { phase } : {}, childId: SessionId(run.id) }\n      this.observer.agentStart(info)\n      try {\n        let result\n        try {\n          result = await run.result\n        } catch (error: unknown) {\n          // A rejected child result is an INFRASTRUCTURE fault relayed by the\n          // host — distinct from a child that failed and resolved. Pair the\n          // lifecycle before propagating, and propagate FATAL: an ordinary\n          // throw would dissolve to a per-item null inside the combinators,\n          // and a broken provider must not read as a failed child.\n          if (this.isCancelled()) {\n            this.observer.agentEnd({ ...info, outcome: 'cancelled' })\n            throw this.cancelledError()\n          }\n          this.observer.agentEnd({ ...info, outcome: 'failed' })\n          throw new WorkflowError(`child agent run failed: ${renderThrown(error)}`, 'AGENT_RESULT', { cause: error })\n        }\n        if (result.stopReason === 'completed') {\n          if (opts.schema !== undefined) {\n            // The provider honored outputSchema (capability-gated at start), so\n            // a completed run without a structured value is a child failure.\n            if (result.structured === undefined) {\n              this.observer.agentEnd({ ...info, outcome: 'failed' })\n              return null\n            }\n            this.observer.agentEnd({ ...info, outcome: 'completed' })\n            return result.structured\n          }\n          this.observer.agentEnd({ ...info, outcome: 'completed' })\n          return outputText(result.output)\n        }\n        // A cancelled RUN kills the script; a child that failed for its own\n        // reasons resolves null (scripts .filter(Boolean) per the CC contract).\n        if (this.isCancelled()) {","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/runtime.ts#L297-L333","documentation":"Error \"child agent run failed: ${renderThrown(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:315 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the embedded child-run error and fix the child agent's failure (provider error, prompt issue); then re-run."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}