Skip to content

Child agent results carry a machine-built receipt (diff, out-of-scope files, commands+exit codes, test counts, time, spend) #6492

Description

@Hmbown

Gap. A child's final report is prose written by the child itself. Parents, human or model, have to re-verify every claim with git and CI, and files the child changed without declaring them go unnoticed.

Change. When a child finishes, whether completed, cancelled, out of budget or failed, the harness attaches a receipt built from its own records, never from the child's text:

  • Files: git diff --stat against the child's start commit (worktree or shared tree), plus a list of files changed outside the declared write scope, flagged.
  • Commits: the ones the child created.
  • Commands: every shell or command run, with exit code and duration. Truncate to the last N, keeping failures.
  • Tests: counts parsed from known runner outputs (cargo test, nextest, node --test, npm test, pytest). Each count is marked with the command it came from. Never inferred.
  • Cost: wall time, steps, tokens, and spend where priced.

Where it goes

  • The model sees it in the subagent_completion runtime event and in agent status/wait.
  • The person sees it in the agent card.
  • It is written to the child's record.

Size limits. Keep it compact. The model can page the full list with retrieve_tool_result.

Tests

  • receipt_lists_out_of_scope_file_changes
  • receipt_commands_include_exit_codes
  • receipt_test_counts_parsed_from_cargo_output
  • receipt_built_from_harness_records_not_child_text
  • receipt_present_on_cancel_and_budget_end

Size: M/L.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions