feat: expose tool failure modes and handling diagnostics - #423
Conversation
There was a problem hiding this comment.
Effect Agent review
Caution
This attempt is incomplete because the pull request moved to a newer commit.
No findings were published from this attempt.
This notice records the attempt on the inspected commit. The newer commit still needs its own review.
There was a problem hiding this comment.
Effect Agent review
Tip
No actionable findings.
| Scope | Files | New findings |
|---|---|---|
| Full diff | 13 reviewed | ✅ None |
Summary
No concrete defects found in the supplied change.
8 model calls · 140,391 input (1,832 uncached · 112,988 cached · 25,571 cache write; 80.5% cache reads) / 730 output tokens · ≈ $0.9749 at GPT-6 Astra rates · $20.396890 spending ceiling · inspected at 2b4bcbc · 3 automatic reviews remain
Bundle size
Minified ESM for es2022, browser target, including Effect and other dependencies. Gzip is measured per chunk. Initial includes statically imported shared chunks; deferred is the remaining output. New exports have no prior baseline. Chunks, module analysis, and exact bytes for |
Runtime performanceInformational medians in milliseconds, nine samples per workload and revision. Same fixture bytes and Node runtime; separate lockfiles and public builds.
Raw samples, spread, cold process totals, failures, environment, and exact revisions for |
Effect's default
failureMode: "error"can end an agent run even when a tool declares a failure schema. Tool failure events and telemetry previously did not distinguish these propagated failures from failures returned as results.Add
Agent.inspectToolsfor inspecting the native configuration of a Definition or Binding without acquiring handlers or a model:ToolCallFailedgains optionalfailureModeandfailureHandlingfields. Application tool spans and terminal logs expose the same distinction througheffect_agent.tool.failure_modeandeffect_agent.tool.failure_handling:propagated,returned-to-model, orreturned-to-callerfor broker outcomes. Older events remain decodable with an unknown route.The configured mode is not a fatal/recoverable boolean: a defect can propagate under
"return", and the broker can contain a typed failure under"error".returned-to-modelidentifies the result path; delivery still requires the complete batch to commit and another model call. Preserve native failure behavior and error/service inference, and document the observer's scope and strict preflight validation.Validation:
vp run readypassed, including the full test suite, package checks, documentation examples, and builds. Focused coverage also passed all 196 tests across inspection, schema compatibility, runtime diagnostics, broker outcomes, and failure observers; explicit core/engine type checks passed.Related upstream documentation PR: Effect-TS/effect#8156.