Toward a production harness
This example is deliberately small. A harness meant for real workloads would typically add:
- Sandboxed orchestration scripts: let the model emit a short orchestration program (branching, loops, and reduce steps) and run it inside an isolated interpreter, rather than accepting only a flat list of subtask strings.
- Durable journaling: replace the local JSON file with a store that survives process restarts and is safe under concurrent writers across machines.
- Budget enforcement: track total subagents launched across the whole session, not just per Workflow call, and refuse to exceed a hard cap so a runaway plan cannot exhaust your quota.
The patterns in this example (the mode reminders, standing consent in the tool description, journaling, and a verification wave) carry over unchanged; only the execution substrate around them gets more robust.