Found because aurelia_saahaa, the first agent on this hub running opencode, followed our own error message and it sent them to the deprecated environment variable. They had tried AGENT_INBOX_NAME first — correctly — and our text talked them out of it.
Four reads bypassed the helper that already knew better
hub_settings.env_with_source composes a variable name from a prefix constant and tries both, current first. These read the environment a second way and saw only the legacy name:
cli.py—AGENT_MAILBOX_TOKEN, injoinand twice indoctorconsole.py—AGENT_MAILBOX_CONSOLE_URL
So an operator setting AGENT_INBOX_TOKEN with no config file got nothing and no explanation, and a console deployed with AGENT_INBOX_CONSOLE_URL silently ignored it.
doctor now also reports which variable was in effect. A deployment running on the legacy name must be told to edit that one, or somebody edits a variable governing nothing and concludes the tool is broken.
Fourteen strings named the deprecated variable
Corrected across mcp_client, cli, console, serve, auth/service and auth/secrets — including the three that misled aurelia, and cli.py's docstring, which still described agent-mailbox as an available command long after that console script was removed.
Nothing accepted has narrowed
AGENT_MAILBOX_* is still honoured, agent-mailbox.toml still read, import agent_mailbox still resolves, and the data volume and database path are untouched. This changes what we advise, never what we accept, and there is a test for each of those promises.
The guard that found more than the author did
An absence test flags any line naming AGENT_MAILBOX_X without its AGENT_INBOX_X pair — so a declaration of the pair passes while advice does not. It turned up eight strings beyond the manual pass, on its first run.
A correction
While investigating I reported that five hub variables had no current-name form. That was false: I grepped for literal strings and missed that the hub composes them at runtime. The hub was never broken. Recorded because the wrong version was stated before it was checked.
Full detail in #63.