CodyCody

MCP tools

ccw_continue

Report the result of the current step and receive the next instruction. The same call completes an instruction, a decision, a shell command, a review and an approval gate.

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 in output means later steps have nothing to read.
  • Decision steps branch on it. The engine looks, in order, at result.transitionId, then result.branchLabel (matched case-insensitively against the step's labels), then output.transitionId / output.branch, then the step's default branch. If nothing matches, the instance fails. Report branchLabel explicitly.
  • Shell steps are checked against their contract. The systemGuidance for a shell step spells out what to report: exitCode, stdout, stderr, durationMs, and when the step captures to a file, capturedFile and outputHash — the sha256 the wrapped command printed. status is success only for an expected exit code.
  • Review steps route on the verdict. Report output.verdict as "approved" or "revise" with output.findings; revise sends the workflow back to the step under review.
  • Gates are answered here too. A gate arrives as status: "waiting" with a message. The agent puts the question to the person in its session, then calls ccw_continue with 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" }
}