Skip to content

feat: attach up to 500 files to one message - #22

Merged
lbgos merged 5 commits into
mainfrom
t3/attach-500
Nov 26, 2026
Merged

lbgos merged 5 commits into
mainfrom
t3/attach-500

Conversation

@lbgos

@lbgos lbgos commented Nov 26, 2026

Copy link
Copy Markdown
Owner

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.

  • Adapters embed images, PDFs and text from the first 20 attachments only. The rest reach the agent as paths it opens when it needs them, so a large batch can't fill the context.
  • Claude embeds images and PDFs within its byte and page budgets, since sealed bots can't open paths. It embeds at most 100 images per message, and in a message with more than 20 images, those over 2000 px go by path. Both match Anthropic's request limits.
  • PDFs reach models other than Claude, such as DeepSeek through Claude Code, by path. Those gateways reject PDF document blocks.
  • The composer's context-record cap follows the attachment limit, so the web composer can send all 500.
  • The composer refuses files past the 4 GiB total before they upload. The server checks the same limit at send.
  • OpenCode, ACP, Muse, Antigravity, Codex and title generation follow the 20-attachment embed cap.

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.
@lbgos
lbgos deployed to leak-gate November 26, 2026 11:09 — with GitHub Actions Active
@lbgos
lbgos merged commit d08d3d8 into main Nov 26, 2026
19 checks passed

This branch was successfully deployed

1 active deployment
leak-gate — 1b3f20d1 Deployed Nov 26, 2026 by lbgos via Denylist #51
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