Skip to content

list_accounts: read-back task completing sync_accounts #6000

Closed

Description

@bokelley

Problem

sync_accounts declares who the buyer is and how they pay, and the seller acknowledges the relationship. But the protocol defines no way to enumerate the accounts a seller has acknowledged. Account state is buyer-owned by philosophy — which works for platforms with databases, but is hostile to the protocol's primary new consumer: agents, which lose local state between sessions constantly. A sync-only surface is write-only memory.

Proposal

A list_accounts task: the authenticated buyer principal asks a seller for the accounts it holds there. Each entry returns:

  • account_id — the seller-issued handle that round-trips into account: { account_id } on create_media_buy, sync_creatives, and every other stateful task
  • brand and operator as declared/resolved at establishment
  • billing designation and account status as acknowledged by the seller

The seller acknowledged these accounts at sync_accounts time, so it can enumerate them; refusing the read-back just forces client-side bookkeeping that cold agents don't have.

Why this completes the account model

  • sync_accounts establishes, list_accounts recovers, account_id pins. Discovery stays stateless; the read-back only concerns established state.
  • Ambiguity becomes answerable in-protocol: a seller (or aggregator) that resolves a brand ref to several principals can return candidate account_ids instead of an out-of-band error.
  • Multi-market principals (Brand identity: multinational brand houses need a market axis orthogonal to brand #5999) enumerate here too: same {brand, operator}, distinct account_id and billing per market.

Related: #5975 (progressive retrieval and selection asks), #5999 (market axis for brand houses).

Activity

  1. added
    claude-triaging
    on Jul 24, 2026
  2. bokelley commented on Jul 24, 2026

    @bokelley
    ContributorAuthor

    Triage

    Classification: Spec question
    Bucket(s): spec / protocol, media-buy
    Status: ready-for-human
    Milestone: Spec Backlog

    Correction first: list_accounts already exists as a shipped task (schema in dist/ since 3.0.2, documented in accounts-and-agents.mdx, registered in index.json). The schema already supports natural-key filtering for buyer-declared account sellers. The premise "the protocol defines no way to enumerate" is not quite right — the task exists and is wired up. The real gap is normative, not structural.

    What the experts said:

    • ad-tech-protocol-expert: Normative gap is real and consequential — a cold agent that lost its (brand, operator) portfolio has no in-protocol recovery path because re-running sync_accounts requires knowing which pairs to declare (the lost state). SHOULD (not MUST) is correct for a 3.1.x docs patch; MUST would invalidate existing buyers-declared sellers who don't expose it today. Multi-market angle from Brand identity: multinational brand houses need a market axis orthogonal to brand #5999 must be decoupled — promoting account_id as necessary for require_operator_auth: false sellers would conflict with the natural-key invariant until Brand identity: multinational brand houses need a market axis orthogonal to brand #5999 ships.
    • adtech-product-expert: Issue overstates the gap slightly (idempotent sync_accounts re-run is partial mitigation), but the cold-agent case is real. Buyer-declared sellers already hold this data; operator friction is low. SHOULD now, escalate to MUST after the ecosystem has had a patch cycle.

    My take: Both experts converge. This is a docs-only normative tightening — no schema change — eligible as a 3.1.x patch. Below is the decision memo draft for WG ratification.


    Decision Memo — draft for WG ratification

    ---
    id: DR-0010
    title: Buyer-declared account sellers SHOULD expose list_accounts for stateless agent recovery
    class: normative
    status: recorded
    date: 2026-07-24
    decided: ~2026-07
    decided_by: WG ballot
    refs: ["#6000"]
    dissent: none
    ---
    
    ## Decision
    
    Buyer-declared account sellers (require_operator_auth: false) SHOULD expose
    list_accounts. The existing required-tasks table restricts list_accounts to
    account-id namespace sellers (MUST when credential may access >1 account,
    SHOULD for singletons). This ruling extends normative coverage to
    buyer-declared sellers as SHOULD.
    
    No schema change required — list-accounts-request.json already accepts natural-
    key (brand + operator) filters for buyer-declared sellers. Change lands as a
    docs update to required-tasks.mdx and accounts-and-agents.mdx only.
    
    The multi-market principal angle (#5999) is explicitly out of scope here.
    Once #5999 ships a market axis on brand refs, a follow-up ruling can assess
    whether list_accounts must return market-scoped rows for buyer-declared sellers.
    
    ## Rationale
    
    sync_accounts is write-only: it establishes account state but provides no
    read-back. Agents are stateless between sessions; cold-start recovery via
    re-running sync_accounts requires knowing which (brand, operator) pairs to
    declare — precisely the state that was lost. list_accounts is the only
    in-protocol recovery surface. Buyer-declared sellers already hold this data
    (written at sync_accounts time); the ask is a read endpoint on records they own.
    
    SHOULD avoids invalidating existing buyer-declared sellers not currently
    exposing list_accounts. The "write-only memory" problem is real and growing
    as agent-native buyers replace platform buyers with persistent databases.
    
    ## Implications
    
    - required-tasks.mdx: add a SHOULD row for buyer-declared sellers in the
      accounts table alongside the existing MUST row for account-id namespaces.
    - accounts-and-agents.mdx: buyer-declared-seller flow should mention
      list_accounts as the cold-start recovery path, alongside sync_accounts.
    - No changeset needed (docs-only).
    - Does not affect #5999 market axis design — that issue owns the brand ref
      schema; this ruling owns the normative requirement table only.
    

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


    Generated by Claude Code

  3. added this to the Evergreen milestone on Jul 24, 2026
  4. added
    claude-triaged
    needs-wg-review
    media-buy
    and removed
    claude-triaging
    on Jul 24, 2026
  5. modified the milestones: Spec Backlog, 3.1.x on Aug 4, 2026
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

    claude-triagedmedia-buyneeds-wg-reviewspec / protocol

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions