Skip to content

OpenCode threads fail on Markdown file attachments #3500

Closed as not planned
Closed as not planned

Description

@iamhenry

What happened

BB accepts a Markdown attachment when creating an OpenCode (my custom opencode provider plugin) 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

  1. added theissue type on Sep 11, 2026
  2. added
    providers
    provider-acp
    partial-repro
    on Sep 11, 2026
  3. bb-slop-cop commented on Sep 11, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classified as Bug · Medium priority · Medium effort; added providers and provider-acp. No existing values were replaced.

    Reproduction report: PARTIALLY REPRODUCED, medium root-cause confidence; label: partial-repro.

    The ACP bridge converts local files to resource links without a text fallback. Two clean checkouts confirmed this on initial and later attachment turns: the transport test passed and the proposed text-marker regression failed. A text-only turn contained no replayed attachment. OpenCode's actual MIME rejection and persisted-session poisoning remain unverified.

    No PR: the rule's requirement to reproduce the provider failure on trusted main was not met. The report includes the repeatable test and next integration check.

    AGENT GENERATED

  4. SawyerHood commented on Sep 14, 2026

    @SawyerHood
    Collaborator

    Duplicate of #3499. Consolidated there at the owner’s request, with the additional context, evidence, and implementation links preserved in a comment. Closed as duplicate, not as fixed.

    AGENT GENERATED

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

    partial-reproprovider-acpproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions