Skip to content

fix(core): preserve provider session failures#34015

Open
kitlangton wants to merge 2 commits into
devfrom
fix/provider-session-failures
Open

fix(core): preserve provider session failures#34015
kitlangton wants to merge 2 commits into
devfrom
fix/provider-session-failures

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • persist thrown and in-band provider failures as typed durable session.next.step.failed events
  • sanitize durable provider errors to bounded categories and safe retry metadata instead of storing provider messages or HTTP details
  • settle unfinished assistant/tool state exactly once and preserve legacy unknown-error decoding

This is the current-dev successor to the closed #33760.

Safety

The durable error contains only a category, stable user-facing message, optional numeric status, retryability, and optional retry delay. Provider response bodies, headers, request URLs, request IDs, credentials, metadata, and raw messages are not persisted.

Failed turns continue to strip provider-native continuation metadata through the existing Session history lowering behavior; that implementation is unchanged here.

Verification

  • Core focused runner/message/schema tests: 92 passed
  • full LLM suite: 281 passed, 30 skipped
  • SDK Next suite: 3 passed
  • repository push hook: 29 package typechecks passed
  • Core, LLM, Schema, SDK, SDK Next, Client, and Server typechecks
  • SDK generation produced the committed output
  • Prettier and git diff --check
  • repository lint: 0 errors
  • downstream @agents/agent typecheck and observer/embedded integration tests: 6 passed against this checkout

The full Core suite passed 1025 tests and hit one unrelated existing macOS watcher failure: .git/HEAD was reported as add where the test expects change; it reproduces standalone.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant