Skip to content

v0.9.0: complete versioned exec stream receipts and tool lifecycle metadata #4356

Description

@Hmbown

Problem

Exec-stream JSON now has the foundation for typed terminal outcomes, but the terminal receipt and tool lifecycle are not yet complete enough for replay, support, or cost attribution. Consumers need an additive, versioned contract rather than inferring execution facts from prose.

Evidence

The current release lane distinguishes success, cancellation, model error, tool error, and infrastructure error. It still lacks a complete terminal receipt covering routing, timing, retries, usage/cost inputs, sandbox posture, and artifact/config identity. Tool lifecycle records also need uniform timing, side-effect, error, and truncation metadata.

Expected behavior

  • Keep stdout JSONL-pure in stream mode.
  • Add a schema/version discriminator and additive fields that old consumers may ignore.
  • Emit one terminal receipt with provider/model route, termination reason, typed error category, duration, retry count, usage/cache facts when available, permission/sandbox posture, and relevant binary/config/prompt/tool hashes.
  • Give tool lifecycle events a stable tool name/id, start/end timestamps or duration, side-effect status, typed error, and truncation/artifact metadata.
  • Represent unavailable provider facts as absent/unknown, never fabricated values.

Likely files

  • crates/tui/src/main.rs
  • crates/tui/src/core/events.rs
  • crates/tui/src/core/error_taxonomy.rs
  • crates/tui/src/tools/truncate.rs

Acceptance criteria

  • The stream schema is explicitly versioned and backward-compatible through additive fields.
  • stdout remains valid JSONL with diagnostics confined to stderr/events.
  • Success, model error, tool error, infrastructure error, cancellation, and approval denial each end with an unambiguous receipt.
  • Tool completion events include duration, side-effect status, typed outcome, and truncation/artifact facts.
  • Deterministic tests validate required fields and absence semantics.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyBody is self-sufficient per docs/AGENT_RUNNER.md; a remote agent may claim itbugSomething isn't workingenhancementNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnesssubagentsSub-agent orchestration, lifecycle, and completion handlingtoolsTool execution, tool schemas, tool UX, and built-in tool behaviortuiTerminal UI behavior, rendering, or interactionv0.9.0Targeting v0.9.0workflow-runtimeWorkflow IR, executor, control flow, and replay runtime

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions