{"record":{"id":"564753b53360eeaa","repo":"deepseek-ai/deepseek-harness","slug":"ralph-tool-requires-a-calling-agent-exec-agent-wa","errorCode":null,"errorMessage":"Ralph tool requires a calling agent (exec.agent was undefined)","messagePattern":"Ralph tool requires a calling agent \\(exec\\.agent was undefined\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workflow/tool-ralph/src/index.ts","lineNumber":440,"sourceCode":"        type: 'number',\n        description: 'Optional positive safe-integer round cap, bounded by the deployment ceiling.',\n      },\n    },\n    output: {\n      schema: {\n        type: 'object',\n        additionalProperties: false,\n        properties: RALPH_OUTPUT_PROPERTIES,\n      },\n      render: (_args, value) => [{\n        type: 'text',\n        text: renderResult(value.result as unknown as RalphRunResult, resolved.maxResultChars),\n      }],\n    },\n    async execute(args, exec) {\n      const parent = exec.agent\n      if (parent === undefined) {\n        throw new Error('Ralph tool requires a calling agent (exec.agent was undefined)')\n      }\n      const objective = args.objective.trim()\n      if (objective.length === 0) throw new Error('Ralph objective must be a non-empty string')\n      const maxRounds = resolveMaxRounds(args.maxRounds, resolved.maxRounds)\n      void requireFreshProvider(ctx, resolved.subagentProvider)\n\n      const run: WorkflowRun = ctx.workflowEngine.start({\n        script: RALPH_SCRIPT,\n        meta: RALPH_META,\n        args: { objective, maxRounds, maxHandoffChars: resolved.maxHandoffChars },\n        subagentProvider: resolved.subagentProvider,\n        maxTotalAgents: maxRounds,\n        parent,\n        signal: exec.signal,\n      })\n      const onAbort = (): void => { run.cancel('parent step aborted') }\n      exec.signal.addEventListener('abort', onAbort, { once: true })\n      if (exec.signal.aborted) run.cancel('parent step aborted')","sourceCodeStart":422,"sourceCodeEnd":458,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/tool-ralph/src/index.ts#L422-L458","documentation":"Error \"Ralph tool requires a calling agent (exec.agent was undefined)\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/tool-ralph/src/index.ts:440 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Invoke the Ralph tool from an agent context; compose the agent plugin so exec.agent is populated before the tool runs."],"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"}