Skip to content

fix: treat unsuccessful tool results as errors#234

Merged
buttercannfly merged 1 commit into
AIPexStudio:mainfrom
one241:fix/tool-result-success-false
Jul 24, 2026
Merged

fix: treat unsuccessful tool results as errors#234
buttercannfly merged 1 commit into
AIPexStudio:mainfrom
one241:fix/tool-result-success-false

Conversation

@one241

@one241 one241 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • treat completed tool outputs with success: false as tool_call_error events
  • preserve the tool-provided error or message and use a clear fallback when neither is present
  • keep regular objects, strings, and non-boolean success values on the successful completion path

Root cause

The event adapter relied only on the SDK item status. Some tools report a completed SDK item while returning a business-level failure payload, so those failures were emitted as tool_call_complete.

Testing

  • pnpm --filter @aipexstudio/aipex-core typecheck
  • pnpm --filter @aipexstudio/aipex-core test
  • pnpm -r --if-present typecheck
  • pnpm -r --if-present test
  • pre-push npm run preflight

@buttercannfly
buttercannfly merged commit 6deef6d into AIPexStudio:main Jul 24, 2026
1 check failed
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.

2 participants