Skip to content

fix(sidebar): a placement whose workspace ended is dropped, never toasted - #32942

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/placement-gone-no-toast
Nov 3, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
lane/placement-gone-no-toast

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Leo's words: "what's that newest error message situation?" (a "Move did not apply: set-personal-workspace: workspace.place failed: no workspace matches "ws_…"" notice).

Cause. cmux agent open ID --placement top under load: the app made the workspace, queued its top placement (NewWorkspacePlacements.expect → SidebarBridge.place → placePersonal), then closed the half-made workspace when its first chat tab missed its deadline. The queued workspace.place ran against an id the daemon no longer had (selector.not_found), the placement failed, and the app showed the failure under the "Move" title, after the fact, for a move nobody asked for. The failure also stopped every placement queued after it.

Fix. A placement step whose workspace the daemon answers selector.not_found (scope workspace) for is dropped with a log line: no notice, the placement settles as applied, and the placements queued behind it still run. DaemonError.isWorkspaceNotFound names that answer. A placement for a workspace that has not appeared yet already waits for it (applyPendingPlacements only places a listed, non-provisional workspace), so nothing else changes.

Test (red first). PlacementWriteOrderTests.aPlacementForAGoneWorkspaceIsDroppedWithoutANotice: the scripted daemon answers k2's placement with selector.not_found; before this change the run fails, a notice shows and k3/k4 never apply; after it, no failure, no notice, and k3 and k4 are written.

Risk: small, one call site in the personal placement queue; any other placement error still reports as before.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes queued personal workspace placements failing with a misleading "Move did not apply" toast when the workspace had already ended.

Under load, cmux agent open ID --placement top creates a workspace, queues its top placement, then closes the half-made workspace when its first chat tab misses its deadline. The queued workspace.place hits the daemon's selector.not_found, the failure gets toasted as a failed move, and every placement queued after it is skipped. A placement whose workspace is gone is now dropped with a log line instead, and the placements behind it still run.

  • DaemonError.isWorkspaceNotFound recognizes selector.not_found scoped to a workspace.
  • Any other placement error still reports as before.

Tests

  • PlacementWriteOrderTests.aPlacementForAGoneWorkspaceIsDroppedWithoutANotice covers the case: no failure, no toast, and the later placements still apply.

Written for commit 0a933ef. Summary will update on new commits.

View guided diff Turn on auto-fix

…sted

An agent open under load (`cmux agent open ID --placement top`) made its
workspace, queued its top placement, then closed the half-made workspace
when its first tab missed the deadline. The queued workspace.place then
hit an id the daemon no longer had and the app showed "Move did not
apply: ... no workspace matches". A placement step whose workspace the
daemon answers selector.not_found for is now dropped with a log line;
the placements queued after it still run.

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

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Review 0a933ef: 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=pr32942 -f ref=lane/placement-gone-no-toast -f platform=macos -f backend_mode=local

Shipped in:

@teamleaderleo teamleaderleo added the leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel label Nov 3, 2026
@teamleaderleo
teamleaderleo merged commit 9396f39 into feat-cmux-next Nov 3, 2026
166 of 186 checks passed
@teamleaderleo
teamleaderleo deleted the lane/placement-gone-no-toast branch November 3, 2026 03:35
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 0a933ef2 Deployed Nov 3, 2026 by teamleaderleo via namespace autofix #12872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant