Skip to content

fix: sanitize the failure text stored on a failed run - #898

Open
16francej wants to merge 1 commit into
mainfrom
fix-sanitize-run-failure-reason
Open

fix: sanitize the failure text stored on a failed run#898
16francej wants to merge 1 commit into
mainfrom
fix-sanitize-run-failure-reason

Conversation

@16francej

@16francej 16francej commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

A failed run stored the raw thrown error as its user-facing reason, so clients rendered internal error text even though the durable transcript already replaces it with a generic message — the same failure changed wording on reload. The stored reason now goes through the existing turnFailureMessage helper: one conversion from internal error to user-facing text, shared by every surface. The raw error still reaches the caller and the operator error log.

  • new regression test fails without the change
  • verified over HTTP: GET /v1/runs/:id no longer carries internal error text
  • tsc, eslint, oxlint, prettier, tests green

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

A failed run stored the raw thrown error as its user-facing reason, so clients
rendered internal error text even though the durable transcript already replaces
it with a generic message — the same failure changed wording on reload.

Route the stored reason through the existing turnFailureMessage helper so there
is one conversion from an internal error to user-facing text, shared by every
surface that reads it. The raw error still propagates to the caller and to the
operator error log.

Co-Authored-By: Claude <noreply@anthropic.com>
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