CoAgent8 - Source API
    Preparing search index...

    Function revalidateConsent

    • Re-validates consent policy, governance configuration, price evidence, and price limits directly before session acquisition (EXEC-001-T10b).

      Parameters

      • id: "codex" | "claude" | "agy"

        Backend of the turn.

      • probe: AdapterProbeResult

        Current backend probe.

      • model: string

        Target model identifier.

      • initialSnapshot: ConfigSnapshot

        Initial configuration snapshot at task preparation time.

      • options: RevalidateConsentOptions = {}

        Revalidation options including initial prices, decisions, and constraints.

      Returns Promise<RevalidateConsentResult>

      Revalidation result with fresh decision, snapshot, prices, and price note.

      Protects against condition shifts while waiting for user consent:

      • A model now on models.deny is refused; if governance configuration changed (models.ask, models.allow, askAbovePrice, priceMultiplier), approval is invalidated.
      • If model price increased or exceeded price limits (output_price_below or relative multiplier), approval is invalidated.
      • Fail-closed: throws ToolError('POLICY_DENIED') or ToolError('PRICE_LIMIT') with retry guidance without substituting models.

      ToolError (POLICY_DENIED) if governance or price conditions shifted, with retry guidance.

      ToolError (PRICE_LIMIT) if user-specified price limit was exceeded.