Revert "feat: auto-retry failed agent sessions" (#9024)
Summary
- Reverts https://github.com/manaflow-ai/cmux/pull/9024 and removes the opt-in
terminal.autoRetryAgentSessionssetting, retry coordination/policy, retry and exhaustion UI metadata, exit classification plumbing, tests, schema entries, and localized strings. - Preserves unrelated work added to
mainafter the original squash merge.
Conflict resolution and later-main adaptation
- Deleted
Sources/AgentSessionRetryCoordinator.swiftandcmuxTests/AgentSessionRetryCoordinatorTests.swift. The laterae52684c53edits were entirely within the retry implementation and tests being reverted, so none needed to survive independently. - Resolved
web/messages/en.jsonandweb/messages/ja.jsonby 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
agentSessionRetryCompletedAttemptsinitializer argument fromcmuxTests/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.shpython3 scripts/check-workspace-package-groups.py --checkpython3 scripts/check-package-resolved-policy.py- Parsed
Resources/Localizable.xcstrings,web/data/cmux.schema.json, and everyweb/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 testinPackages/macOS/CmuxWorkspaces(192 tests)arch -arm64 swift testinPackages/macOS/CmuxControlSocket(319 tests)arch -arm64 swift testinPackages/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.
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.autoRetryAgentSessionsfromcmux.schema.json, settings catalog, JSON path support, and search index. - Removed
agent_session_endedhandling fromsurface.resume.clearinCmuxControlSocketand 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.autoRetryAgentSessionsconfig key is now ignored. - API clients should stop sending
agent_session_endedtosurface.resume.clear. - Expect a merge conflict with the
issue-9181-codex-resume-notificationsbranch inCLI/cmux.swift; resolve without reintroducing auto-retry behavior.
- No action needed for users; any