Skip to content

fix(runtime): report rejected CUSTOM_JWT invocations - #2751

Open
jariy17 wants to merge 3 commits into
v1.xfrom
fix/custom-jwt-error-response
Open

jariy17 wants to merge 3 commits into
v1.xfrom
fix/custom-jwt-error-response

Conversation

@jariy17

@jariy17 jariy17 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CUSTOM_JWT invocation failures were converted to SilentCLIError before any response output was written. Rejected bearer tokens therefore exited unsuccessfully without explaining the HTTP failure.

Fix

  • represent Runtime invocation results as an explicit stream or rejected response
  • cancel rejected CUSTOM_JWT response bodies without reading or parsing them
  • report the HTTP status and request ID through the existing Runtime response writer
  • render the same status-only failure in the interactive Runtime console
  • keep transport failures visible and prevent rejected evaluation responses from being treated as model output
  • preserve the existing silent root error only after a writer has emitted the failure summary

Validation

  • bun test — 4,707 passed, 6 skipped
  • affected Runtime suites — 116 passed
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • bun run build
  • real READY CUSTOM_JWT Runtime with a synthetic invalid token: raw, JSON, output-file, stdin-token, and TUI paths each reported one HTTP 403 failure with no response bytes or token disclosure

bun run audit could not complete because the configured registry audit endpoint returned HTTP 404.

Closes #2745

@jariy17
jariy17 requested a review from a team November 3, 2026 21:15
@github-actions github-actions Bot added the size/l PR size: L label Nov 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress and removed agentcore-harness-reviewing AgentCore Harness review in progress labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-1.0.1.tgz

How to install

gh release download pr-2751-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.0.1.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026
@github-actions github-actions Bot added size/l PR size: L and removed size/l PR size: L labels Nov 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/l PR size: L labels Nov 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Nov 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CUSTOM_JWT runtime invocation fails silently for rejected bearer tokens

1 participant