Who does what
| Aspect | You (workflow author) | Cadence/harness |
|---|---|---|
Provider session/response chaining (e.g. previous_response_id) | Nothing — never put these in workflow.md | Threaded automatically per run; handoffs link runs via the event chain |
| Context carried into a run | context block (budgeted brief) | Compiles and injects it |
| Stage-to-stage outputs | state_machine with per-stage output_schema | Validates and passes typed outputs between stages |
| Long-term knowledge | Write to Think (store/canvas/workpad tools) | Persists in your Think vault, queryable later |
| Run history/audit | Nothing | Session ledger — an append-only projection of every harness event (tokens, costs, tool calls, resumes) |
The session ledger (read-only truth)
Every run emits typed events; the ledger chains them (event_id →
parent_event_id), records usage/cost per event, and links runs across
handoffs. It is a projection, never a store: nothing reads it to make
dispatch decisions, so you can rebuild it from the event stream at any time.
Use it for audit (“what did this run cost, which tools fired”), not for
state.
Carrying context into a run
Passing typed state between stages
implement stage receives findings as validated input — no prompt
glue, no provider state juggling.
When to use what
| You want | Use |
|---|---|
| Agent remembers facts across runs | Think store / workpad tools |
| Stage B consumes stage A’s result | state_machine + output_schema |
| Seed a run with background | context block |
| Audit cost/usage | Session ledger (read-only) |
See also
- Workflow Schema — exact shapes
- Structured Output —
output_schemadetails