Title: bug(server): AdcpError raise path bypasses context-echo on MCP and A2A error envelopes · Issue #557 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: bug(server): AdcpError raise path bypasses context-echo on MCP and A2A error envelopes · Issue #557 · adcontextprotocol/adcp-client-python
X Title: bug(server): AdcpError raise path bypasses context-echo on MCP and A2A error envelopes · Issue #557 · adcontextprotocol/adcp-client-python
Description: Bug The MCP and A2A error paths build the structured adcp_error envelope but never echo the request's context extension into the response. The success paths do echo it (inject_context in mcp_tools.py:2030), so any handler that raises Adc...
Open Graph Description: Bug The MCP and A2A error paths build the structured adcp_error envelope but never echo the request's context extension into the response. The success paths do echo it (inject_context in mcp_tools....
X Description: Bug The MCP and A2A error paths build the structured adcp_error envelope but never echo the request's context extension into the response. The success paths do echo it (inject_context in mcp_to...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/557
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(server): AdcpError raise path bypasses context-echo on MCP and A2A error envelopes","articleBody":"## Bug\n\nThe MCP and A2A error paths build the structured `adcp_error` envelope but never echo the request's `context` extension into the response. The success paths do echo it (`inject_context` in `mcp_tools.py:2030`), so any handler that raises `AdcpError` produces a response that violates the AdCP context-echo contract — buyers lose correlation IDs, idempotency hints, and other agent-to-agent state.\n\n## Repro\n\nA handler calls `raise AdcpError('PERMISSION_DENIED', message='nope')`. The wire response carries `structuredContent.adcp_error` but no top-level `context` field, even though the request supplied one.\n\n## Affected paths\n\n- **MCP**: `src/adcp/server/serve.py:1787-1804` — `except ADCPError` and the decisioning-AdcpError branch both call `build_mcp_error_result(exc)` without passing `kwargs` (the raw params).\n- **A2A**: `src/adcp/server/a2a_server.py:237` — `_send_adcp_error` is invoked with `(event_queue, context, exc)` but not the parsed request `params` that carry the wire `context` extension.\n- **Builders**: `src/adcp/server/translate.py:167` (`build_mcp_error_result`) and `src/adcp/server/a2a_server.py:426` (`_send_adcp_error`) take `exc` only, with no surface to receive raw request params.\n\n## Symptom\n\nThree storyboard runners fail on the AdcpError-raise path because the asserted echoed-context fields are missing from error responses.\n\n## Fix\n\n1. Plumb raw params into the error-result builders on both transports.\n2. After building the structured envelope, run `inject_context(raw_params, envelope)` so the `context` field is echoed at the same level the success path uses.\n3. Add tests covering both transports' error path with and without a request `context` field.\n\nPlan to land as a single PR.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-04T09:57:54Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/557"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5b108cc7-2f64-fe63-b435-531420e8f051 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82A0:1201C:D7F43D:120A8BB:6B00FEB6 |
| html-safe-nonce | cc062b706a7d0a8ae39f63528ff5fa73a3735c4ea580e829fd9554f12b7e8267 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkEwOjEyMDFDOkQ3RjQzRDoxMjBBOEJCOjZCMDBGRUI2IiwidmlzaXRvcl9pZCI6IjgzMzgyNDczMDI2MzY0MzcxNzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 602b66e6215380d1080a5d3419b2e20203e1edbc838f3ceabd86b46a6ec3a0e8 |
| hovercard-subject-tag | issue:4375591978 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/557/issue_layout |
| twitter:image | https://opengraph.githubassets.com/58ad962f36fa5b94da90ca61462aa77afbca899749cd44e9e9a661c0394a3b57/adcontextprotocol/adcp-client-python/issues/557 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/58ad962f36fa5b94da90ca61462aa77afbca899749cd44e9e9a661c0394a3b57/adcontextprotocol/adcp-client-python/issues/557 |
| og:image:alt | Bug The MCP and A2A error paths build the structured adcp_error envelope but never echo the request's context extension into the response. The success paths do echo it (inject_context in mcp_tools.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width