test(session): add test for handleSubtask propagating child session cost to wrapper

Verify that when a subtask completes, the child session's assistant
cost is correctly propagated to the parent wrapper message. This
covers the cost aggregation path in handleSubtask for subagent
interactions.
This commit is contained in:
Imanol Maiztegui
2026-04-27 13:12:34 +02:00
parent 438316b09a
commit 4267cd319b
@@ -845,9 +845,15 @@ it.live(
yield* sessions.updateMessage(childAssistant)
yield* ctx.metadata({
title: "done",
<<<<<<< HEAD
metadata: { sessionId: child.id, model: ref },
})
return { title: "done", metadata: { sessionId: child.id, model: ref }, output: "done" }
=======
metadata: { sessionId: child.id, model: ref, variant: undefined },
})
return { title: "done", metadata: { sessionId: child.id, model: ref, variant: undefined }, output: "done" }
>>>>>>> ede6f5ae18 (test(session): add test for handleSubtask propagating child session cost to wrapper)
})
yield* Effect.addFinalizer(() => Effect.sync(() => void (task.execute = original)))