Skip to content

Denials: say why a request was denied and what would be accepted #261

Open

Description

@dickhardt

draft-hardt-aauth-supervision.md at 70d6737:

  • L265 (Supervision Decisions): "The decision MAY carry a reason, a Markdown string, which the PS passes to the agent where the protocol gives the agent a reason."
  • L424 (Proposal): "The PS returns the denial to the agent with the reason, if any."
  • L508 (Auth Token): "An allow MAY carry scope, a scope narrower than the resource token requested, and exp."
  • L531 (Permission): "a deny becomes permission: denied with the reason."

draft-hardt-oauth-aauth-protocol.md at 70d6737:

  • L1239 (Permission Response): "denied: The agent MUST NOT proceed. The response MAY include a reason field with a Markdown string."
  • L2576 (Error Response Format): "detail (OPTIONAL): String. A human-readable explanation specific to this occurrence of the error."
  • L2621 (Polling Error Codes): "| denied | 403 | User or approver explicitly denied the request |"

draft-hardt-aauth-budgets.md at 70d6737:

  • L1111 (Declining): "suggested_budget ... It is guidance, not a grant — the agent's move is a fresh resource token at that figure"

When a request is denied, by the SS or by the person, the agent should be able to learn two things: why it was denied, and what would have been accepted. The first lets the agent explain the outcome to the person or change its approach. The second gives it a next request instead of a guess.

Why. Only the permission endpoint defines a member for this (reason, L1239). A denied person token, auth token, or mission proposal reaches the agent as the polling denied error (L2621), whose only text member is detail (L2576). The SS's reason is passed on "where the protocol gives the agent a reason" (L265), but for those three acts the protocol names no place. So the same explanation ends up under two names (reason vs detail), or is dropped.

What would be accepted. An SS allow can narrow (L508). A deny cannot say that a narrower request would succeed. Budgets already has this pattern for one dimension: suggested_budget is guidance, not a grant, and the agent follows it with a fresh request (budgets L1111). The other dimensions of a request have no equivalent: scope, tools and description of a mission, and action or parameters of a permission request.

Ask:

  1. Define one member for the explanation on every denial the agent receives: permission denied, polling denied, and a denied mission proposal or update. Either use detail throughout, or keep reason and add it to the problem+json body for denied. State that the PS carries the SS's reason there.
  2. Let a denial carry optional guidance on what the decider would currently accept, modeled on suggested_budget: guidance, not a grant, acted on by a fresh request (a new resource token or updated_request at L1081, a revised mission proposal, or a new permission request). Candidates:
    • auth token: a narrower scope
    • mission: a revised description / tools, in the shape of the proposed member an ask already carries
    • permission: free text in the explanation may be enough
  3. Add matching members to the SS deny decision, so the SS can supply both the explanation and the guidance.

Generated by Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions