Repository navigation
feat: attach up to 500 files to one message - #22
Merged
Merged
Conversation
Messages can carry 500 attachments. Adapters embed images, PDFs and text only from a message's first 20 attachments; the rest reach the agent as paths it opens on demand, so a large batch cannot fill the context or trip Anthropic's image rules for requests with more than 20 images.
Gateways that serve other models through Claude Code, such as DeepSeek's, reject PDF document blocks and fail the whole turn. The Claude adapter now embeds PDFs only for Anthropic models; other models get the saved path.
The web composer adds a context record per attached file, and messages allowed 200 records, so sending more than about 200 files failed. The cap now follows the attachment limit.
Claude embeds images and PDFs within its byte and page budgets again, since sealed bots cannot open paths. Only images over 2000 px stay out of a message with more than 20 images, which Anthropic would reject. OpenCode v1 and title generation follow the 20-attachment cap, and one message's attachments may total 4 GiB.
Claude embeds at most 100 images per message; the rest go by path. The composer refuses files past the 4 GiB message total before they upload.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A message could carry at most 100 attachments, so a folder of a few hundred documents or photos had to be split across several messages by hand.
One message now takes up to 500 files, totalling up to 4 GiB.