opencode fixes local file attachments mislabelled as text/plain

wonderfulremark · ghdev · 2026-07-26

Fixes a bug in opencode run -f <path> where locally attached files were always tagged as text/plain (or application/x-directory) instead of using the file’s real MIME type. The PR also awaits the async MIME detection call and preserves the text/plain fallback only when the bytes round-trip as identical UTF-8 text. Verification showed a PNG attachment logged as image/png after the fix.

Original post →

More from coding & agent

coding & agent channel →