Skip to content

fix(ui): render Agent tool errors verbatim - #195

Open
xz-dev wants to merge 1 commit into
tintinweb:masterfrom
xz-dev:fix/agent-tool-error-rendering
Open

fix(ui): render Agent tool errors verbatim#195
xz-dev wants to merge 1 commit into
tintinweb:masterfrom
xz-dev:fix/agent-tool-error-rendering

Conversation

@xz-dev

@xz-dev xz-dev commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render Agent invocation/tool errors from Pi's public ToolRenderContext.isError as their actual result text
  • fall back to result text when renderer details are missing, empty, or carry an unknown status
  • preserve structured rendering for valid Agent lifecycle states

Previously, an error result with details: {} could fall through to the terminal-status branch and display Aborted (max turns exceeded) instead of the real startup error.

Tests

  • npx vitest run test/agent-tool-error-rendering.test.ts — 4 passed
  • npm run lint
  • npm run typecheck
  • npm run test — 823 passed, 5 skipped
  • npm run build

Independent review: C0/I0/M0.

Use Pi’s public render context to distinguish invocation failures from structured Agent lifecycle results. Fall back to result text for missing or unknown details instead of inferring a max-turn abort.
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 2, 2026
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 4, 2026
xz-dev added a commit to xz-dev/pi-subagents-tintinweb that referenced this pull request Aug 4, 2026
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