Skip to content

fix(bridle): tell the model a binary attachment exists (CLEAN-57) - #59

Merged
maksymhryzodub-prog merged 1 commit into
mainfrom
fix/CLEAN-57-binary-attachment-notice
Sep 3, 2026
Merged

fix(bridle): tell the model a binary attachment exists (CLEAN-57)#59
maksymhryzodub-prog merged 1 commit into
mainfrom
fix/CLEAN-57-binary-attachment-notice

Conversation

@maksymhryzodub-prog

@maksymhryzodub-prog maksymhryzodub-prog commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to feat(bridle): accept Office documents as chat attachments (CLEAN-57) #56, which was merged before this commit landed on its branch — re-targeted onto fresh main.
  • The runtime drops file parts before the model call, so a binary attachment (PDF, Office) was invisible to the agent: it denied seeing the file the person just sent, and an attachment-only message reached the model as an empty turn ("What can I help you with?").
  • expand() now inlines a short notice — file name, MIME type, size, and that the contents are not readable — using the same mechanism as text-file inlining. The agent answers honestly: "I see haha.xlsx but can't read its contents."
  • Also applies to text-typed files downgraded to binary (undecodable bytes): previously silent, now acknowledged.

Jira: CLEAN-57

Test plan

  • api jest: 255 pass (binary expansion inlines the notice, attachment-only message gets a text body, downgraded files acknowledged, contents never inlined)
  • After deploy: send an .xlsx with "что в файле?" to the prod Rancher — expect the agent to name the file and say it can't read it

🤖 Generated with Claude Code

The runtime drops file parts before the model call, so a binary
attachment (PDF, Office) was invisible to the agent — it would deny
seeing the file the person just sent, and an attachment-only message
reached the model as an empty turn. The expansion now inlines a short
notice naming the file, its type and size, and stating the contents are
not readable — same mechanism the text-file inlining already uses.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@maksymhryzodub-prog
maksymhryzodub-prog merged commit ec7db07 into main Sep 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant