fix(weave): show contentless agent errors in conversations - #7724
Merged
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Base automatically changed from
codex/surface-otel-exception-details
to
master
August 11, 2026 18:21
bcsherma
force-pushed
the
codex/show-contentless-agent-errors
branch
from
August 11, 2026 18:23
7a3c926 to
6f16a48
Compare
bcsherma
marked this pull request as ready for review
August 11, 2026 18:24
nikumar1206
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Keep errored chat spans in the agent conversation projection even when they have no output text or reasoning. The API emits an empty assistant message carrying the span ID, timing, model, and
ERRORstatus, so the existing conversation and turn timeline can show the failure.Why
The conversation badge counts every
ERRORspan, butbuild_chat_messagespreviously dropped content spans without renderable content. A failed streaming chat call could therefore contribute to the badge while disappearing from the turn timeline and conversation view.How
_emit_assistant_messagestill omits empty successful spans. It now emits a message whenstatus_code == "ERROR", using the existing assistant-message schema and status rendering.This does not require an API schema change or migration.
Testing
uv run --group test python -m pytest tests/trace_server/test_genai_chat_view.py -q(56 passed, 1 expected failure)uvx ruff check weave/trace_server/agents/chat_view.py tests/trace_server/test_genai_chat_view.pyuvx ruff format --check weave/trace_server/agents/chat_view.py tests/trace_server/test_genai_chat_view.pyAnything Else?
This PR is stacked on the exception-event detail fallback because the same contentless error span should expose its exception details when opened from the conversation.