Title: Typed dispatcher rejects valid request when `account` is omitted on auth-resolved tools · Issue #623 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: Typed dispatcher rejects valid request when `account` is omitted on auth-resolved tools · Issue #623 · adcontextprotocol/adcp-client-python
X Title: Typed dispatcher rejects valid request when `account` is omitted on auth-resolved tools · Issue #623 · adcontextprotocol/adcp-client-python
Description: Problem The library's typed dispatcher rejects requests on tools where the spec declares `account` optional — specifically when the seller resolves identity from the auth chain and the buyer doesn't send a top-level `account` ref. Affect...
Open Graph Description: Problem The library's typed dispatcher rejects requests on tools where the spec declares `account` optional — specifically when the seller resolves identity from the auth chain and the buyer doesn'...
X Description: Problem The library's typed dispatcher rejects requests on tools where the spec declares `account` optional — specifically when the seller resolves identity from the auth chain and the buyer do...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/623
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Typed dispatcher rejects valid request when `account` is omitted on auth-resolved tools","articleBody":"## Problem\n\nThe library's typed dispatcher rejects requests on tools where the spec declares \\`account\\` optional — specifically when the seller resolves identity from the auth chain and the buyer doesn't send a top-level \\`account\\` ref.\n\nAffected wire tools (3.0.6+):\n- \\`create_media_buy\\`\n- \\`sync_creatives\\`\n- \\`activate_signal\\`\n- (others sharing the AccountReference-bound request shape)\n\nPer spec, when an adopter is in implicit-resolution mode (auth principal IS the account scope) the buyer can omit \\`account\\`. The dispatcher's pre-handler validation insists on the field being present, blocking the request before the adopter's impl can resolve from \\`AuthInfo\\`.\n\n## Workaround on the adopter side\n\nInject a sentinel \\`account: {account_id: \\\"auth-chain\\\"}\\` placeholder at the wire boundary so the validator passes; the impl ignores the placeholder and reads identity from \\`ResolvedIdentity\\`. [bokelley/salesagent's \\`SpecDefaultsMiddleware\\` does this](https://github.com/bokelley/salesagent/blob/main/core/middleware/spec_defaults.py) for the four tools listed above. Workable but every adopter has to ship the equivalent.\n\n## Suggested fix\n\nMake \\`account\\` optional on the typed dispatcher when the surface declares implicit-resolution support. Concretely:\n\n1. \\`AccountStore.resolution\\` is \\`'derived' | 'implicit' | 'explicit'\\` — the dispatcher already has this signal at boot.\n2. For tools that accept \\`account\\` (\\`create_media_buy\\`, \\`sync_creatives\\`, \\`activate_signal\\`, etc.), skip the required-field check on \\`account\\` when the wired \\`AccountStore.resolution != 'explicit'\\`.\n3. Keep the field required for explicit-mode adopters (where \\`account.account_id\\` IS the resolution input).\n\nThis closes the gap without changing the wire schema (which already documents \\`account\\` as optional in implicit/derived mode).\n\n## Related\n\n- bokelley/salesagent's middleware workaround: \\`core/middleware/spec_defaults.py\\` \\`_AUTH_FILLED_TOOLS\\` set.\n- The \\`auth-chain\\` placeholder string is contained (impl reads identity from elsewhere) but is fragile — any adopter forgetting the middleware silently gets \\`INVALID_REQUEST\\` for buyers in implicit mode.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-10T12:43:16Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/623"}
| 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:2964b25b-0529-4b40-1e7c-18bcec6a50b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D4CE:291B58:13E0E72:1921901:6B0162B7 |
| html-safe-nonce | c49359b816462756cd5f546d508006995167442add0cc1d11c41941e69c7aff0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENENFOjI5MUI1ODoxM0UwRTcyOjE5MjE5MDE6NkIwMTYyQjciLCJ2aXNpdG9yX2lkIjoiNjgzNDQxNTE3MTY3MTI1MzY4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 326d15d4166c3278c77a5e852d3c8558dfb1e2c53de0f2e6a87ac16625bcba27 |
| hovercard-subject-tag | issue:4415636948 |
| 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/623/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6eb7c2e95d98d576cec7e106767217e9622e5930c38b0a74ef6abc3a52cdb2c/adcontextprotocol/adcp-client-python/issues/623 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6eb7c2e95d98d576cec7e106767217e9622e5930c38b0a74ef6abc3a52cdb2c/adcontextprotocol/adcp-client-python/issues/623 |
| og:image:alt | Problem The library's typed dispatcher rejects requests on tools where the spec declares `account` optional — specifically when the seller resolves identity from the auth chain and the buyer doesn'... |
| 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 | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width