# Code Mode and subagent card facts
Schema-1 [tool cards](local-agent-tool-cards.md) publish these facts in `results` blocks. Match exact labels, not report prose. Every row contains `label`, nullable `value`, and `outcome:"unknown"`; row outcomes never override card outcomes. Counts and milliseconds are base-10 integer strings. Booleans are `"true"` or `"false"`. Missing evidence is null, not zero or false.
Mission Control and local-agent cards use the same fact selectors. Local-agent child references use mapped public IDs; `Task execution identity` is a bounded historical execution label, not a public navigation ID. Use `activity_id`, `parent_activity_id`, and `task_id` for navigation. Never derive ancestry by splitting an execution label.
## Code Mode
| Label | Meaning |
| --- | --- |
| `Script outcome` | `running`, `success`, `failure`, `cancelled`, `interrupted`, or `unknown`. Independent of child-call outcomes. |
| `Code Mode intent` | Sanitized submitted intent, when recorded. |
| `Total calls` | Host-observed child calls, including unfinished calls. |
| `Successful calls` | Child calls with successful results. |
| `Failed calls` | Child calls with failed results. A script can handle these and succeed. |
| `Unknown calls` | Calls with no known result when execution ends. |
| `Running calls` | Zero in a terminal execution report; null without such a report. |
| `Elapsed milliseconds` | Measured whole-batch elapsed time; not reconstructed from history timestamps. |
| `Recoverable failures` | Failed child calls returned to the script; does not claim the script recovered each failure. |
| `Warnings` | Warning events, including repeated messages, before preview selection. |
| `Changed paths` | Distinct tracked, sanitized paths before preview selection. |
| `Change count qualifier` | `exact` for complete tracking, `at_least` after tracking limits, redaction, or shortening may merge/exclude paths. |
| `Response token estimate` | Existing response estimate when recorded; not provider billing usage. |
| `Execution persistence` | `recorded` after required result append, `unavailable` without a session, or null before confirmation. Saved records establish `recorded`. |
| `Completed with warnings` | For script success: true if any failed/unknown child or warning is known; false only when all three counts are known zero. Otherwise null. |
| `Warnings omitted` | Warning total minus currently displayed `Warning` rows. |
| `Changed paths omitted` | Tracked-path count minus currently displayed `Changed path` rows; a lower bound when count qualifier is `at_least`. |
| `Child references complete` | Whether the known call total equals currently displayed child references; null without a known consistent total. |
| `Child references omitted` | Known call total minus displayed references; null without a known consistent total. |
| `Completed actions remain applied` | Always true: completed effects are not undone by a later failure. Does not assert that a mutation occurred. |
| `Rollback` | Always false: no automatic rollback. |
| `External effects may be untracked` | Always true: tracked paths are not an inventory of shell/network/external effects. |
Warning storage retains at most 32 sanitized messages of 512 UTF-8 bytes each, with a separate event count. Cards show at most two `Warning` rows. Path tracking retains at most 1,000 paths, the execution report at most 50, and card previews at most three `Changed path` rows. Optional preview loss cannot erase aggregate counts or safety facts. Wire omission counts are recomputed after card reduction.
Interrupted saved Code Mode calls use host-owned nested call/result/warning records attached to an unambiguous preceding parent in the same turn. Duplicate parent IDs suppress reconstructed facts. Missing measurements remain null. Reopening never reruns a script or scans current files to invent prior effects.
Mission Control marks unfinished replayed tools as interrupted, not running. Completed child outcomes and recorded effects remain unchanged, including when another turn follows the interruption.
## Subagent batches
| Label | Meaning |
| --- | --- |
| `Tasks total` | Validated original task count, not visible child count. |
| `Tasks done` | Tasks with successful terminal outcomes. |
| `Tasks failed` | Tasks with failed terminal outcomes. |
| `Tasks running` | Tasks observed started without a terminal outcome. |
| `Tasks unknown` | Tasks not yet observed started, or tasks whose terminal outcome is unavailable. |
| `Tasks cancelled` | Tasks with observed cancellation. |
| `Child references complete` | Whether known task total equals displayed task references. |
| `Child references omitted` | Known task total minus displayed references. |
The five outcome counts partition the original task set. Terminal reports contain no running tasks: unfinished/abandoned tasks become unknown, not failed or successful. The scheduler's older coarse failure status does not override explicit unknown telemetry. No report → all batch counts null. A separate `Tasks finished` progress block is display progress, not an authoritative outcome aggregate.
The host captures task events before best-effort delivery. Live batch snapshots follow task start/finish events. Final telemetry is selected before output truncation and stored with the required parent result. Omitted child cards do not change the totals. Final task details arriving before a child are retained within existing run byte/identity budgets and applied only to its matching declared parent and execution identity.
## Tasks
| Label | Meaning |
| --- | --- |
| `Task execution identity` | Real scoped backend task identity, when recorded. |
| `Task intent` | Sanitized task intent; never task context. |
| `Task profile` | Selected identity profile, if supplied. |
| `Task agent` | Selected agent/persona label, if supplied; not inferred from profile. |
| `Task provider`, `Task model` | Actual child selection from child startup, when available. |
| `Task outcome` | `running`, `success`, `failure`, `cancelled`, `unknown`, or null. |
| `Task persistence` | `recorded`, `unavailable`, `not_confirmed`, or `not_recorded`. Last value means a legacy saved result lacks the telemetry report. |
| `Task facts limited` | Whether selected telemetry text/activity was shortened or capture exceeded its bound. |
| `Task changed paths` | Distinct paths in the child result before parent output truncation; null without a reliable terminal result. |
| `Task failed calls`, `Task unknown calls` | Direct child-tool failures and calls without definitive success/failure results. Not recursive batch totals. |
| `Task calls with effects` | Direct child-tool results whose shared card projection reports applied/partial changes. |
| `Task activity count` | Count of permitted captured activity summaries, including omitted summaries; null without complete capture accounting. |
| `Task activity omitted` | Activity count minus currently displayed `Task activity` rows. |
| `Usage provenance` | `normalized_provider_usage` when child normalized usage exists, otherwise null. |
| `Usage effective input tokens`, `Usage output tokens` | Normalized whole-task input/output tokens. Effective input includes cache-read input under the existing provider normalization contract. |
| `Usage cache read tokens`, `Usage cache known` | Whole-task cache facts; count null when cache accounting is unavailable. |
| `Usage latest request sequence` | Recorded child request sequence, not a timestamp. |
| `Usage latest effective input tokens`, `Usage latest output tokens`, `Usage latest cache read tokens` | Latest normalized request values; cache count null when latest cache accounting is unavailable. |
| `Usage latest final` | Whether latest normalized request snapshot is final; not task completion. |
Only sanitized tool names and classified statuses enter `Task activity` rows. No reasoning, raw output, task context, arbitrary metadata, credentials, or private assessments. Selection strings/activity entries are at most 240 UTF-8 bytes; at most eight activity entries/task. Direct-call tracking is capped at 4,096 calls/batch. Beyond that cap, affected task call/activity counters become unavailable rather than claiming complete counts.
The owned report has schema version 1, at most ten tasks, and at most 65,536 serialized bytes. Original task indices, nonduplicated scoped identities, bounded strings, outcome values, original task count/intent, and explicitly present nullable fields are validated before projection. Nested usage must round-trip without defaults inventing absent fields. Live task binding additionally checks exact parent-scoped identity. Legacy records can supply independently recorded intent/selection/result/usage; missing telemetry stays null with `not_recorded`, never reconstructed from output text.
## Reduction, persistence, and verification
All existing card/frame/run/history bounds apply. Reduced cards retain nullable failure/unknown/effect counts, collection omissions, and Code Mode safety markers; optional intent, selection, usage, and activity may be omitted explicitly. If the required escaped core exceeds its reserved bytes, normal content-limit failure applies rather than silent safety loss.
Live delivery alone never establishes persistence. Required parent-result append confirms live persistence; exact saved records establish saved persistence. Ephemeral progress without a saved result is not promoted into a durable report. Completed effects survive cancellation, missing delivery, and missing telemetry. No automatic replay or rollback is authorized by these facts.
Compilation and static analysis do not establish live/final/exact-reopen correctness. Release acceptance requires separately authorized original-run observations for mixed outcomes, warning/path overflow, recovered failures, cancellation/partial effects, concurrent tasks, out-of-order updates, legacy missing telemetry, and Mission Control/local-agent agreement. Synthetic records and current-file scans cannot substitute for that evidence.