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

Merged
AU
4mo ago
+47-3316

Summary

  • Reverts https://github.com/manaflow-ai/cmux/pull/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 https://github.com/manaflow-ai/cmux/pull/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 https://github.com/manaflow-ai/cmux/pull/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 https://github.com/manaflow-ai/cmux/pull/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.