I'm getting a pretty obscure error at the moment - I'm probably doing something dumb but not sure ``` [23:17:17.614] ERROR (#64): { _id: 'Effect', _op: 'WithRuntime', effect_instruction_i0: [Function (anonymous)], effect_instruction_i1: undefined, effect_instruction_i2: undefined } ``` Relevant code: ``` const generate = (root: string, maxDepth: number = 1) => Effect.gen(function* (_) { const rootNode: Node = { id: `0`, parent: null, context: [], content: root, children: [], depth: 0, }; const populate = (node: Node) => Effect.gen(function* () { yield* Effect.log(`Processing node ${node.id}`); // Check if the depth limit is reached if (node.depth >= maxDepth) { return; } yield* Effect.log(`Analysing node ${node.id}`); const analysis = yield* intelligence.structuredOutput( analysisPrompt(node.content, node.context.join("\n")), AnalysisResponse ); const children = analysis.topics.map((topic, index) => Effect.gen(function* () { const childId = [node.id, index].join("/") yield* Effect.log(`Generating content for node (${childId}) topic ${topic}`); const generated = yield* intelligence.textOutput( generationPrompt(topic, node.context.join("\n")) ); const child: Node = { id: childId, parent: node, context: [ ...(node.parent?.context ?? []), node.content, ], content: generated, children: [], depth: node.depth + 1, }; return child; }) ); node.children = yield* Effect.all(children, { concurrency: 10 }); stack.push(...node.children.map(populate)); }); const stack = [populate(rootNode)]; yield* Effect.all(stack, { concurrency: 10 }); yield* Effect.tryPromise({ try: () => fs.writeFile("output.json", JSON.stringify(rootNode, null, 2)), catch: (e) => Effect.logError(e), }); return rootNode; }); ```