Skip to content

fix(runtime): retain possible-effects observations on failure - #111

Draft
danielkov wants to merge 2 commits into
mainfrom
fix/issue-48-effect-provenance
Draft

fix(runtime): retain possible-effects observations on failure#111
danielkov wants to merge 2 commits into
mainfrom
fix/issue-48-effect-provenance

Conversation

@danielkov

@danielkov danielkov commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Retain bounded possible-effects observations across child ACP execution and live root sessions, including detached fork abandonment. Store conservative snapshots in version-4 fatal diagnostics while preserving native tool outcome classification.

Motivation

Related to #48. A failed or cancelled prompt can already have emitted output or invoked tools; losing those observations hides uncertainty from diagnosis.

Impact

This remains a draft, preparatory implementation. Parent-visible typed failure, cancellation, and background metadata still require compatible upstream transport releases. These facts do not establish replay safety and introduce no automatic session recovery.

Technical details

Local observations are cumulative within one live session owner, not exclusive to the failing prompt or reconstructed from persisted history. Local execution receipts reflect actual invocation entry and terminal return; ACP lifecycle statuses remain reports. False means only not observed, and failure snapshots always declare incomplete observation. The bounded metadata excludes prompts, assistant text, tool arguments/results, and provider payloads.

Startup and prompt-preparation failures retain their recording owner without duplicate receipts. Cleanup or flush errors that replace a driver error receive a separate finalization diagnostic. An acknowledged fork handoff assigns recording responsibility to either the caller or detached owner, retaining observations if delivery is abandoned.

Readers retain legacy missing-effects defaults and version-3 effects compatibility while rejecting malformed fields, unknown sources, and false completeness claims. Parent-side observation records are distinct diagnostics, not reconstructed child fatal identities.

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abandoned fork calls can discard captured possible-effects observations before they reach the local fatal diagnostic.

Comment thread src/tools/subagent.rs
@danielkov danielkov changed the title fix(subagents): retain possible-effects observations on failure fix(runtime): retain possible-effects observations on failure Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant