fix(cli): make agent wait unlimited by default

This commit is contained in:
Mohamed Boudra
2026-02-23 20:51:42 +07:00
parent b167abfda5
commit 3f06063b4b
7 changed files with 98 additions and 25 deletions
+3 -2
View File
@@ -2426,17 +2426,18 @@ export class DaemonClient {
async waitForFinish(agentId: string, timeout = 60000): Promise<WaitForFinishResult> {
const requestId = this.createRequestId()
const hasTimeout = Number.isFinite(timeout) && timeout > 0
const message = SessionInboundMessageSchema.parse({
type: 'wait_for_finish_request',
requestId,
agentId,
timeoutMs: timeout,
...(hasTimeout ? { timeoutMs: timeout } : {}),
})
const payload = await this.sendCorrelatedRequest({
requestId,
message,
responseType: 'wait_for_finish_response',
timeout: timeout + 5000,
timeout: hasTimeout ? timeout + 5000 : 0,
options: { skipQueue: true },
})
return {