Run records

What a guarded run leaves behind: execution_envelope.json, task_outcome.json and the phase log.

Overview

Every guarded run writes an append-only directory under <home>/runs/<run_id>/. Two JSON files describe it: execution_envelope.json records how the run was set up, and task_outcome.json records what happened. The observatory and cci-contract close both read them.

Files in a run directory

FileContent
execution_envelope.jsonExecutor identity, sandbox, timeout, baseline, and routing attempts.
task_outcome.jsonFinal state, diagnostic, verify result, mutations, rollback and executor report.
phase_events.jsonlOne event per phase: baseline, executor_start, executor_done, scope_check, verify, decision, rollback.
rejected.patchWritten on rollback: the diff and untracked contents that were reverted.
prompt_bundle.md, executor logsThe prompt sent to the agent and its stdout/stderr.

execution_envelope.json

json
{
  "schema_version": "1.0",
  "run_id": "20261029T100000Z-ready-aaaa1111",
  "guarded": true,
  "contract_id": "contract-123",
  "executor": {
    "name": "minimax:MiniMax-M3",
    "kind": "command",
    "version": "...",
    "sandbox": false,
    "model": "MiniMax-M3"
  },
  "env_passthrough": ["MINIMAX_API_KEY"],
  "timeout_seconds": 1800,
  "baseline": {"head": "<sha>", "branch": "main"},
  "executor_exit_code": 0,
  "routing": {
    "task_class": "simple", "tier_index": 1, "escalations": 1, "stop_reason": "kept",
    "attempts": [
      {"run_id": "...", "tier_index": 0, "executor": "command", "model": "MiniMax-M3",
       "diagnostic_code": "verify_failed", "cost_usd": 0.01},
      {"run_id": "...", "tier_index": 1, "executor": "claude", "model": "sonnet",
       "diagnostic_code": "ready", "cost_usd": 0.4}
    ]
  }
}
  • executor.name is the executor's display label. For vendor tiers it carries the vendor identity (such as minimax:MiniMax-M3) and executor.kind then names the underlying adapter (command). Without a label, name is the adapter name itself and kind is absent.
  • executor.model is the model the run used; sandbox says whether the executor's sandbox was active.
  • routing appears only for runs started with --task-class. stop_reason is one of kept, non_retryable, max_escalations, last_tier, budget, blocked_after_escalation.
  • Each routing attempt has its own run directory; the final attempt's directory is authoritative.

task_outcome.json

FieldMeaning
state, statusready / degraded / blocked, and success / failed / blocked.
diagnostic_code, next_commandMachine-readable reason (for example verify_failed) and the command to run next.
verify_ok, verify_exit_code, verify_stdout, verify_stderr, failed_commandThe verify result. verifier_was_skipped is true when verify never ran.
mutated_files, attempted_mutations, accepted_mutations, blocked_mutations, unexpected_mutationsWhat the agent changed, split into kept and refused paths. mutated_files is empty for a rolled-back run.
rollback_performed, rollback_stdout, rollback_stderrWhether the tree was reverted and the git output of the revert.
contract_id, acceptance_state, allowed_files, forbidden_pathsThe contract in force. Without a contract the acceptance state is raw_run_not_contract_accepted.
executorObject with name, version, exit_code, timed_out, duration_seconds, sandbox, self_status, cost_usd and turns. Cost lives here as executor.cost_usd (null when the executor does not report it).
schema_version, guarded, wall_time_seconds, scope_violationsOutcome schema v1 fields. Readers ignore unknown fields. Violations carry kind, path and detail.

Routing is deliberately not written to the outcome; it lives in the envelope, so the outcome keeps its v1 shape.

Reading them

bash
RUN=~/.codified-orchestrator/runs/<run_id>
python3 -m json.tool $RUN/task_outcome.json | head -40
python3 -m json.tool $RUN/execution_envelope.json
cco trace <run_id>
ℹ️

Run artifacts may contain prompts, source code and command output. They are redacted by default; --no-redact turns that off. Treat the runs directory as sensitive.