Skip to content

ADCPTaskError drops errors[0].recovery on stable releases (AUTH_MISSING sent as terminal) #1261

Closed

Description

@bokelley

Problem

In 6.6.0, raising ADCPTaskError(operation=..., errors=[Error(code=..., recovery=Recovery.correctable)]) sends the error with the code table's recovery, not the one on errors[0]. adcp/server/translate.py::_extract_structured_fields handles ADCPError by calling _recovery_for_code(code), which ignores errors[0].recovery. AUTH_MISSING isn't in the 6.6.0 STANDARD_ERROR_CODES table, so it falls back to terminal.

Seen in production: a seller set Recovery.correctable on AUTH_MISSING, and every response still said "recovery": "terminal".

main fixes it (recovery = first_info.recovery or recovery for ADCPTaskError), but the fix is only in the 8.0 prereleases (present in v8.0.0-rc.3, absent in v7.0.2, v7.0.0, v6.8.0, v6.7.0).

Ask

  • Backport the fix to a stable 7.x release (and 6.x if still supported).
  • Add AUTH_MISSING / AUTH_INVALID to STANDARD_ERROR_CODES on the stable lines, so the fallback is right even when a recovery isn't set.
  • Workaround meanwhile: raise adcp.decisioning.AdcpError("AUTH_MISSING", message=..., recovery="correctable"), which passes recovery through.

Activity

  1. added
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 30, 2026
  2. bokelley commented on Sep 30, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Bug
    Bucket(s): handlers (no handlers label in repo — noted in run summary)
    Status: ready-for-human
    Milestone: (omitted — backport scope requires policy decision)

    What the experts said:

    • code-analysis: Bug confirmed. _extract_structured_fields (translate.py:172–185) sets recovery = _recovery_for_code(code) before entering the ADCPTaskError branch; the fix recovery = first_info.recovery or recovery is present on main but absent on the 7.x stable line. Two-part backport needed: (1) cherry-pick the translate.py fix; (2) ensure AUTH_MISSING/AUTH_INVALID appear in the ADCP spec schema cache for the spec version 7.x was pinned to.
    • schema-analysis: In the current main schema (ADCP spec 3.2.0-rc.7), AUTH_MISSING → correctable and AUTH_INVALID → terminal, both present. AUTH_REQUIRED is a deprecated correctable alias retained through the 3.x deprecation window. The 6.x/7.x spec version would need to be checked — if those codes were absent in that spec snapshot, the schema cache for that bundle key would need updating alongside the translate.py cherry-pick.

    My take: The fix on main is correct and the bug is real. The remaining work is entirely a backport and release-maintenance question: no 7.x or 6.x maintenance branch is visible in the repo, so the first call is whether the project intends to cut a 7.0.3 from the v7.0.2 tag.

    What needs a human:

    • Decide whether 7.x (and/or 6.x) is still in the support window.
    • If yes: create a release/7.x branch from v7.0.2, cherry-pick the translate.py fix (commit that introduced first_info.recovery or recovery), confirm what ADCP spec version 7.x was pinned to, and add AUTH_MISSING/AUTH_INVALID to that spec's schema cache if absent — then release 7.0.3.
    • Workaround (already noted in the issue): adcp.decisioning.AdcpError("AUTH_MISSING", message=..., recovery="correctable") passes recovery through the decisioning path, which does not hit the code-table lookup.

    Triaged by Claude Code. Session: https://claude.ai/code/session_01VCdwjoHt84UHPHmUWUdggn


    Generated by Claude Code

  3. added
    bugSomething isn't working
    and removed
    claude-triagingTriage routine is actively working on this issue (1-3 min)
    on Sep 30, 2026
  4. added a commit that references this issue on Oct 1, 2026
    23277cf
  5. bokelley commented on Oct 1, 2026

    @bokelley
    ContributorAuthor

    Fixed in adcp 7.0.3, now on PyPI (pip install -U "adcp>=7.0.3,<8"):

    • ADCPTaskError now sends the recovery set on errors[0] instead of the error-code table's default, so Recovery.correctable on AUTH_MISSING goes out as correctable.
    • AUTH_MISSING (correctable) and AUTH_INVALID (terminal) are in STANDARD_ERROR_CODES, so the default is right even when no recovery is set.

    After upgrading you can drop the adcp.decisioning.AdcpError(..., recovery="correctable") workaround. The 8.0 prereleases already had both fixes. 6.x was not backported.

    Backport: #1263 · Release: https://github.com/adcontextprotocol/adcp-client-python/releases/tag/v7.0.3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions