cmux NEXT composer: path-based files and resumable attachment transport
This follow-up makes attachment transport match how local coding agents work. Non-image files are stored by the session host and represented in the prompt by a path plus a short name/type/byte note; the agent can page them with its own Read tool instead of copying large logs, PDFs, archives, or source into every model request. Known local files have no composer byte cap. Images are normalized to a metadata-free preview at a conservative 1568 px long edge, while the original remains linked in session storage for full-resolution inspection.
Local, SSH/peer, and Cloud uploads now use one gesture-authorized staged upload per selected batch: begin returns a batch token, each file crosses in bounded 512 KiB chunks, failed transfers cancel their staged file, and finish hands the completed file to the existing streaming cloud access uploader. The cloud host keeps a documented 32 MiB/file and 64 MiB active batch abuse guard; local and peer staging use the native 1 GiB guard; the limit is server-side and independent of the request/frame size. SSH/peer transport uses resumable 512 KiB begin/chunk/finish calls up to the native 1 GiB guard, with the legacy 10 MiB one-shot path retained for old peers. Declared sizes, offsets, target session/machine binding, expiry cleanup, and old-peer feature fallback are checked by the native host.
Leo asked: “#24626 but why file limits and why arent we compressing them or doing something idk what the best practices are wrt sending files to models ik y'all have a read tool andwhatnot”. The design follows the provider and harness guidance: Claude vision documents 1568 px standard resolution, visual-token cost, request limits, and pre-compression; Claude Code Read reads local files on demand with paging; OpenAI file inputs distinguish file references from inline content; OpenAI vision documents provider-selected image resizing and patch limits; Codex SDK passes image paths to the CLI.
Validation
git diff --checkbun test webviews/test/cloud-upload-staging.test.ts webviews/test/attachment-session-paths.test.ts webviews/test/composer-attachment-matrix.test.ts: 60 passed, 0 failed.scripts/cmux-next/prepush-gate.pypassed on the native transport changes.swiftc -parsepassed for changed Swift files;cargo fmt --all -- --checkpassed for changed Rust.- Fleet native compile/test is required before merge; local native builds are intentionally not run on this host.
Changelog
Removed arbitrary local attachment caps, normalized inline image previews, retained original session paths, and added bounded resumable cloud and peer transport.
agent-identity footer
Agent session: big-red
Gallery: agent-pane.composer/file-saved-as-path, agent-pane.composer/image-sent-as-path