Skip to content

fix(runtime): polish invoke TUI errors and sessions - #1930

Merged
aidandaly24 merged 6 commits into
refactorfrom
fix/runtime-invoke-tui-polish
Aug 6, 2026
Merged

fix(runtime): polish invoke TUI errors and sessions#1930
aidandaly24 merged 6 commits into
refactorfrom
fix/runtime-invoke-tui-polish

Conversation

@aidandaly24

@aidandaly24 aidandaly24 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • surface available error names and messages for every non-abort Runtime lookup, invocation, and response-stream failure
  • render modeled AWS service failures as a structured type, HTTP status, message, and request ID while preserving redaction for arbitrary transport causes
  • generate and display a Runtime session ID before the first TUI send, while honoring --session-id
  • remove the redundant JSON payload heading and trailing response whitespace before settled metadata

Testing

  • bun test src/core/core.test.ts src/handlers/runtime/invoke/invoke.screen.test.tsx (60 pass)
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • TUI Harness: successful live invocation without --session-id; generated ID persisted in request and response
  • TUI Harness: intentionally short session ID rendered the AWS ValidationException type, HTTP status, complete message, and request ID on separate lines
  • TUI Harness: final SSE event now renders directly above session metadata while preserving spacing between events
  • bun test src: the only failures were two unchanged src/io/exec.test.ts subprocess-output assertions that reproduce when run alone in this environment

@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 6, 2026
@codecov-commenter

codecov-commenter commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.29%. Comparing base (ae6e810) to head (32b42f6).
⚠️ Report is 1 commits behind head on refactor.

Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #1930   +/-   ##
=========================================
  Coverage     96.28%   96.29%           
=========================================
  Files           245      245           
  Lines         12105    12130   +25     
=========================================
+ Hits          11655    11680   +25     
  Misses          450      450           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 6, 2026

@AlexanderRichey AlexanderRichey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a couple comments we might want to address in a follow up.

Comment thread src/core/runtime.tsx
@@ -194,7 +199,10 @@
})
.debug("Runtime invocation SDK request failed");
throw new Error(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an AgentCoreError?

Comment thread src/core/runtime.tsx
if (typeof sdkError?.name === "string" && sdkError.name !== "Error") {
diagnostics.push(sdkError.name);
}
if (typeof sdkError?.$metadata?.httpStatusCode === "number") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is all of this complexity necessary? Why not simply throw the error? All of these details should already be handled in the error message, no? If they're not handled, then extracting this complexity into a reusable helper would help to simplify the main flow at this level.

@aidandaly24
aidandaly24 merged commit 259e314 into refactor Aug 6, 2026
8 checks passed
@aidandaly24
aidandaly24 deleted the fix/runtime-invoke-tui-polish branch August 6, 2026 19: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.

5 participants