@outputai/core workflow execution changes in v0.8.0.
What changed
- Workflows no longer aggregate usage data or expose
aggregationsin run results. - Workflow invocation options changed.
- Calling a workflow from inside another workflow now always starts a Temporal child workflow.
Migration steps
Replace workflow result aggregations
Workflows no longer collect usage events into workflow-level totals. As a result, workflow results now focus on the workflow output and trace metadata, and no longer exposeresult.aggregations.
If your API or CLI consumers read usage totals from result.aggregations, move that aggregation into hooks.
Before
After
Record cost events as they happen, then aggregate them in your own store. Hook payloads includeworkflowDetails, so you can group totals by workflow id and run id.
eventId as the idempotency key if your sink can receive retries or duplicate deliveries.
workflowId and runId alongside the workflow result.
Update workflow invocation options
The second argument to a workflow function is now namedWorkflowInvocationOptions.
If you imported the old invocation configuration type directly, update that import:
activityOptions. The old options property is no longer accepted for workflow calls.
Before
After
detached and context remain invocation options. The field to update for this migration is activityOptions.
Review workflow-to-workflow calls
Calling a workflow function from inside another workflow now always starts a Temporal child workflow. In older versions, some direct workflow calls were rewritten only in specific code paths. When that rewrite happened, the called workflow could effectively run as part of the parent workflow’s execution path: its activities were scheduled from the parent workflow, and the child workflow did not necessarily appear as a distinct Temporal child execution. In v0.8.0, this is different by design. A direct call like this:enrich_company as a Temporal child workflow.
That means:
- The called workflow has its own Temporal workflow execution, run id, history, and retry/cancellation behavior.
- Activities inside the called workflow are scheduled by the child workflow, not by the parent.
- The parent receives the child workflow result when you
awaitor return the call. - Errors from the called workflow cross a child workflow boundary.
- The child appears as a child workflow in Temporal and in traces.
Checklist
- Remove usage of workflow result
.attributesand.aggregations. - Add hook handlers for
cost:http:requestandcost:llm:requestif you still need usage totals. - Persist hook events or aggregated totals outside the workflow result.
- Replace workflow invocation
optionswith top-levelactivityOptions. - Review every workflow-to-workflow call and treat it as a Temporal child workflow boundary.
- Update tests that assume workflow-to-workflow calls run inside the parent execution.