joke-app finalize failed with "Prompt is too long (~1.18M tokens)": the
runner inlined a 162-page, 8.3 MB PDF as a base64 document block for every
[Document: ...] reference, and the prompt referenced it twice.
The Claude runner now inlines a document at most once per prompt, only
PDFs up to 20 pages / 10 MiB (512 KiB when the page count is unknown) with
at most 40 PDF pages per prompt, and text documents up to 256 KiB. Larger
ones become a path note telling the agent to use the Read tool.
The same PDF was also rejected as an outbound attachment by our local 8 MiB
cap, although Discord's default per-file limit is now 10 MiB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>