﻿# When are ZCode background subtasks really finished?

ZCode 3.19.1 makes background subtasks the default. Distinguish a foreground reply, completed child work and a successful automated run.

Author: Retrivium editorial team
Updated: 2026-11-23
Canonical URL: https://retrivium.ai/journal/daily-20261123-agent-zcode-background-subtask-completion/
Language: en

The November 22, 2026 changelog for ZCode 3.19.1 says subtasks now run in the background by default. It also says a single command-line execution waits for background tasks before exiting. This gives an automation author two useful pieces of information about scheduling. A reviewer still needs evidence that the child work succeeded and that it produced the expected result.

## Define what the parent can promise

A foreground message can report that the parent understood the request, started child work or finished its own part. Choose a status that reflects which of those events happened. For a repository review, one child might still be reading a test report while the parent has already drafted conclusions. The parent can share a provisional result as long as people reading it know what is still pending.

## Make the work products explicit

Give each child a defined output, such as an identified result file or a review summary tied to a named revision. Use distinct destinations for tasks that can run at the same time. If several children need to edit the same file, schedule a merge point where one owner reconciles the results. Background execution can shorten elapsed time while leaving shared-workspace conflicts for the caller to manage.

## Verify exit behavior with a controlled run

Use a small test in which one child finishes normally and another returns a deliberate failure. Measure when the parent speaks, when each child stops and when the command exits. Record the observed process status and check the expected artifacts. The release note establishes waiting behavior. The failure and artifact tests establish how your own automation handles a completed run.

## Surface the final outcome to downstream steps

A deployment or publication job should consume only results that have passed its own acceptance checks. Missing or incomplete results should leave the workflow in a state that can be inspected or retried. Keep the test under the installed version and rerun it when upgrading. That makes the completion boundary visible even if the foreground interface changes.

## Sources

- [ZCode release notes](https://zcode.z.ai/en/changelog)
- [ZCode documentation](https://zcode.z.ai/en/docs/install)

## Related reading

- [Session history boundaries](/journal/daily-20261122-agent-sdk-codex-session-history-boundary/)
- [State across parallel tasks](/journal/daily-20261120-agent-langgraph-send-typed-state-parity/)
