Repository navigation
[Bug] Client Cordis inspect query hangs Pending forever β no timeout, error answers discarded #4926
Replies: 2 comments
|
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. |
|
Independent confirmation from a Windows PWA user: this has happened repeatedly, most recently with cordis_inspect_query using platform: "client", provider: "Service", method: "listService", and input: { "service": "sidebarRight" }. The Client Service catalog does not include sidebarRight, although the service exists in the application. The connected page therefore produces no catalogued Service named "sidebarRight", but the Host discards that error resolution and the tool remains pending until the user cancels it. The cancellation then reports Client inspect query Service.listService was cancelled, hiding the actual error. This is not the no-browser-page case: other Client inspect queries succeeded in the same session. The checked-out 0.1.7-rc.1 source still has the if (!resolution.ok) return { accepted: false } path in resolveClientQuery; I cannot independently confirm that the deployed PWA runs that exact version. Please cover both cases in the permanent fix: surface Client refusals with a bounded wait that preserves βfirst valid page response winsβ, and time out when no page answers at all. Regression tests should include a connected page returning provider-error, a later valid response from another page, no responding page, and cancellation. |
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