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
| File | Content |
|---|---|
execution_envelope.json | Executor identity, sandbox, timeout, baseline, and routing attempts. |
task_outcome.json | Final state, diagnostic, verify result, mutations, rollback and executor report. |
phase_events.jsonl | One event per phase: baseline, executor_start, executor_done, scope_check, verify, decision, rollback. |
rejected.patch | Written on rollback: the diff and untracked contents that were reverted. |
prompt_bundle.md, executor logs | The 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.nameis the executor's display label. For vendor tiers it carries the vendor identity (such asminimax:MiniMax-M3) andexecutor.kindthen names the underlying adapter (command). Without a label,nameis the adapter name itself andkindis absent.executor.modelis the model the run used;sandboxsays whether the executor's sandbox was active.routingappears only for runs started with--task-class.stop_reasonis one ofkept,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
| Field | Meaning |
|---|---|
state, status | ready / degraded / blocked, and success / failed / blocked. |
diagnostic_code, next_command | Machine-readable reason (for example verify_failed) and the command to run next. |
verify_ok, verify_exit_code, verify_stdout, verify_stderr, failed_command | The verify result. verifier_was_skipped is true when verify never ran. |
mutated_files, attempted_mutations, accepted_mutations, blocked_mutations, unexpected_mutations | What the agent changed, split into kept and refused paths. mutated_files is empty for a rolled-back run. |
rollback_performed, rollback_stdout, rollback_stderr | Whether the tree was reverted and the git output of the revert. |
contract_id, acceptance_state, allowed_files, forbidden_paths | The contract in force. Without a contract the acceptance state is raw_run_not_contract_accepted. |
executor | Object 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_violations | Outcome 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.