Skip to content

fix: show alternate streamed error text safely - #196

Merged
AetherAI3 merged 1 commit into
mainfrom
fix/empty-stream-error
Sep 27, 2026
Merged

AetherAI3 merged 1 commit into
mainfrom
fix/empty-stream-error

Conversation

@AetherAI3

Copy link
Copy Markdown
Owner

Summary

Some streamed failure frames carry a user-facing error string instead of msg or message. The 0.4 client discarded that string and showed only its generic failure text. Normalize the first nonblank string among msg, message, and error, while continuing to omit the raw reason field.

The existing 0.4 turn lifecycle already treats an empty error frame as a failed turn with exit code 1. This change preserves that behavior and makes the server's available error text visible.

Verification

  • npm run build
  • node --test --test-isolation=none dist/test/stream.test.js dist/test/turn_lifecycle.test.js (38 passed)
  • git diff --check

Synthetic regressions cover canonical field precedence, a blank msg with an error fallback, non-string error, hidden reason, sanitized terminal controls, a trailing done frame, and nonzero one-shot exit.

No package tag or publication is included.

@AetherAI3
AetherAI3 merged commit 0a21c4f into main Sep 27, 2026
9 checks passed
@AetherAI3
AetherAI3 deleted the fix/empty-stream-error branch September 27, 2026 22:12
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