Skip to content

acpmux: retain ordered prompt metadata for transcript reloads - #24739

Merged
teamleaderleo merged 5 commits into
feat-cmux-nextfrom
codex/inline-transcript-backend2
Oct 24, 2026
Merged

teamleaderleo merged 5 commits into
feat-cmux-nextfrom
codex/inline-transcript-backend2

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Persist ordered agent prompt content metadata so reopened and queued chats retain image, text, file, document, recording and pasted-chip order. The ACP prompt itself continues to carry only validated blocks; the daemon stores bounded display descriptors separately and strips pane metadata before forwarding to the agent.

Leo: "say you paste an image and then you type something, there's the implicit captioning of that sort of thing"

Changelog

  • Add ordered user_message.inlineParts and queued/queue-updated metadata plumbing through immediate, queued, steer, restart and handoff paths.
  • Validate bounded inlineParts descriptors by block kind/index and UTF-16 text ranges; reject unsafe fields and never persist raw bytes, paths or text in descriptors.
  • Preserve failed-image identities with persisted:false; require file descriptors to carry a name and a nonempty resource URI; keep Chat: send images and PDFs to acpmux ahead of the prompt, by reference #23047 send-by-reference attachment handling separate and compatible. Fix the image descriptor move so the Rust path compiles.
  • Rehydrate text-file and pasted chips by descriptor plus the canonical ACP block text.

Base 9d483d2fd90d7250909eefb992bcd023a8d88303; head 1b1414ca299ce957619778a500dde58ad3021f45; 321 changed lines.

Validation

cargo fmt --manifest-path cmux-tui/Cargo.toml --all -- --check, schema JSON parsing, git diff --check, and prepush-gate.py pass. Focused Rust tests cover descriptor validation, ordered image/text/file metadata, failed image persistence and queue metadata. Cargo build/test and app suites run through PR CI/fleet, not this host.

pr-overlap found #23921 and #23047 sharing prompt_images.rs/keep; this PR has a distinct ordered-metadata cause and preserves their by-reference URI contract. No Chief files were changed.

Agent session: big-red

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 24, 2026 03:47 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 1b1414c: 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=pr24739 -f ref=codex/inline-transcript-backend2 -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on a996238 to compare; do not merge until green; see lane-rules

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

blacksmith-sh Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Found 10 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpqirfd31g/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpspqtuizd/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
convention violations found (ERROR lines above)./
convention violations found (ERROR lines above).
View Logs
test_bot_attempt_three_drops_stale_owned_pool_placement (main.PathRoutingStructure.
test_bot_attempt_three_drops_stale_owned_pool_placement)/
test_bot_attempt_three_drops_stale_owned_pool_placement (main.PathRoutingStructure.
test_bot_attempt_three_drops_stale_owned_pool_placement)
View Logs
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)/
test_the_repository_highlights_validate (main.DigestTests.test_the_repository_highl
ights_validate)
View Logs
test_the_session_lane_label_comes_after_the_fork_clause (main.GeneratedFilesRunner.
test_the_session_lane_label_comes_after_the_fork_clause)/
test_the_session_lane_label_comes_after_the_fork_clause (main.GeneratedFilesRunner.
test_the_session_lane_label_comes_after_the_fork_clause)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-421or created for this PR by the cmux coordinator.

@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 24, 2026 05:04 — with GitHub Actions Inactive
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 24, 2026 05:06 — with GitHub Actions Inactive
@teamleaderleo
teamleaderleo marked this pull request as ready for review October 24, 2026 05:25
@teamleaderleo
teamleaderleo merged commit 2584a85 into feat-cmux-next Oct 24, 2026
217 of 241 checks passed
@teamleaderleo
teamleaderleo deleted the codex/inline-transcript-backend2 branch October 24, 2026 05:29
teamleaderleo added a commit that referenced this pull request Oct 24, 2026
…24813)

`msg.get("images").and_then(Value::as_array).unwrap_or(&[])` does not
type-check: `unwrap_or` wants a `&Vec<Value>`, and `&[]` is a `&[_; 0]`
(E0308 at hub/prompt_images.rs:382, hub/queue.rs:370,
hub/queue_edit.rs:188). Map to a slice first, which is what
`inline_parts` takes, and default to the empty slice. The behaviour is
the same: no images means an empty list.


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 24, 2026
* acpmux: clear the clippy errors that base's compile error hid

While acpmux didn't compile on feat-cmux-next (#24739), clippy never
reached these, and every acpmux PR now fails "clippy (changed cmux-tui
packages)" on them:

- hub/dispatch.rs, server/requests.rs: `limit.max(1).min(500)` becomes
  `limit.clamp(1, 500)` (manual_clamp); same bounds.
- hub/prompt_images.rs, server/requests.rs (steer, report): nested
  `if let` blocks become let-chains (collapsible_if); same branches.
- hub/dispatch.rs: drop `Briefs::by_idempotency`, which nothing calls
  (dead_code).
- server/requests.rs: move `dispatch_policy_tests` to the end of the
  file (items_after_test_module).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray

* cmux-tui: drop the needless return in acpmux_request (clippy::needless_return)

The unix block is the function's tail on unix, so it returns its value
without `return`; the not(unix) block is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
lawrencecchen pushed a commit that referenced this pull request Oct 24, 2026
…24813)

`msg.get("images").and_then(Value::as_array).unwrap_or(&[])` does not
type-check: `unwrap_or` wants a `&Vec<Value>`, and `&[]` is a `&[_; 0]`
(E0308 at hub/prompt_images.rs:382, hub/queue.rs:370,
hub/queue_edit.rs:188). Map to a slice first, which is what
`inline_parts` takes, and default to the empty slice. The behaviour is
the same: no images means an empty list.


Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a1603a-6462-72f0-a4b0-6937eb58e4c3&host=cosmic-gray

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

This branch was previously deployed

1 inactive deployment
cmux-tui-merge-tree — 1b1414ca Deployed Oct 24, 2026 by teamleaderleo via publish the merge tree #5463
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