Skip to content

fix : tool call result handling to display denied tool reasons - #1397

Merged
harshil-2096 merged 3 commits into
mainfrom
bugfix/hv/tool-call-denial-reason-appears-as-an-error
Nov 16, 2026
Merged

harshil-2096 merged 3 commits into
mainfrom
bugfix/hv/tool-call-denial-reason-appears-as-an-error

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes AGE-2797

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
Narrow UI payload shape change in assistant-ui-runtime; isError behavior is unchanged.

Overview
Denied tool approvals now synthesize tool-call results with a reason field instead of error, so the assistant UI can show the denial explanation in the right place. The default message remains Tool approval denied when no reason is provided.

This is applied consistently when building assistant content from approval decisions (modelMessageContent) and when recording a deny in the peer-thread fold (toolApproval). The fold test expectation was updated to match.

Reviewed by Cursor Bugbot for commit 2c13e4a. Bugbot is set up for automated code reviews on this repo. Configure here.

@veria-ai

veria-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@changeset-bot

changeset-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c13e4a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge-assistant-ui-runtime Patch
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@harshil-2096
harshil-2096 enabled auto-merge (squash) November 16, 2026 11:56
@harshil-2096
harshil-2096 merged commit 1f8966c into main Nov 16, 2026
13 checks passed
@harshil-2096
harshil-2096 deleted the bugfix/hv/tool-call-denial-reason-appears-as-an-error branch November 16, 2026 12:00
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