Escalate an AI email agent's thread to a human A developer at Nylas built a handoff mechanism for AI email agents to escalate threads to humans when the agent should not reply. The solution uses a custom folder called 'Needs human' and a local pause flag, since Nylas does not store a server-side pause flag for Agent Accounts. The approach relies on standard grant-scoped endpoints for moving threads and checking the pause state before drafting replies. Most "AI email agent" demos quietly assume the agent answers everything. Point a model at the inbox, generate a reply, send it, repeat. That's a fine loop right up until the model hits a message it shouldn't touch — an angry customer, a legal question, a refund the agent has no authority to approve — and confidently fires off a reply anyway. The expensive failures in agent email aren't the threads the agent gets wrong. They're the threads the agent answers at all when it should have stepped back. So let's build the part that steps back. Not the classifier that decides a message is risky — that's triage https://developer.nylas.com/docs/cookbook/agent-accounts/handle-replies/ , a separate problem. This is the handoff : once something flags a thread as "needs a human," how do you actually pull the whole conversation out of the agent's reach, park it where a person can find it, and make sure the agent keeps its hands off until that person clears it? I work on the Nylas CLI, so the terminal commands below are the exact ones I reach for when I wire up an escalation path. Every operation gets the two-angle tour: the raw curl call and the nylas command that does the same thing. An Agent Account is, underneath, just a Nylas grant with a grant id . That's the spine of everything here, and it's worth sitting with: there is nothing new to learn on the data plane. The same grant-scoped endpoints you already use — Messages, Threads, Folders, Drafts — work against this grant exactly the way they work against any Gmail or Microsoft grant you got through OAuth. So the escalation path isn't some special agent feature. It's three plain operations you already half-know: Needs human — that lives alongside the six system folders every Agent Account ships with inbox , sent , drafts , trash , junk , archive .The honest part up front, because it shapes the whole design: Nylas doesn't store a "paused" flag for you on an Agent Account. Custom metadata isn't supported on these grants, so there's no server-side field you can set to say "hands off this thread." The pause is your state — a row in your database keyed by thread id . The folder move is the visible, durable signal a human sees in their mail client; the pause flag is the invisible one your agent checks before it ever drafts a reply. You need both, and they do different jobs. You need an Agent Account and its grant id . If you don't have one yet, it's a single call — POST /v3/connect/custom with "provider": "nylas" and the address in settings.email : curl --request POST \ --url "https://api.us.nylas.com/v3/connect/custom" \ --header "Authorization: Bearer