[Bug] Client Cordis inspect query hangs Pending forever — no timeout, error answers discarded #4926
Replies: 1 comment
|
Independent confirmation, plus version status — the bug is still present in Environment: dsh Measured behaviour (same shape as the report above):
Three additional code observations (paths relative to
Why it is reachable in normal use (worth stating in the fix rationale): Version status: Happy to test a candidate build if one becomes available, and I can share the sanitized repro/session notes if useful. |
Uh oh!
There was an error while loading. Please reload this page.
Bug report: Client Cordis inspect query hangs "Pending" forever
Component:
@deepseek-ai/dsh-cordis-host-runner(packages/extensions/cordis-host-runner)Version observed: 0.1.1-rc.2
Reporter environment: macOS, dsh web GUI
Summary
A
cordis_inspect_querytool call withplatform: "client"stays Pending forever (observed > 30 min) when no browser page can answer it validly. The host-side pending entry is never settled: error answers from the page are silently discarded, and there is no timeout.Reproduction
cordis_inspect_querywith{platform: "client", provider: "Service", method: "listService", input: {service: "agentPresets"}}(
agentPresetsis a Host-side service; the Client catalog has no such entry.){ok: false, reason: "provider-error", message: 'no catalogued Service named "agentPresets"'}.CordisInspectRegistryService.resolveClientQuery()hits:pendingmap and the query Promise is never settled.Root cause
In
lib/index.jsof dsh-cordis-host-runner:resolveClientQuery()discards anyok: falseresolution and keeps the pending entry alive, waiting for a "first valid page response" that can never come (every connected page answers the same way; the client's inspect registry already marked the request answered).queryClient()has no timeout and no terminal condition other than a page answeringok: trueor the tool-call aborting.Net effect: any client inspect query that cannot be answered validly (wrong platform, unknown provider/service, or simply no page connected at the moment) hangs the model turn forever instead of failing fast with the concrete reason.
Suggested fix
resolveClientQuery(), when a page answers withok: false, remember the first refusal on the pending entry (pending.firstRefusal) but keep waiting (so a different page could still answer validly).queryClient(), arm a timeout (e.g. 30 s) that settles the pending query with the remembered first refusal (or atimeouterror when no page answered at all), and clear the timer on settle/abort.This preserves the multi-page "first valid answer wins" behavior while guaranteeing a bounded wait with a diagnostic error. A patch implementing exactly this has been applied and behavior-verified locally (5 scenarios: refusal+timeout surfaces the refusal; refusal then valid answer → valid wins; no page → timeout error; cancel → cancelled; fast valid answer unaffected).
Impact
Any agent session that issues a client-platform inspect query for a host-only service (or when no page is open) can be permanently wedged. The attached session trace shows the same call retried twice (turn 2 and turn 3) with zero results.
All reactions