Skip to content

Commit 9b9e1d1

Browse files
committed
Fix context fork assignment
1 parent 0128d71 commit 9b9e1d1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

agents/agents-core/src/commonMain/kotlin/ai/koog/agents/core/dsl/builder/AIAgentSubgraphBuilder.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ public class AIAgentForkNodeBuilder<Input, Output> internal constructor(
281281
val mapResults = supervisorScope {
282282
nodes.map { node ->
283283
async(dispatcher) {
284-
val nodeContext = (initialContext as? ai.koog.agents.core.agent.context.AIAgentContext)?.fork()
285-
?: initialContext.fork()
284+
val nodeContext = initialContext.fork()
286285
val result = node.execute(nodeContext, input)
287286
ForkResult(node.name, input, nodeContext, result)
288287
}

0 commit comments

Comments
 (0)