Skip to content

OpenCode threads fail on Markdown file attachments #3499

Description

@iamhenry

What happened

BB accepts a Markdown attachment when creating an OpenCode thread, but the turn fails before inference with:

'file part media type text/markdown' functionality not supported.

Later text-only messages such as resume fail with the same error, so the thread cannot recover normally.

What should happen

OpenCode threads should receive supported file input, such as a staged file-path text marker, or BB should reject unsupported attachments before starting the turn with an actionable message. A rejected attachment should not prevent later text-only turns from running.

Repro

  1. Create a BB thread with the OpenCode provider.
  2. Attach a .md file with MIME type text/markdown.
  3. Send the message.
  4. Observe that the turn fails immediately.
  5. Send a text-only follow-up.
  6. Observe the same attachment error again.

Evidence

  • Reproduced in thread thr_7cyd92n6md on BB 0.42.2-nightly.34486466131.1.
  • Each failed turn reports the exact error above with no model output.
  • packages/provider-bridge-acp/src/bridge/bridge.ts:1290-1296 converts every localFile to an ACP resource_link without provider capability handling.
  • packages/provider-bridge-acp/src/bridge/bridge.test.ts has no localFile or resource_link coverage.
  • Codex and Pi bridges already use path-bearing text markers for localFile, which provides a compatible fallback pattern.

Acceptance

  • Attaching a Markdown file to an OpenCode thread does not fail the turn.
  • Unsupported file inputs produce a clear preflight error or a readable path marker.
  • A failed attachment does not poison later text-only turns.
  • Tests cover initial and follow-up OpenCode turns with a Markdown attachment.

AGENT GENERATED

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    opencodeOpenCode providerpartial-reproBug partially reproduced; some claims unverified; see linked reportprovider-acpBuilt-in plugin: provider-acpprovidersCross-provider bridges, models, login

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions