Reports what the agent did for the current step. The engine records it, chooses the next transition, runs any engine-executed steps, and returns the next agent-facing instruction — or the end of the run.
Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
instance_id |
string | yes | The instance from ccw_start. |
result.status |
"success" | "failure" |
yes | Whether the step succeeded. For a shell step, success only when the exit code is one the step expects. |
result.summary |
string | no | A brief account of what was done. Stored as {{steps.<name>.summary}}. |
result.output |
any | no | Structured output. Stored as {{steps.<name>.output}} — later steps can only use what is reported here. |
result.branchLabel |
string | no | For a decision step: the chosen branch, by label. Preferred over transitionId. |
result.transitionId |
string | no | For a decision step: the chosen branch, by transition id. |
result.metadata |
object | no | Agent-specific debugging metadata. Not used by the engine. |
Returns
The same shape as ccw_start: the next instruction with status: "continue", a gate with status: "waiting", or a terminal completed, failed or stopped with a message.
What the engine does with the result
- The result is stored by step name.
{{steps.Run Tests.output}}in a later prompt resolves to what was reported here. Reporting nothing inoutputmeans later steps have nothing to read. - Decision steps branch on it. The engine looks, in order, at
result.transitionId, thenresult.branchLabel(matched case-insensitively against the step's labels), thenoutput.transitionId/output.branch, then the step's default branch. If nothing matches, the instance fails. ReportbranchLabelexplicitly. - Shell steps are checked against their contract. The
systemGuidancefor a shell step spells out what to report:exitCode,stdout,stderr,durationMs, and when the step captures to a file,capturedFileandoutputHash— the sha256 the wrapped command printed.statusissuccessonly for an expected exit code. - Review steps route on the verdict. Report
output.verdictas"approved"or"revise"withoutput.findings;revisesends the workflow back to the step under review. - Gates are answered here too. A gate arrives as
status: "waiting"with amessage. The agent puts the question to the person in its session, then callsccw_continuewith their answer —status: "success"to approve,"failure"to reject — and a summary of what they said. There is no separate approval tool or screen.
Example — a decision
{
"instance_id": "inst_7Hq2…",
"result": {
"status": "success",
"summary": "12 tests ran, 2 failed in auth.test.ts",
"output": { "passed": 10, "failed": 2 },
"branchLabel": "FAIL"
}
}Example — answering a gate
{
"instance_id": "inst_7Hq2…",
"result": { "status": "success", "summary": "Approved by Wim: deploy v2.4 to production" }
}