{"record":{"id":"88470d1f78cbe1e4","repo":"vercel/ai","slug":"the-harnessid-acp-harness-supports-only-portabl-88470d","errorCode":null,"errorMessage":"The ${harnessId} ACP harness supports only portable text prompts and does not support audio content. Pass a string or a user message whose content contains only text parts.","messagePattern":"The (.+?) ACP harness supports only portable text prompts and does not support audio content\\. Pass a string or a user message whose content contains only text parts\\.","errorType":"exception","errorClass":"HarnessCapabilityUnsupportedError","httpStatus":null,"severity":"error","filePath":"packages/harness-acp/src/v1/acp-v1-prompt.ts","lineNumber":49,"sourceCode":"      content.push({ type: 'text', text: part.text });\n      continue;\n    }\n    if (part.type === 'image') {\n      throw unsupportedPromptContent({\n        harnessId,\n        category: 'image content',\n      });\n    }\n    if (part.type === 'file') {\n      const mediaCategory = part.mediaType.toLowerCase().split('/', 1)[0];\n      if (mediaCategory === 'image') {\n        throw unsupportedPromptContent({\n          harnessId,\n          category: 'image content',\n        });\n      }\n      if (mediaCategory === 'audio') {\n        throw unsupportedPromptContent({\n          harnessId,\n          category: 'audio content',\n        });\n      }\n      throw unsupportedPromptContent({\n        harnessId,\n        category: `embedded resource content with media type ${JSON.stringify(part.mediaType)}`,\n      });\n    }\n    throw unsupportedPromptContent({\n      harnessId,\n      category: `content parts of type ${JSON.stringify(\n        (part as { readonly type?: unknown }).type,\n      )}`,\n    });\n  }\n  return content;\n}","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/harness-acp/src/v1/acp-v1-prompt.ts#L31-L67","documentation":"convertHarnessPromptToACPTextBlocks throws unsupportedPromptContent when a file part's media type category is audio/*, since the ACP v1 harness supports only portable text prompts and cannot carry audio content to the agent.","triggerScenarios":"Prompting an ACP v1 harness with a file part whose mediaType starts with 'audio/' (e.g. audio/wav, audio/mpeg), such as voice memos or transcribed-audio attachments.","commonSituations":"Voice-input chat features piping raw audio into an ACP coding-agent session.","solutions":["Transcribe the audio to text locally (e.g. with a speech-to-text model) and send the transcript as a text part.","Strip audio parts before sending the prompt.","Use a harness/transport that supports audio if audio input is a hard requirement."],"exampleFix":"// before\ncontent: [{ type: 'file', mediaType: 'audio/wav', data }]\n// after\ncontent: [{ type: 'text', text: transcriptOfAudio }]","handlingStrategy":"validation","validationCode":"const hasAudioFile = typeof prompt !== 'string' &&\n  typeof prompt.content !== 'string' &&\n  prompt.content.some(p => p.type === 'file' && p.mediaType.toLowerCase().startsWith('audio/'));\nif (hasAudioFile) throw new Error('Transcribe audio to text before prompting an ACP v1 harness');","typeGuard":"function isAudioFilePart(part: unknown): boolean {\n  const p = part as { type?: string; mediaType?: string };\n  return p?.type === 'file' &&\n    typeof p.mediaType === 'string' &&\n    p.mediaType.toLowerCase().startsWith('audio/');\n}","tryCatchPattern":"try {\n  await session.prompt(msg);\n} catch (e) {\n  if (String(e?.message).includes('does not support audio content')) {\n    await session.prompt(transcribeAudioParts(msg));\n  } else throw e;\n}","preventionTips":["Run speech-to-text in the UI/adapter layer before the harness ever sees audio","Block audio/* attachments for ACP-backed sessions","Add mediaType allowlisting (text-only) in the prompt builder"],"tags":["acp","multimodal","audio","unsupported-content"],"backgroundTag":"unsupported-prompt-content","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}