Skip to content

Add cmux send --paste and hint at it for large multi-line sends - #14937

Merged
teamleaderleo merged 3 commits into
mainfrom
feat/cli-send-paste
Sep 27, 2026
Merged

teamleaderleo merged 3 commits into
mainfrom
feat/cli-send-paste

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

cmux send types text as keystrokes: every newline presses Enter, so a multi-line prompt sent to Claude Code or Codex can submit line by line. cmux paste (#14837) already delivers text through terminal.paste, the Cmd+V path, but a script built on cmux send had to switch commands to get it.

  • cmux send --paste sends the text unchanged through terminal.paste. It shares one delivery function with cmux paste, so both resolve targets, enforce the socket size limit and report queued delivery the same way. --paste only counts before the text: cmux send echo --paste and cmux send -- --paste still type --paste, as before.
  • The default for cmux send is unchanged. After a keystroke send of more than 4096 UTF-8 bytes that contains a line break, a one-line hint on stderr recommends cmux send --paste or cmux paste. Stdout and the exit status are unaffected; short text and long single-line text never see the hint.
  • cmux send --help moves into the string catalog and documents --paste. docs/cli-contract.md and the task help usage line list the flag.

Like cmux paste, send --paste is local-socket only today: terminal.paste is not on the cmux ssh relay allowlist (that is #14915). This PR adds no socket method and changes no relay policy.

Testing

The bundled-CLI regressions exercise terminal.paste delivery with unchanged text, default keystroke sends, flag placement and -- handling, missing text, and stderr-only hints at the 4096/4097-byte boundary.

  • Earlier head fcb59f35c5ec: CI run 36320420867 passed macOS compile admission and 136 CLI tests in 24 suites, including all six new regressions.
  • Main refresh 0a2b953aa9e1: scripts/merge-main.sh merged green main 3761671f5206; all 66 Linux guard steps passed with none skipped. verify-local.py passed syntax parsing for the four changed Swift files, catalog structure and localization parity.
  • Current head abf237324f28: the catalog-only cleanup preserves main's key order and all existing values, adding only the two new keys. Catalog structure and localization parity passed again on this head. Current-head macOS compile admission and all 136 CLI tests in 24 suites passed, including the six new regressions. No tagged-build dogfood has been performed.

Localization audit: cli.help.send and cli.send.hint.usePaste have translations for all nine app locales (en, de, fr, ar, es, zh-Hant, zh-Hans, ko, ja). No web copy changed.

Changelog

Added: cmux send --paste for sending text through the terminal paste path, with a hint for large multiline keystroke sends.

Checklist

  • Behavior changes have added or updated tests, or Testing says why not
  • UI, settings, menu, schema, help-text or user-facing docs change: localization audited, and the result is stated above
  • Docs and changelog updated if needed

Original implementation and contributor credit:

— Glasswren g1 🎲
run: run_paste_improvements_20260927_d07ca05d

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 15a14752-f888-4748-9ca8-08a3cff4deaa

📥 Commits

Reviewing files that changed from the base of the PR and between 3761671 and abf2373.

📒 Files selected for processing (6)
  • CLI/CMUXCLI+Paste.swift
  • CLI/CMUXCLI+TaskHelp.swift
  • CLI/cmux.swift
  • Resources/Localizable.xcstrings
  • cmuxCLITests/CLIPasteCommandTests.swift
  • docs/cli-contract.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

`cmux send` types text as keystrokes, so every newline presses Enter and a
multi-line prompt sent to Claude Code or Codex can submit line by line.
`cmux paste` (#14837) already delivers text through `terminal.paste`, the
Cmd+V path, but scripts that call `cmux send` had to switch commands.

- `cmux send --paste` sends the text unchanged through `terminal.paste`,
  sharing one delivery function with `cmux paste` (target resolution, size
  check, queued-delivery output). `--paste` counts only before the text, so
  `cmux send echo --paste` and `cmux send -- --paste` still type it.
- Without `--paste`, the default is unchanged. After a keystroke send of
  more than 4096 UTF-8 bytes containing a line break, a one-line hint on
  stderr recommends `--paste`. Stdout and the exit status are unaffected.
- `cmux send --help` is now a localized catalog string and documents
  `--paste`; the hint is localized in all nine app locales.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

CI failure attribution

CI passes on abf237324f (run 36324540115 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's.

Catch-up merge by scripts/ci/catch_up_pr.py (RFC #14631).
Merged by scripts/merge-main.sh: origin/main at 3761671, the newest commit with green CI fast guards (1 newer skipped).

Resolved generated files:
- Resources/Localizable.xcstrings: xcstrings key-level union

Catch-up-previous-head: fcb59f3
Catch-up-base: 3761671
@cursor

cursor Bot commented Sep 27, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@teamleaderleo
teamleaderleo merged commit 091d0ea into main Sep 27, 2026
62 checks passed
@teamleaderleo
teamleaderleo deleted the feat/cli-send-paste branch September 27, 2026 14:14
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for abf237324f: every check was green at merge (16 verified; 15 skipped by policy). Full suite runs on main after merge.

rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 27, 2026
648d5c1 Add a Paste Last Screenshot action with an unbound shortcut (manaflow-ai#14955)
ff61677 ci: avoid partial blobs in catch-up merges (manaflow-ai#15023)
4d0d112 ci: retry transient catch-up GraphQL failures (manaflow-ai#15021)
212e808 ci: attribution scores a lone suspect and reports app-host crashes apart (manaflow-ai#14952)
4cabdf4 test: settle the window before measuring the unread sidebar-row invalidation (manaflow-ai#14568)
12ec99b Add a release-media capture tool for changelog screenshots and clips (manaflow-ai#15010)
ee2cda0 Backfill Unreleased changelog and draft next release cards (manaflow-ai#14999)
be4adf8 Show a brief notice when Cmd+V fails on an oversized image or a timeout (manaflow-ai#14953)
23d22d7 ci: an owned pool the run starts on now beats an earlier one it queues on (manaflow-ai#14993)
05d0190 ci: catch-up posts once per head, says less, and merges inserted declarations (manaflow-ai#15018)
4ee4b21 ci: fail stalled Swift package tests instead of waiting out the job timeout (manaflow-ai#14997)
9ce512a merge-main: run local guards only when asked (manaflow-ai#15016)
d60108a ci: clear test-e2e's fixed DerivedData with clear-dirs.sh (manaflow-ai#14994)
1d7895e ci: run the shell and CLI no-socket lanes in parallel (manaflow-ai#14990)
6e7d25f Honor macOS Differentiate Without Color, Increase Contrast and Reduce Transparency (manaflow-ai#14991)
966b355 Stop interrupting focused work: sidebar jumps, Computer Use focus steal, quit dialog on logout (manaflow-ai#14961)
e1f1cb2 Strip control characters from feedback attachment filenames (manaflow-ai#14783)
0758c9f test: find the onboarding window the test presented, not a leftover (manaflow-ai#15015)
b35c540 fix(spm): resolve GhosttyKit/GhosttyRuntimeTestStubs target name collisions (manaflow-ai#10569)
ef33bed Map .purs artifacts to the Haskell highlight.js grammar (manaflow-ai#14202)
e2a167a Highlight Elixir and Erlang files in the file editor (manaflow-ai#13732)
972c449 fix: wrap Linux browser download card label (manaflow-ai#11157)
f563884 Add Aside to browser data import detection (manaflow-ai#13379)
091d0ea Add cmux send --paste and hint at it for large multi-line sends (manaflow-ai#14937)
3ffcdbb test(ios): keep folder-tap stat tests off the real 2 s deadline (manaflow-ai#15017)
68d3936 test: keep CmuxTerminal pasteboard tests off the cooperative pool (manaflow-ai#15006)
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