{"record":{"id":"ff5a924bcde8c741","repo":"deepseek-ai/deepseek-harness","slug":"conversation-updatequeue-failed-result-error-co","errorCode":null,"errorMessage":"conversation.updateQueue failed: ${result.error.code}: ${result.error.message}","messagePattern":"conversation\\.updateQueue failed: (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/client/ui-conversation/src/client/service.ts","lineNumber":294,"sourceCode":"      void entry.pending.then((url) => {\n        if (!this.createdImageUrls.delete(url)) return\n        revokePreview(url)\n      }, () => {\n        // A failed or invalidated load owns no object URL.\n      })\n    }\n  }\n\n  /** Apply one operation to a pending queue occurrence. */\n  async updateQueue(itemId: QueueItemId, action: QueueAction): Promise<void> {\n    const session = this.scopedSession('updateQueue')\n    const result = await session.updateQueue(itemId, action)\n    if (!result.ok) {\n      if (\n        action.kind === 'steer'\n        && (result.error.code === 'steer-unavailable' || result.error.code === 'queue-item-not-found')\n      ) return\n      throw new Error(`conversation.updateQueue failed: ${result.error.code}: ${result.error.message}`)\n    }\n  }\n\n  /** Cancel the scoped session's in-flight turn while preserving Queue (failures land in promptError and reject, as in send). */\n  async cancel(): Promise<void> {\n    const session = this.scopedSession('cancel')\n    const result = await session.cancel()\n    if (!result.ok) throw new Error(`conversation.cancel failed: ${result.error.code}: ${result.error.message}`)\n  }\n\n  /** Pull one older history page for the scoped Session. */\n  async loadOlder(): Promise<void> {\n    await this.scopedSession('loadOlder').loadOlder()\n  }\n\n  /** Resolve the caller scope's session face or throw on root contexts. */\n  private scopedSession(op: string): SessionFace {\n    const id = this.scopeId(op)","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/ui-conversation/src/client/service.ts#L276-L312","documentation":"updateQueue() applies a queue action (steer, cancel, remove, and kin) via session.updateQueue. Non-ok results throw 'conversation.updateQueue failed' — with one deliberate swallow: a steer answered by 'steer-unavailable' or 'queue-item-not-found' returns silently, because the item finished before the steer landed and that outcome is equivalent.","triggerScenarios":"Cancelling or removing a queue item that already completed on the host (queue-item-not-found), or any other host-side refusal or transport failure; steering races are absorbed by design and never reach this throw.","commonSituations":"A queue button rendered from a stale frame being clicked after the item settled; the queue mutated by another surface first; connection drop mid-action.","solutions":["Refresh the queue from the live session state and re-render before retrying","Treat item-not-found as benign — the work already settled","Inspect the embedded error.code for genuine host refusals and act on that code"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const item = queueSnapshot.items.find(i => i.id === itemId)\nif (item === undefined) return // already settled","typeGuard":null,"tryCatchPattern":"try {\n  await conversation.updateQueue(itemId, action)\n} catch (error) {\n  if (isItemNotFound(error)) refreshQueue() // benign race\n  else throw error\n}","preventionTips":["Drive queue buttons from the latest frame, not a cached one","Treat item-gone outcomes as success for cancel and remove intents"],"tags":["rpc","queue","race-condition","ui"],"backgroundTag":"rpc-request-failed","analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}