You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2afdb3c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agent): say why the agent is unavailable instead of that it is
"the DeepSQL agent is unavailable right now" was returned for every failure,
and it reads as a transient outage — so the honest response is to wait, when
in fact nothing improves without someone changing a setting.
Two failures that need opposite fixes were indistinguishable: nothing is
listening (the runtime is down, or agent.webui-url points at a host that does
not exist), versus something answered and refused (it wants a login the backend
never performs). The log was no better: ensureSession logged e.getMessage(),
which is null for an unresolved host, producing "Could not create agent session
for profile u-admin: null".
Now the response names the target and the cause:
DeepSQL agent unavailable: cannot reach the agent runtime at
http://deepsql-agent:8787 — is it running, and is agent.webui-url correct?
DeepSQL agent unavailable: the agent runtime at http://127.0.0.1:8787
rejected the request: POST /api/session/new -> HTTP 401 {"detail":"Unauthorized"}
Both were observed against a live backend. The first corrected a misdiagnosis
made while investigating this very bug: the default agent.webui-url is the
Compose service name, so on a native run the backend never reaches the runtime
at all — which the old message had hidden behind "unavailable".
ensureSession keeps its signature; ensureSessionDetailed carries the reason, so
the Slack and dashboard callers are untouched.
Also:
* .env.example documents AGENT_WEBUI_URL, AGENT_PROVISIONER_URL and
AGENT_PROVISION_SECRET. None were listed, yet no non-Compose run works
without them, and their defaults are Compose hostnames.
* agent/distribution.yaml pins hermes_requires to <0.20.0. Upstream v0.20.0
(2026.8.3) answers 401 no_cookie to every agent API call: it requires a login
cookie, and AgentChatClient sends none — the Compose deployment relies on a
reverse proxy injecting X-DeepSQL-User / X-DeepSQL-Token. The floor stays at
0.12.0 deliberately; nothing below has been tested, and raising it would be a
guess presented as a fact.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments