{"record":{"id":"219c8e92036e83c9","repo":"NousResearch/hermes-agent","slug":"could-not-read-label","errorCode":null,"errorMessage":"Could not read ${label}","messagePattern":"Could not read (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts","lineNumber":152,"sourceCode":"  // Read bytes/paths ONCE, outside the retry. Only the session-scoped RPC is\n  // replayed on recovery — re-reading a multi-MB file to retry a dead session\n  // id would double the disk/IPC cost of every recovered attach.\n  let imagePayload: Awaited<ReturnType<typeof readImageForRemoteAttach>> | null = null\n  let fileDataUrl: null | string = null\n\n  if (uploadBytes) {\n    try {\n      if (attachment.kind === 'image') {\n        imagePayload = await readImageForRemoteAttach(path)\n      } else {\n        fileDataUrl = await readFileDataUrlForAttach(path)\n      }\n    } catch (err) {\n      throw friendlyRemoteAttachError(err, label)\n    }\n\n    if (attachment.kind === 'image' ? !imagePayload : !fileDataUrl) {\n      throw new Error(`Could not read ${label}`)\n    }\n  }\n\n  const stageForSession = async (liveSessionId: string): Promise<ComposerAttachment> => {\n    if (attachment.kind === 'image') {\n      const result = imagePayload\n        ? await requestGateway<ImageAttachResponse>('image.attach_bytes', {\n            session_id: liveSessionId,\n            content_base64: imagePayload.contentBase64,\n            filename: imagePayload.filename\n          })\n        : await requestGateway<ImageAttachResponse>('image.attach', {\n            path,\n            session_id: liveSessionId\n          })\n\n      if (!result.attached) {\n        throw new Error(result.message || `Could not attach ${label}`)","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts#L134-L170","documentation":"Error \"Could not read ${label}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts:152 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the file still exists at the path and is readable.","Verify file permissions and that the path is inside an allowed workspace.","Re-attach the file from its current location."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}