Skip to content

fix(sse): retry advisor 400 with unreadable results marked unavailable - #15103

Merged
diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.52from
cryptiklemur:fix/advisor-undecryptable-retry-upstream
Oct 2, 2026
Merged

diegosouzapw merged 3 commits into
diegosouzapw:release/v3.8.52from
cryptiklemur:fix/advisor-undecryptable-retry-upstream

Conversation

@cryptiklemur

Copy link
Copy Markdown
Contributor

Summary

  • Anthropic encrypts each advisor_redacted_result for the org that made it. when a Claude conversation moves to another account, the new account cant read those results. the request fails with a 400: "Advisor tool result content could not be processed."
  • on that exact 400, BaseExecutor now retries once on the same connection. each advisor_tool_result holding an advisor_redacted_result gets its content swapped for { type: "advisor_tool_result_error", error_code: "unavailable" }. the paired server_tool_use and every other block stay as they are.
  • if the retry fails too, the response falls through to the normal fallback chain.
  • the swap sticks for later fallback URLs in the same execute() call, so they dont re-hit the same 400.
  • helpers live in open-sse/config/providerFieldStrips.ts: isAdvisorUndecryptableError() and replaceRedactedAdvisorResults().
  • also removes four imports in open-sse/executors/base.ts that are unused on this branch, and voids the unused health param. that clears the 5 no-unused-vars suppressions for the file, so its entry is pruned from config/quality/eslint-suppressions.json.

Related Issues

  • none filed.

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path
  • npm run lint: no errors. it exits 2 only because release/v3.8.51 has 5 stale suppressions in unrelated files (openai-to-cursor.ts, SystemStorageTab.tsx, both vscode combos/route.ts, ghe-copilot.ts). the same happens on the base, and --pass-on-unpruned-suppressions exits 0.
  • Reconciled with the current active release base; focused checks rerun afterward
  • Production-code changes include a new or updated automated test in this PR
check result
new test with helpers only, no base.ts change 2 of 6 fail (no retry happens)
new test with the fix 6 of 6 pass
base-executor-*, executor-base-utils, field-400-downgrade, param-filters-auto-learn, provider-field-strips, reasoning-effort-clamp-and-retry, context-editing-executor-injection 150 of 150 pass
eslint (with suppressions) + prettier on touched files clean
live tested on a real cross-account Claude conversation; the retry returned 200

Tests Added Or Updated

  • tests/unit/base-advisor-undecryptable-retry.test.ts (new)

Coverage Notes

  • the test covers the retry and its body, a second failure (no second retry), an unrelated 400, the advisor 400 with no redacted result in the body, the exact-message match, and the no-op case.

Reviewer Notes

  • the match is on the exact error.message string. a reworded Anthropic message will skip the retry and fail the way it does today.
  • the model loses the old advisor advice for that turn. it sees an unavailable advisor error instead of a hard failure.

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.51 to release/v3.8.52 September 29, 2026 15:28
diegosouzapw and others added 2 commits October 2, 2026 01:27
…f executors/base.ts to stay under the frozen size

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw
diegosouzapw merged commit 24ebb1f into diegosouzapw:release/v3.8.52 Oct 2, 2026
47 of 51 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @cryptiklemur — merged into release/v3.8.52; it ships in the next release.

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.

2 participants