Skip to content

Agent pane: a prompt or chat too large to send is never retried unchanged - #28778

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/toolarge-too-large-copy
Oct 31, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
lane/toolarge-too-large-copy

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Leo, 2026-10-31: "this is completely hardlocked bc of message size". The pane showed "message too large to send: 16907300 bytes, the limit is 15728640" with "cmux tries again on its own" and Retry. A refusal for size is the same at every ask, so the pane retried forever.

acpmux refuses a message past rpc::MAX_MESSAGE_BYTES with reason: "message.too_large". With this PR the pane never asks again unchanged for that reason:

  • A failed send (sendCause → too-large): one sentence that names the attachment taking the most of the prompt and says to take it out with Edit or send it on its own (prompt.failure.tooLargeFile; prompt.failure.tooLarge when there is no attachment to name, such as a long paste). The card offers Edit, Remove and Details, not Retry, and neither does the message's context menu; chat.retryPrompt leaves such a row out from any path. The byte count stays under Details.
  • A chat open (the pane's handshake, connectHost): refused for that reason, it says "This chat is too large to open. Update acpmux, then Retry." at once, and the pane stops retrying on its own. The line's Retry still asks. acpmux: a chat whose records together pass one message still opens (attach reply fits) #28754 makes acpmux never refuse an open that way; this covers a daemon from before it (a peer, or an older app).

Together with #28754 (the daemon side), a chat with large messages opens, and a prompt too large to send says what to do instead of wedging.

Screenshots

Gallery: agent-pane.transcript/failed-send-too-large, agent-pane.host-error/too-large, agent-pane.transcript/prompt-delivery

The gallery advisory renders these before and after (light and dark) in this PR's status comment.

Tests

Red first (8c61092cdba, tests only), then the fix:

bun test src/agent-session/acpmux/hostRetry.test.ts src/agent-session/acpmux/conversation/PromptDelivery.test.tsx

  • base + tests: 3 pass, 2 fail (a handshake refused as message.too_large…: no hostRefusedTooLarge; a prompt too large to send names its largest attachment…: generic "Not sent" sentence and a Retry button)
  • head: 14 pass, 0 fail; at 877aeb2 (after the review's menu finding): 17 pass, 0 fail with test/message-more-button.test.tsx

Review (codex gpt-6-astra): SHIP at 877aeb2 (its first pass at 47f042f blocked on the context menu's Retry, fixed in 877aeb2).

Visual review (codex gpt-6-astra): SHIP at 877aeb2. It opened the four after captures from the gallery advisory run (failed-send-too-large and host-error/too-large, dark and light). I viewed the after images too: the failed send names the attachment and offers Edit, Remove and Details with no Retry; at 360 px the host line cuts after "Update acpmux," beside its Retry button, with the whole line in its tooltip, like the other host lines.

Reds at 877aeb2: cmux-next checks fails only on its Tier routing step, in tests/test_cmux_next_base_tier.py (test_a_feat_cmux_next_push_defers_the_base_tier, test_a_push_whose_scheme_compile_is_the_dev_landing_build_keeps_it, test_coalescing_off_or_another_branch_runs_the_base_tier_on_the_push). The same three error the same way at the base tip d20e58e, and this PR changes only webviews/. The gallery advisory's comment and mark-stale steps failed on GitHub's installation rate limit (HTTP 403), after capture passed.

Observed / Not run

  • Observed: the two runs above on this VM; tsc --noEmit clean on the changed files; check-xcstrings-keys.py passes; vp fmt --check clean on the changed files.
  • Not run: a fleet build of the pane with a real 16.9 MB refusal (the proof after both PRs land is a fleet NEXT build sending a 20 MB attachment to a local and a peer chat).

Localization: 3 new keys (prompt.failure.tooLarge, prompt.failure.tooLargeFile, host.tooLarge) in all 21 agent-pane locales, non-English marked needs_review like the catalog's others.

Changelog

Fixed: a message too large to send says which attachment to take out instead of retrying forever, and a chat too large to open no longer retries on its own.

Agent session: agent session

🤖 Generated with Claude Code

teamleaderleo and others added 2 commits October 31, 2026 02:18
…s never retried unchanged

Red on base: the failed card offers Retry and names no attachment, and the
handshake has no way to tell the refusal apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-0fec927bf7d7f6f85883
…unchanged

Leo, 2026-10-31: "this is completely hardlocked bc of message size". acpmux refuses a
message past rpc::MAX_MESSAGE_BYTES with reason message.too_large. Asking again gets the
same refusal, so:

- A failed send for that reason (sendCause too-large) says which attachment takes the most
  of the prompt and to take it out with Edit or send it on its own; its card offers Edit,
  Remove and Details, not Retry.
- A chat open (the pane's handshake) refused for that reason says so in plain words
  (host.tooLarge) at once, and the pane stops retrying on its own; the line's Retry still
  asks. acpmux from #28754 no longer refuses an open that way.

Gallery: transcript failed-send-too-large, agent-pane.host-error too-large.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-0fec927bf7d7f6f85883
@cursor

cursor Bot commented Oct 31, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 31, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)/
test_a_picked_signing_label_has_a_rerun_alternative (main.RunsOnFallbackTests.test_
a_picked_signing_label_has_a_rerun_alternative)
View Logs
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)/
test_no_runs_on_chain_ends_on_the_reserved_side_label (main.RunsOnFallbackTests.tes
t_no_runs_on_chain_ends_on_the_reserved_side_label)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…u either

Astra review of 47f042f: messageMenuTarget gave every failed prompt a retryRowId,
so the native context menu still offered Retry on a message.too_large row and resent
it unchanged. The menu now offers it only where Retry helps, and chat.retryPrompt
(retryPrompts) leaves such a row out whatever path calls it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-0fec927bf7d7f6f85883
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 9fc68df: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr28778 -f ref=lane/toolarge-too-large-copy -f platform=macos -f backend_mode=local

Gallery before/after for 3b903c7: 3 states rendered, 4 images differ (picked by the Gallery: line in the PR body). Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41181874125 -R manaflow-ai/cmux -n gallery-advisory-28778-3b903c7acdb8d044d564cc81e1bf72d6f4e07ae2 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.transcript/failed-send-too-large Apple System Colors Light new 0% pr-body
agent-pane.transcript/failed-send-too-large Apple System Colors new 0% pr-body
agent-pane.host-error/too-large Apple System Colors Light new 0% pr-body
agent-pane.host-error/too-large Apple System Colors new 0% pr-body
agent-pane.transcript/prompt-delivery Apple System Colors Light unchanged 0% pr-body
agent-pane.transcript/prompt-delivery Apple System Colors unchanged 0% pr-body

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

web and size checks: green

Shipped in:

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41185290623 at ea29e41 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at 3ff802e. This pull request is one of 3 merged since: #29097, #28778, #27747.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6-astra high fast, review-router): BLOCK at 3b903c7

  • P2: webviews/src/agent-session/acpmux/sendFailure.ts:40: promptBytes uses JavaScript string length for text attachments, which counts UTF-16 code units rather than UTF-8 bytes. With multibyte text, it can identify the wrong attachment as largest; removing the named attachment may still leave the prompt over acpmux's byte limit and fail again.

Visual: The after captures have a clean layout in both themes, with no repeated controls or overflow. The 360px host message is intentionally ellipsized while keeping Retry visible. The captures match the PR's claims: oversized sends offer Edit/Remove/Details without Retry, and oversized chats stop automatic retries.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 3b903c7a Deployed Oct 31, 2026 by teamleaderleo via cmux-tui tree preflight #88306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant