Skip to content

Report possible effects when a model turn fails after output or tool activity #48

Description

@danielkov

Summary

A failed subagent/model turn does not report whether assistant output or effectful tool activity occurred before failure. The parent therefore cannot distinguish a retry-safe pre-output failure from a failure that may already have produced externally visible effects.

Split from #35. Recovery and reusable-session policy are related to #21; this issue owns the diagnostic facts needed to make that policy safe.

Current behavior

The provider tracks internal state such as whether model output was emitted and whether a tool call was observed, but fatal diagnostics and terminal tool failures do not carry effect provenance. A generic execution failure can therefore hide commit uncertainty.

Desired behavior

Attach explicit, provider-independent possible-effects metadata to terminal failures. At minimum distinguish:

  • no assistant output or tool activity observed;
  • assistant output emitted;
  • tool call emitted;
  • tool execution started;
  • tool execution completed; and
  • unknown or unconfirmed state.

The contract must be conservative: absence of evidence must not be reported as proof that no effect occurred. Use the metadata in both fatal diagnostics and the parent-visible structured failure.

Suggested coverage

  • Failure before any model event.
  • Failure after assistant text output.
  • Failure after a tool call is emitted but before execution.
  • Failure while an effectful tool is running and after it completes.
  • Cancellation and transport loss where completion is unknown.
  • Verify no tool arguments, results, private prompts, or provider payloads are included.

Environment

  • Originally observed with Kit 0.1.96 on Darwin 25.6.0 arm64.
  • Confirmed as a remaining gap on Kit 0.1.105 on Darwin 25.5.0 arm64.
  • Surface: ACP subagents, including compose(background=true).

Related work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions