Replies: 2 comments
|
Verified every claim against master (47f9438) — the wedge is real, and there are two details worth adding before fixing: Source confirmation
Systemic note: the whole tool-cordis family is unguardedNo tool registration in Design nuance: timeout is the safety net, fail-fast is the primary fixA plain
Cross-thread noteOn |
{
"input": {
"service": "conversation"
},
"method": "listService",
"platform": "client",
"provider": "Service"
}这个参数也是永久挂起 |
Uh oh!
There was an error while loading. Please reload this page.
Summary
cordis_inspect_querywithplatform: "client"can hang forever (no timeout), permanently freezing the agent: the agent staysrunning, every later inbox message queues unprocessed, and only a manualagent.cancel()(keepInbox) unblocks it.Repro / observed behavior
While developing a dynamic Cordis plugin, an agent called:
The tool call never returned a
tool/result. The session log ends at thetool/callevent; the agent staysstatus: runningindefinitely; subsequentsend/followupmessages sit in the inbox (agent/inbox/splicedappended, never claimed). This reproduced three times in a row — the agent retried the same client query after each manual cancel and hung again each time.Root cause
tool-cordis/src/index.tsregisterscordis_inspect_querywithouttimeoutMs.cordis-host-runner/src/inspect-registry.ts→queryClient) emitscordis/inspect-queryand awaits a promise that only settles onresolveClientQuery(a page response) orsignalabort.dsh-tool-call-timeout-policy) only arms a deadline when the tool declarestimeoutMs— so this tool has zero timeout protection.When no browser page is attached/answering (headless-ish usage, closed tab, page crash, or a client manifest present but no live client runner), the promise never settles and the whole agent turn is wedged.
Suggested fix
cordis_inspect_querya boundedtimeoutMs(e.g. 15–30s) so the cooperative guard converts a silent hang into aTOOL_TIMEOUTerror result the model can see and react to.queryClient, add a hard deadline independent of tool config, and/or detect "no live client page" early and fail fast with a clear message instead of queueing an unanswerable request.Impact
Any agent session that queries a client platform without a responding page is permanently wedged; the user sees a "stuck" session with no error surfaced. A timeout would turn this into a recoverable tool error.
Environment
0.1.0-rc.5(source launch)All reactions