Fix persisted run error rendering#4573
Open
KyleAMathews wants to merge 4 commits into
Open
Conversation
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4573 +/- ##
==========================================
- Coverage 57.31% 56.67% -0.65%
==========================================
Files 347 327 -20
Lines 39124 37978 -1146
Branches 11189 10954 -235
==========================================
- Hits 22425 21525 -900
+ Misses 16661 16417 -244
+ Partials 38 36 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Electric Agents Mobile BuildLocal mobile checks ran for commit The EAS Android preview build was skipped because the |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes run error rendering in the agents timeline so handler failures stay attached to the failed run after a refresh. Long or multiline error messages now render using the same expandable event-card pattern as tool calls.
Root Cause
Handler failures were written to the entity
errorscollection without arun_id:The live UI could briefly surface the failure while the failed run was still in memory, but after a refresh the run row only reads errors associated with that run. Without
run_id, the error became a standalone stream error and disappeared from the failed run’s footer.Separately, the UI rendered the full error text inline. Provider/runtime errors can be long or multiline, so the footer could truncate important details with no way to expand them.
Approach
run_id.InlineEventCardfor long or multiline run errors so they follow the same expandable pattern as tool calls:run errorcard with the full message in the card bodyKey Invariants
Non-goals
Trade-offs
The runtime infers the failed run by comparing the pre-handler run-key snapshot to the post-failure run collection, rather than threading a current run id through every handler/agent path. That keeps the change localized to
processWakeand preserves existing agent/run APIs, at the cost of selecting the last newly-created run when a handler creates multiple runs before failing.Using
InlineEventCardmakes long run errors visually heavier than a small inline footer, but it reuses the existing expandable UI pattern instead of adding bespoke details styling.Verification
pnpm install pnpm --filter @electric-ax/agents-runtime exec vitest run test/process-wake.test.ts --reporter=dot pnpm --filter @electric-ax/agents-runtime build pnpm --filter @electric-ax/agents-server-ui run typecheck GITHUB_BASE_REF=main node scripts/check-changeset.mjsFiles changed
packages/agents-runtime/src/process-wake.tspackages/agents-server-ui/src/components/AgentResponse.tsxInlineEventCardfor long or multiline error messages..changeset/run-error-rendering.md