Skip to content

Revert "feat: auto-retry failed agent sessions" (#9024) - #9184

Merged
austinywang merged 1 commit into
mainfrom
revert-9024-agent-auto-retry
Jul 29, 2026
Merged

austinywang merged 1 commit into
mainfrom
revert-9024-agent-auto-retry

Conversation

@austinywang

@austinywang austinywang commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Reverts feat: auto-retry failed agent sessions #9024 and removes the opt-in terminal.autoRetryAgentSessions setting, retry coordination/policy, retry and exhaustion UI metadata, exit classification plumbing, tests, schema entries, and localized strings.
  • Preserves unrelated work added to main after the original squash merge.

Conflict resolution and later-main adaptation

  • Deleted Sources/AgentSessionRetryCoordinator.swift and cmuxTests/AgentSessionRetryCoordinatorTests.swift. The later ae52684c53 edits were entirely within the retry implementation and tests being reverted, so none needed to survive independently.
  • Resolved web/messages/en.json and web/messages/ja.json by retaining the later Agent Hibernation descriptions while removing only the auto-retry description added by feat: auto-retry failed agent sessions #9024.
  • Removed the now-invalid agentSessionRetryCompletedAttempts initializer argument from cmuxTests/AppDelegateEqualizeSplitsShortcutTests.swift, a later-main test fixture added after the feature. This is the only adaptation outside the original 76-file change.
  • Nothing from feat: auto-retry failed agent sessions #9024 had to remain; the revert is complete.

Known overlap

CLI/cmux.swift also overlaps the in-flight issue-9181-codex-resume-notifications branch. Whichever change lands second should expect and resolve that merge conflict without reintroducing auto-retry behavior.

Validation

  • ./scripts/check-pbxproj.sh
  • ./scripts/lint-pbxproj-test-wiring.sh
  • python3 scripts/check-workspace-package-groups.py --check
  • python3 scripts/check-package-resolved-policy.py
  • Parsed Resources/Localizable.xcstrings, web/data/cmux.schema.json, and every web/messages/*.json; verified every catalog touched by the original PR drops its auto-retry key while later keys remain.
  • Repository-wide identifier audit confirmed the setting, Settings UI, schema, settings search, command palette, project references, retry coordinator, and retry/exhaustion identifiers are gone.
  • arch -arm64 swift test in Packages/macOS/CmuxWorkspaces (192 tests)
  • arch -arm64 swift test in Packages/macOS/CmuxControlSocket (319 tests)
  • arch -arm64 swift test in Packages/macOS/CmuxSettingsUI (137 tests)

The requested python3 scripts/swift_file_length_budget.py check is unavailable because current main removed that checker in #8125 (85ded20f53). Neither Swift budget TSV is touched.


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


Summary by cubic

Fully reverts the “auto-retry failed agent sessions” feature and setting, returning to manual resume behavior only. Removes the terminal.autoRetryAgentSessions option and all related logic, UI, schema, and tests while preserving unrelated changes already on main.

  • Refactors

    • Removed retry coordinator, policy, panel state, settings model, UI rows, command palette toggle, and localized strings.
    • Dropped terminal.autoRetryAgentSessions from cmux.schema.json, settings catalog, JSON path support, and search index.
    • Removed agent_session_ended handling from surface.resume.clear in CmuxControlSocket and related validation/tests.
    • Simplified workspace/CLI paths that cleared resume bindings; pruned Ghostty hooks and event handlers tied to retry.
    • Deleted all retry-focused unit tests and updated affected test fixtures.
  • Migration

    • No action needed for users; any terminal.autoRetryAgentSessions config key is now ignored.
    • API clients should stop sending agent_session_ended to surface.resume.clear.
    • Expect a merge conflict with the issue-9181-codex-resume-notifications branch in CLI/cmux.swift; resolve without reintroducing auto-retry behavior.

Written for commit c973791. Summary will update on new commits.

Review in cubic

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@austinywang, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c8193e34-41b5-4efb-88b3-1e48f56cd3fe

📥 Commits

Reviewing files that changed from the base of the PR and between 93bfd5e and c973791.

📒 Files selected for processing (77)
  • CLI/cmux.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlCommandCoordinator+Surface3.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlSurfaceContext.swift
  • Packages/macOS/CmuxControlSocket/Sources/CmuxControlSocket/Coordinator/Surface/ControlSurfaceResumeStrings.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandContextTestStubs.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/ControlCommandCoordinatorSurfaceTests.swift
  • Packages/macOS/CmuxControlSocket/Tests/CmuxControlSocketTests/FakeSurfaceControlCommandContext.swift
  • Packages/macOS/CmuxSettings/Sources/CmuxSettings/Keys/TerminalCatalogSection.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Environment/SettingsHostActions.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Navigation/CuratedSettingEntry+Default.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AgentRecoverySettingsModel.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AgentRecoverySettingsRows.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/TerminalSection.swift
  • Packages/macOS/CmuxSettingsUI/Tests/CmuxSettingsUITests/AgentRecoverySettingsModelTests.swift
  • Packages/macOS/CmuxSettingsUI/Tests/CmuxSettingsUITests/SettingsRowAnchorResolutionTests.swift
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/AgentRetry/AgentSessionRetryContext.swift
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/AgentRetry/AgentSessionRetryDecision.swift
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/AgentRetry/AgentSessionRetryPolicy.swift
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/AgentRetry/AgentSessionRetryRejection.swift
  • Packages/macOS/CmuxWorkspaces/Tests/CmuxWorkspacesTests/AgentRetry/AgentSessionRetryPolicyTests.swift
  • Resources/Localizable.xcstrings
  • Sources/AgentSessionRetryCoordinator+Scheduling.swift
  • Sources/AgentSessionRetryCoordinator+SurfaceTransfer.swift
  • Sources/AgentSessionRetryCoordinator.swift
  • Sources/AgentSessionRetryPanelState.swift
  • Sources/App/AgentSessionAutoRetrySettings.swift
  • Sources/CmuxSettingsJSONPathSupport.swift
  • Sources/CommandPalette/CommandPaletteSettingsToggle+AgentSessionRetry.swift
  • Sources/CommandPalette/CommandPaletteSettingsToggle.swift
  • Sources/ControlSurfaceResumeTarget.swift
  • Sources/DockSplitStore+SurfaceTransfer.swift
  • Sources/GhosttyApp+AgentSessionRetry.swift
  • Sources/GhosttySurfaceScrollView+NotificationScroll.swift
  • Sources/GhosttyTerminalView.swift
  • Sources/HostSettingsActions.swift
  • Sources/KeyboardShortcutSettingsFileStore+Template.swift
  • Sources/KeyboardShortcutSettingsFileStore.swift
  • Sources/SettingsNavigation.swift
  • Sources/TabManager+AgentSessionRetry.swift
  • Sources/TerminalController+ControlSurfaceContext3.swift
  • Sources/Workspace+AgentLifecycle.swift
  • Sources/Workspace+AgentSessionRetry.swift
  • Sources/Workspace+DetachedSurfaceTransfer.swift
  • Sources/Workspace+SurfaceResumeBinding.swift
  • Sources/Workspace.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/AgentSessionRetryCoordinatorTests.swift
  • cmuxTests/AgentSessionRetryInteractionTests.swift
  • cmuxTests/AgentSessionRetryOrderingTests.swift
  • cmuxTests/AppDelegateEqualizeSplitsShortcutTests.swift
  • cmuxTests/CLINotifyProcessIntegrationRegressionTests.swift
  • cmuxTests/DockPortalReconcileTests.swift
  • cmuxTests/DockTerminalReattachTests.swift
  • cmuxTests/DockWorkingDirectoryInheritanceTests.swift
  • cmuxTests/SettingsSearchIndexTests.swift
  • cmuxTests/WorkspaceUnitTests.swift
  • web/data/cmux.schema.json
  • web/messages/ar.json
  • web/messages/bs.json
  • web/messages/da.json
  • web/messages/de.json
  • web/messages/en.json
  • web/messages/es.json
  • web/messages/fr.json
  • web/messages/it.json
  • web/messages/ja.json
  • web/messages/km.json
  • web/messages/ko.json
  • web/messages/no.json
  • web/messages/pl.json
  • web/messages/pt-BR.json
  • web/messages/ru.json
  • web/messages/th.json
  • web/messages/tr.json
  • web/messages/uk.json
  • web/messages/zh-CN.json
  • web/messages/zh-TW.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@austinywang
austinywang merged commit 3136fca into main Jul 29, 2026
6 checks passed
@austinywang austinywang mentioned this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant