MCPcopy
hub / github.com/coder/mux / startReportTimeout

Method startReportTimeout

src/node/services/taskService.ts:5389–5402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5387 };
5388
5389 const startReportTimeout = () => {
5390 if (timeout) return;
5391 notifyExecutionStarted();
5392 timeout = setTimeout(() => {
5393 // Prefer a persisted terminal failure over a generic timeout so late
5394 // awaits surface the typed failure (e.g. model_refusal) even when the
5395 // live rejection was missed (restart/cleanup windows).
5396 void (async () => {
5397 const persistedFailure = await tryReadPersistedFailureError().catch(() => null);
5398 entry.cleanup();
5399 reject(persistedFailure ?? new AgentReportWaitTimeoutError());
5400 })();
5401 }, timeoutMs);
5402 };
5403
5404 const cleanupStartWaiter = () => {
5405 if (!startWaiter) return;

Callers

nothing calls this directly

Calls 2

rejectFunction · 0.85
cleanupMethod · 0.65

Tested by

no test coverage detected