Repository navigation
Agent chat: centralize agent-message bodies and recorded sends - #26376
Conversation
Centralize Markdown rendering for sent agent messages and resolve only same-turn or same-turn-recorded heredoc bodies for acpmux sends. Keep raw shell plumbing secondary and bounded. Leo: "we need to have these more centralized ... account for cases where formatting gets a bit fucked up by agent messages sent back and forth" Co-authored-by: nx-chat <nx-chat@manaflow.ai> Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Probably yours: CI failed on
Failures:
Matched log linesNot re-run automatically: Written by red: web / Web status; NEW: green on the base cc0d757; do not merge until green; see lane-rules Gallery before/after for
States
Pick other states with a |
Show a prior recorded Bash write followed by acpmux send < file in the sent-message gallery, with the compact row and expanded Markdown body.\n\nLeo: "we don't need to see all this shit with the whole ... sending messages back and forth"\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
|
Bead |
Cache recorded message producer parsing by tool id and command revision with a bounded LRU. Unknown writes still invalidate the path before a later send.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
|
Found 118 test failures on Blacksmith runners: Failures
...and 108 more test failures. View all on Blacksmith: run 40666473963, run 40666473576
|
The parser cache regression now asserts an unknown same-path overwrite removes the prior body before a later send.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Only a completed simple cat truncating stdout can publish a recorded body. Control flow, non-stdout redirects, appends, dynamic paths and path mutators clear the bounded producer cache.\n\nLeo: "formatting gets a bit fucked up by agent messages sent back and forth"\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Bugbot needs on-demand usage enabledBugbot 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. |
Relative directory changes invalidate the transcript producer cache, so a later file send cannot reuse bytes from an unknown working directory.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Apply recorded producer events in shell order. Shadowed redirects, skipped branches, failed writers and unknown path mutations now clear cached body bytes before acpmux send renders them.\n\nLeo: "formatting gets a bit fucked up by agent messages sent back and forth"\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Apply recorded producer events in shell order and clear on shadowing redirects or uncertain control flow. A failed or in-flight tool keeps its compact preview but cannot publish a cached producer across calls.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Only one simple standalone cat truncating an absolute literal stdout path can publish a recorded body. Multiple redirects, fd duplication, control flow, shell wrappers, mutators and dynamic paths clear provenance. Cache parsed immutable tool snapshots in a WeakMap so long transcript replay stays constant for unchanged calls.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Require quoted stdin on fd 0 and a single absolute stdout truncating redirect for recorded message bodies. Unknown commands, control flow, fd redirects, and ambiguous writers clear provenance; immutable tool snapshots use WeakMap parse caching.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Send rows now clear recorded bodies when their own command writes, substitutes, groups, or uses alternate input redirects. Grouped and multi-command producers, fd redirects and later here-strings remain unresolved.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Clear prior producer candidates on accepted writes, reject uncertain aliases and alternate stdin routing, and require writer completion before a later send resolves recorded bytes. Reject grouped and substitution-bearing heredocs.\n\nAgent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2\n Agent-Session: https://cmux.com/deeplink/agent?id=aid-0b4ecd9d94ff38860db2
Bugbot needs on-demand usage enabledBugbot 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. |
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40671012262 at 193f745 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40672367480 at d92bb78 failed: cmux-next checks (god files, concurrency, crash safety, l10n). |
|
Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Bash sends whose message came from an earlier recorded file write expand to that message as Markdown, with Raw below it. Sent and received messages share the same Markdown renderer.
Leo: "we need to have these more centralized ... account for cases where formatting gets a bit fucked up by agent messages sent back and forth" and "we don't need to see all this shit with the whole ... sending messages back and forth".
The viewer never reads a host file. It accepts immutable bytes only from a preceding, successfully completed quoted heredoc captured in this turn. Mutation, overlap, failed/unended writers, remote path boundaries, unsafe redirects and ambiguous execution invalidate those bytes. Repeated read-only sends can use the same captured producer. Observational tools, including structurally parsed MCP read/list/search calls, retain it. A parsed mutating MCP name always invalidates the body, even when its generic ACP kind incorrectly says
read,searchorfetch.Wrapper scripts are parsed structurally: a quoted mention of
acpmux sendis text, while executable sends share one bounded scan. Unresolved nested substitutions propagate ambiguity through wrapper returns. A WeakMap caches parses by immutable tool identity and command revision; unchanged turn replay adds no parsing.Before / after
Public gallery
agent-pane.sent-message-rows,recorded-file, 760×760:Captures are base
37d1da2ad8683fand earlier rendering head2280210c529b2d5fa180617b6c64663d19a9fda1; subsequent parser repairs have no new visual surface. No private user images are published.Verification
Frozen source:
724e5d6f08ea8697882850005a285bf56db059ac, tree4a93c24bbaed849677670a1a612e83289a04e37a.Review (codex gpt-6-astra xhigh): SHIP at 724e5d6. Primary inspection confirms that parsed MCP mutations override misleading generic kinds, while genuine reads retain immutable recorded bodies. Earlier review receipts apply only to their recorded heads.
Exact-head fleet run 40667206376 is SUCCESS: the new misleading-MCP-kind regression fails against the old production file, then the final source passes 56 tests / 599 assertions, full web check, web lint, and the prepush gate against actual published history. The runner verifies the source tree and restores its captured HEAD before completion. Receipt:
3004ccac8b354c6fbd8e111f2edbe503(32 CPUs).The regression covers
read,searchandfetchkinds crossed with parsed and structured MCP metadata:write_file,read_and_writeanddelete_filediscard stale content;read_filepreserves it. The earlier wrapper red-to-green is recorded in run 40661256705.The old head’s cmux-next checks fail in
tests/test_ios_internal_notes.pyand native namespace-type rules inWorkspaceHibernationActionStrings.swiftandCloudWorkspaceSetupLocalization.swift; this PR touches none of those files. Release-notary and gallery-health failures are also being reconciled against base. The coordinator confirmed there is no broad web hold: this web-only PR lands once its own four react-apps-check shards pass and remaining reds are base reds. The Swift-only hold on #26809 does not apply to these files.No native app build was run for this web parser repair.
Changelog
Changed: render captured agent sends as Markdown and preserve recorded bodies through observational tools and safe wrappers.
Agent session: agent session