Skip to content

acpmux: show unfinished tools after restart - #26984

Merged
teamleaderleo merged 39 commits into
feat-cmux-nextfrom
lane/hb-restart-resume-tools
Oct 30, 2026
Merged

teamleaderleo merged 39 commits into
feat-cmux-nextfrom
lane/hb-restart-resume-tools

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

After a daemon restart interrupts a turn, the continuation lists unfinished tool calls with their name, ID, and bounded input prefix. Terminal and replayed updates remove finished calls; root/child attribution follows the harness session identity.

Leo: "I think the various situations we have with cloud and whatnot, like just having that done real nicely will be quite important."

Recovery skips historical tool payloads and visits each interrupted-turn tool record once. It retains 33 complete identity histories and renders at most 32 unfinished calls. Terminal state is absorbing, so repeated starts and terminal replays cannot resurrect a retained completed call. A separate warning distinguishes another proven unfinished call from histories whose completion status is unknown. With more than 33 identities, a later active call may not be retained; the continuation explicitly directs the reader to check the journal rather than claiming that discarded calls are unfinished.

Sensitive structured subtrees are redacted directly using shared scanner field vocabulary; overlong keys fail closed. Once a decoded string names a sensitive assignment, its remaining bounded preview is replaced with [secret]. This deliberately discards later command suffixes instead of guessing language-specific quote boundaries. Non-sensitive prefixes remain useful. Titles, IDs, and previews are bounded and normalized.

Performance

The same deterministic completed_tool_histories_are_visited_once fixture feeds 10,000 starts and 10,000 completions to the old and new folds. These are measured scan/update-visit counts, not wall-clock timings.

Metric Before (884c6dc1) After Delta Harness / runs
Tool-history scans 304 1 -303 (-99.67%) Same 20,000-update fixture; red 40930465156, final green below
Tool updates visited 6,080,000 20,000 -6,060,000 (-99.67%) Same fixture and runs

Validation

  • Original baseline red: 40806071338, job 021f12f7f9f14ac7bf7e2a345537409d, baseline 6051497bd8a50666ffcdc556e8d8a13fe77beae0.
  • Exact preceding-product regression red: 40930465156, job 50ded1fadf0e4bb18bbb4d5942996452. The exact 884c6dc1dc791c9f256bbb47b501b5287ad0e7ab source is overlaid with the two regression tests: the fold visits 6,080,000 updates rather than 20,000, and the quoted-assignment test fails with an exposed open sesame suffix.
  • Regression coverage includes completed/replayed/unknown tool histories, bounded retained state, later discarded active calls, scalar/object/array previews, ordinary and ANSI-C quotes, mixed quote fragments, escaped spaces, colon-delimited data strings, substitutions, and scan-boundary truncation.
  • Colon-delimited data regression red: 40931518842, job 3ac5bb11f15f45a78d2a011cdfb7252f: preceding ce8a9762 code compiles but fails with an exposed password suffix. The same regression passes in the final focused run.
  • Final head: 87ad0817bd4c59f0411c8e6cdb58dd38c57c2398. Focused green 40931105677, job 11ab52b277e3446d971979a9ec5ea31e: 24 restart-resume tests, 14 secret-scanner tests, strict all-target clippy. The performance fixture prints one scan and 20,000 update visits.
  • Exact-head full library: 40931113963, job 2e916646615d454999d83aa6b3a1a1db: 1,882 pass; only protocol::tests::protocol_ir_is_current fails with the matching base assertion below.
  • Per-red base comparison: 40893290441, job dd795fe649c648f9b36853142f1637ce, verified base 31cb279970c39628118dc9c8ccdb1eeb71082dd8, fails protocol::tests::protocol_ir_is_current with the identical stale-spec assertion; the full suite executes, so this does not hide tests.
  • SDK generator comparison: 40894492890, job 80b44be05ac94c198a278608ba89fde5, head and verified base both run 64 tests with the identical test_ir.IrTests.test_live_raw_v12_layout_and_history_contracts_are_exact failure for command=new-pane-right at test_ir.py:384.
  • NoSwiftUI comparison: 40897106955, job 20af65b3a87b4317bc7f73021bfdae1e, head and verified base 31cb279970c39628118dc9c8ccdb1eeb71082dd8 exit 1 with identical findings for HomeChatColorsPanel.swift and HomeChatColorsView.swift; neither changes here.
  • Independent Astra high/Fast review: SHIP, no blocking findings, verified exact head 87ad0817bd4c59f0411c8e6cdb58dd38c57c2398; reviewed the delta from 884c6dc1dc791c9f256bbb47b501b5287ad0e7ab, confirming remainder redaction and the single-pass bounded fold.

The recovery fold and privacy regressions stay together so the tested continuation matches its implementation; there is no new timer or background task.

Changelog

Show bounded, redacted unfinished tool details when resuming a turn interrupted by daemon restart.

Agent session: agent session

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

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 87ad081: 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=pr26984 -f ref=lane/hb-restart-resume-tools -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base 31cb279; does not block

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at a7e781e

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent, correctness first): SHIP at 70161fa

@cursor

cursor Bot commented Oct 29, 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.

@cursor

cursor Bot commented Oct 29, 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.

@cursor

cursor Bot commented Oct 29, 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.

@teamleaderleo

teamleaderleo commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · took over from an earlier session · session

…tart-resume-tools

# Conflicts:
#	cmux-tui/crates/acpmux/src/hub/restart_resume.rs
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex gpt-6.1-sol high fast, review-router; started by the backlog lander): SHIP at 9a2e199

SHIP

  1. P3 — Unbounded tool ID hashing: restart_resume.rs:63 hashes the complete attacker-controlled toolCallId before applying the 200-character display bound. A large ID (up to the RPC message limit) repeated across many updates can impose substantial restart CPU work despite the bounded preview state. Consider bounding or validating IDs before hashing.

@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

This branch was previously deployed

3 inactive deployments
artifacts — 9a2e1992 Deployed Oct 30, 2026 by teamleaderleo via add the Windows daemon to the tree #81354
sentry-dsyms — 9a2e1992 Deployed Oct 30, 2026 by teamleaderleo via upload cmux-tui dSYMs to Sentry #81354
ci-routing-agent — 9a2e1992 Deployed Oct 30, 2026 by teamleaderleo via cmux-tui tree preflight #81354
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