Overview
How might we design duration-bound consent so people can trust and act on AI output?
When this pattern fits
- Essential for OAuth-based assistants, enterprise AI tools, and any agent whose permissions outlive a single task, where expiring grants prevent long-tail security risk from forgotten authorizations.
When to skip or lighten it
- Core product features that must work continuously without re-auth friction.
- Read-only public integrations with no sensitive scope.
- Enterprise SSO policies that already enforce session length centrally.
States
State model coming soon
Key UX elements
Key UX elements coming soon
Anti-patterns to avoid
Forever tokens presented as the only option.
Expirations that fire with no advance warning or renew path.
Quietly renewing expired grants without user action.
Timers that are invisible until a mid-task failure.
How products use it
| Product | Implementation |
|---|---|
| 1Password | SSH agent and unlock timeouts that re-prompt. |
| macOS | Screen recording and mic permissions with recurring prompts. |
| GitHub | Fine-grained tokens with optional expiration dates. |
| AWS STS | Temporary credentials with explicit TTLs for roles. |
Implementation
Copy this prompt to generate a production-ready implementation in Cursor, Claude Code, Lovable, or any AI coding agent.
Generate a production-ready implementation of the "Duration-Bound Consent" AI interface design pattern.
Pattern Definition:Frequently asked questions
What is duration-bound consent?
It is permission that expires automatically after a set time unless the user renews, reducing long-lived agent access risk.
What default durations work?
Session or 1 hour for high-risk tools, 24 hours or 7 days for medium risk, and explicit “until I revoke” only when users opt in.
How do you avoid interrupting work?
Warn before expiry, allow renew-in-place, and keep read-only continuity when write scopes lapse.
How does this relate to revocation affordances?
Expiration is automatic revoke on a timer. Revocation affordances are manual. Good agent UX offers both.