The sign-in code stops leaving your chat: Hermes now answers 2FA prompts on Telegram, Slack and Discord


Nine at night, on the train home, you message Hermes: “Pull this month’s invoices into the finance portal, the tax filing is tomorrow.” It opens the page, types the username and password you saved, and then stops. You wait. It answers: this session cannot ask the user. Meanwhile your phone buzzes with a six-digit code — the answer is in your hand, and the whole thing is stuck on a channel that does not exist.

The model was never the problem. The channel was. It exists now: send the same message again and Hermes posts a card in the chat, you reply with six digits, it types them into the page, marks the card submitted, and carries on.

What was blocking you was never the code

The browser vault stores your logins. Passwords can be filled automatically, but a one-time code is different: it is either computed from a saved authenticator seed, or somebody has to be asked.

The tool surface is the enter_code action on browser_vault. It first looks for a code field on the current page — input[autocomplete=one-time-code], or a field whose name or id mentions otp, code or totp — and then decides where the digits come from:

  • The saved login has an authenticator seed: the code is minted server-side, nobody is interrupted, and only on the origin(s) the login was saved for.
  • No seed: the user has to be asked.

The second path is where it broke. The callback that asks for a code was installed only for a local viewer, so a turn started from a chat platform found no callback at all and the tool returned prompt_unavailable, with an error message that also suggested saving an authenticator key for that login (issue #141844).

That suggestion is not wrong. It just turns a ten-second problem into “go configure a TOTP seed first”.

Three ways to answer now: a private form, a deletable reply, or no question at all

Two PRs merged on November 14, 2026 closed the gap: Slack and Discord (#155584), and Telegram (#155617).

Slack and Discord use a private form. The chat gets a card with an “Enter code” button. The button opens a modal that only the person who asked can open, and the code goes from the view_submission payload straight to the waiting turn. The button carries an opaque token — not the code, not the session key.

Telegram has no form a bot can open privately, so it does something else: a reply card aimed at the person who asked. In a private chat, your next text message is the answer; in a group, only a reply to the card counts. The bot deletes your message the moment it arrives, flips the card to “✓ Code submitted”, and never builds a message event from it — so it never has a chance to enter the conversation history.

The third path asks nobody. If that login has a saved authenticator seed, enter_code computes the code itself and you never see a card.

What happens behind one tap

Both platforms share one hook. If an adapter class implements send_vault_code_prompt(chat_id, site, hint, *, user_id, submit, timeout_s, metadata), the gateway hands the “ask for a code” request to it. user_id is the author of the turn — the only person whose answer is accepted. submit(code) hands the code to the waiting thread; it returns False when the request already ended (answered, timed out, interrupted, turn over), and then nothing is typed into the page.

The step that writes the digits into the page goes over the supervisor socket, not through the model. The code is registered as a redaction value, filled into the page, and the local variable is deleted right after. What the model sees is how many fields were filled and which backend supplied the code — not the six digits.

Logging got the same treatment. python-telegram-bot logs every getUpdates result and every webhook body at DEBUG, and slack_sdk’s Socket Mode client logs every received frame at DEBUG before any handler runs. Left alone, anyone running logging.level: DEBUG would find the code they just typed sitting in agent.log. Both adapters now drop those records while a code reply is pending.

Limits worth knowing: who can answer, what happens late, and groups without delete rights

The details carry most of the design:

  • Only the author can answer. Anyone else replying to the card, or saying something in the group, is still an ordinary message and still reaches the model — it is never mistaken for a code.
  • Late replies stay private. Each card has its own timer. Ended cards are remembered (bounded at 512), so the author’s reply after the timeout is still deleted instead of becoming chat text.
  • A group where the bot cannot delete says so. Private chats always allow it; a group needs delete permission. When the delete fails, the bot posts a notice asking the author to remove their reply, and it checks that the delete was actually confirmed — a request still queued behind a flood wait does not count.
  • Only the code prompt is opened up. A master password, or typing a brand-new login into a chat, is a separate decision and is not part of this.
  • Headless, cron and API turns still cannot ask. With no surface a person can answer on, enter_code keeps returning prompt_unavailable; saving an authenticator seed is the fix there.

When you can use it

Both PRs merged on November 14, 2026, and v0.23.1 shipped on November 10 — so this is not in a release yet; it lives on main only. It arrives with the next version; until then hermes update follows releases and will not carry it.

Update (2026-11-17): these changes shipped in v0.23.2 (November 16) — hermes update brings them in. The “not in v0.23.1” wording above is a snapshot from publication time.

To check what your install does today, ask Hermes from Telegram or Slack to sign in somewhere that sends a code. If it answers “this session cannot ask the user”, you are on the old behaviour.

For the vault itself — the first-time prompt, where passwords live, how it works with 1Password or Bitwarden — the browser vault login guide goes deeper, and credential vault and autofill covers how the credential container is encrypted. On the Telegram side, conflict queues and recovery explains what happens when two bot instances fight over one chat.

The sentence worth keeping

Security is often framed as “do not hand sensitive data to the model”. This one goes further: the code never gets the chance to become model input. It travels from your keyboard into the page, and what remains is a count of filled fields. That is a lot more reliable than asking a prompt to please not leak the digits.