Skip to content

Unify local resume launcher scripts (#9200) - #9205

Merged
austinywang merged 13 commits into
mainfrom
issue-9200-resume-launcher-wrapper
Jul 30, 2026
Merged

austinywang merged 13 commits into
mainfrom
issue-9200-resume-launcher-wrapper

Conversation

@austinywang

@austinywang austinywang commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • deliver every local resume through one history-hidden /bin/zsh <private-script> invocation
  • move the guarded cwd change into the launcher while preserving present, missing, inaccessible, post-exit, and .ignore behavior
  • consolidate the three one-shot script stores with a 0700 directory, 0600 scripts, self-deletion, and 24 hour pruning
  • keep remote resume separate and preserve legacy outside-cwd-prefix decoding
  • keep the terminal host as the only owner of the login and interactive shell lifecycle

Validation

  • Swift syntax parse for all changed Swift files
  • 193 CmuxWorkspaces tests passed before the host architecture mismatch at XCTest bundle launch
  • project normalization and test wiring checks
  • Package.resolved policy check
  • git diff --check
  • no local xcodebuild or XCUITests run

Closes #9200


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

Unifies all local resume flows behind a single history-hidden " /bin/zsh '<script>'" wrapper and moves cwd guarding into a new OneShotTerminalLauncherStore. Avoids nested login shells and keeps working-directory delivery consistent across local and remote restore for #9200.

  • Refactors
    • Introduced OneShotTerminalLauncherStore (0700 dir, 0600 scripts, self-delete, TTL pruning) with direct and user-login-shell modes; local resumes use direct to avoid nested login; startup input begins with a leading space to hide in shell history.
    • Plumbed restoringWorkingDirectory through WorkspaceSessionRestorePolicyService and WorkspaceSurfaceResumeBinding.startupInputWithLauncherScript(..., restoringWorkingDirectory:); relaunch/resume builders gained includeWorkingDirectoryPrefix so launcher-aware commands omit cwd prefixes.
    • Launcher is authoritative for cwd guarding with ancestor probing; host only cds into enterable paths; added Workspace.RestoredWorkingDirectoryGuard to preserve logical path spelling and handle symlinks/unmounted volumes.
    • Local surface and agent resumes always use the wrapper; restored tmux/HUD starts now use OneShotTerminalLauncherStore.writeStartupCommand(...).
    • Remote resumes persist the requested working directory in both panel state and resume commands to keep the correct cwd across restore.
    • Replaced SessionRestoredTerminalCommandStore and WorkspaceSurfaceResumeStartupLaunch+WorkingDirectory.

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

Review in cubic

Summary by CodeRabbit

  • New Features

    • Improved session resume/invocation so the correct working directory is preserved and restored across surface, agent resume, and fork flows.
    • Added one-shot, permission-hardened launcher scripts that validate/attempt cd and self-delete after execution, with distinct “direct” and “login shell” modes.
  • Bug Fixes

    • Refined working-directory provenance and prefix/quoting behavior to consistently match local vs. remote restore scenarios.
  • Tests

    • Expanded resume/restore coverage for working-directory forwarding and updated launcher-script parsing/behavior (permissions, TTL pruning, self-deletion).

@coderabbitai

coderabbitai Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Session restore now propagates restoring working directories through resume APIs, uses a shared secure one-shot Zsh launcher, moves directory handling into generated scripts, updates workspace restore ownership, and expands launcher, history, legacy-resume, and startup-input tests.

Changes

Session resume launcher flow

Layer / File(s) Summary
Shared one-shot launcher storage
Sources/OneShotTerminalLauncherStore.swift, Sources/SessionPersistence.swift, cmux.xcodeproj/project.pbxproj
Adds secure, self-deleting launcher scripts with working-directory handling and TTL pruning, replacing the removed launcher stores.
Resume input and working-directory contracts
Sources/RestorableAgentSession.swift, Sources/SessionRestorableAgentSnapshot+Commands.swift, Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift, Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/Session/*
Threads working-directory and prefix controls through resume builders, canonicalization, binding protocols, and startup launch APIs.
Restore-path working-directory wiring
Sources/Workspace.swift, Sources/DockSplitStore+SessionRestore.swift
Computes candidate directories, forwards them into binding and agent launches, and assigns host-shell directories when startup input does not handle them.
Launcher and restore-path validation
cmuxTests/AgentResumeReturnShellStartupTests.swift, cmuxTests/SessionPersistenceTests.swift, cmuxTests/ForkParentFallbackResidualTests.swift, cmuxTests/WorkspaceUnitTests.swift, cmuxTests/WorkspaceSplitStartupCommandTests.swift, Packages/macOS/CmuxWorkspaces/Tests/...
Adds launcher lifecycle, working-directory, history, legacy-resume, and startup-input parsing coverage while updating restore expectations.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workspace
  participant DockSplitStore
  participant ResumePolicy
  participant LauncherStore
  participant LoginShell
  Workspace->>ResumePolicy: build resume launch with restoring cwd
  DockSplitStore->>ResumePolicy: request terminal startup input
  ResumePolicy->>LauncherStore: create invocation launcher
  LauncherStore-->>DockSplitStore: return /bin/zsh script invocation
  DockSplitStore->>LoginShell: inject launcher invocation
  LoginShell->>LauncherStore: execute and delete launcher
Loading

Possibly related PRs

Suggested reviewers: lawrencecchen


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Cmux Swift Package Boundaries ❌ Error The diff adds reusable launcher/persistence logic (OneShotTerminalLauncherStore) in app Sources/; this belongs behind a package boundary, and CmuxTerminalCore already exists. Move the launcher store and related quoting/working-directory helpers into a small SwiftPM package target (likely CmuxTerminalCore), leaving app code as thin composition/glue.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (23 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes align with #9200 by moving cwd handling into the launcher, unifying launcher stores, preserving remote handling, and keeping history-hidden local resume.
Out of Scope Changes check ✅ Passed The file set appears focused on launcher unification, cwd handling, history suppression, and regression tests, with no clear unrelated additions.
Cmux Swift Actor Isolation ✅ Passed Changed paths stay on @MainActor or pure Sendable/value types; the new launcher store is a stateless utility, not a shared UI-bound reference.
Cmux Swift Blocking Runtime ✅ Passed No new blocking primitives were added in the PR diff; changed Swift files showed no added semaphores, sleeps, waits, main-queue syncs, or locks.
Cmux Browser Automation Off-Main ✅ Passed PASS: The PR only changes Workspace session-resume and a test; no browser.* commands, socketWorkerMethods, or processV2Command routing changes appear in the touched diff.
Cmux Expensive Synchronous Load ✅ Passed HEAD^..HEAD only changes workspace cwd handling; no new or moved RestorableAgentSessionIndex.load(), JSON parsing, or broad scans on interactive paths.
Cmux Cache Substitution Correctness ✅ Passed The only cache-like restore read (currentIndexSchedulingRefresh) is TTL-freshness-checked with a cold fallback, and the new cwd path revalidates via filesystem in OneShotTerminalLauncherStore.
Cmux No Hacky Sleeps ✅ Passed Full diff only touches Swift, tests, and pbxproj; no TS/JS/shell/build runtime files add sleeps/delays/polling, and test waits are test-only scaffolding.
Cmux Algorithmic Complexity ✅ Passed No new scalable scans or nested collection rescans were introduced; the only new loop is a fixed 3-item fallback list, and launcher pruning is a bounded temp-dir sweep.
Cmux Swift Concurrency ✅ Passed PASS: The patch only moves a local working-directory guard and updates a test; diff-only scans show no new DispatchQueue/Task/Combine/completion-handler patterns.
Cmux Swift @Concurrent ✅ Passed Changed Swift code only adds sync working-directory logic in Workspace.swift; no async/nonisolated/@Concurrent changes were introduced.
Cmux Swiftpm Lockfiles ✅ Passed cmux.xcodeproj changed only source-list entries; no SwiftPM package refs, .gitignore, or Package.resolved diffs were included.
Cmux Swift Logging ✅ Passed No diff hunks add print/debugPrint/dump/NSLog; existing Workspace NSLog calls are #if DEBUG, and the new store uses a nonisolated private Logger.
Cmux User-Facing Error Privacy ✅ Passed Only production diff adjusts working-directory logic in Workspace.swift; no user-facing errors, alerts, or sensitive payloads were added.
Cmux Full Internationalization ✅ Passed The diff only moves session-restore logic and updates a test; it adds no user-facing copy or locale/catalog changes.
Cmux Swiftui State Layout ✅ Passed Edited hunks are restore logic/test code only; no new @Observable/@published, GeometryReader, list-row store refs, or render-time state mutation.
Cmux Architecture Rethink ✅ Passed PASS: Changes centralize launcher-script ownership and thread restoringWorkingDirectory through restore paths; no new sleeps, polling, locks, or observer-based lifecycle hacks appeared.
Cmux Swift Auxiliary Window Close Shortcuts ✅ Passed Only main-workspace restore logic and a test changed; no standalone NSWindow/NSPanel/WindowGroup or cmux.* identifier ownership was added, so the rule doesn’t apply.
Cmux Source Artifacts ✅ Passed Only hand-written source and test files changed; no temp, log, cache, build, or artifact paths were added.
Cmux No Test Or Debug Seam In Production Source ✅ Passed Sources/Workspace.swift only adds a working-directory guard variable; the added lines contain no #if DEBUG/test-hook members or widened test seams.
Cmux No Ambient Global State ✅ Passed HEAD diff only moves a local restoredDirectoryIsLocalPath into Workspace.sessionSnapshot and updates a test; no new file-scope funcs, globals, or singletons.
Title check ✅ Passed The title is concise and accurately summarizes the main change: unifying local resume launcher scripts.
Description check ✅ Passed The PR description covers the summary and validation sections clearly; only noncritical template sections are omitted.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-9200-resume-launcher-wrapper

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmuxTests/AgentResumeReturnShellStartupTests.swift`:
- Line 153: Update all four Data-to-String conversions in
AgentResumeReturnShellStartupTests, including the sites around presentOutput and
the other referenced lines, to use the failable String initializer instead of
String(decoding:as:). Preserve the existing UTF-8 decoding behavior and handle
the optional result appropriately at each call site.
- Around line 134-141: Guard the inaccessible-directory test around the setup
using the existing file-manager and test symbols so it is skipped or returned
early when running with root privileges, where 0o000 remains accessible. Apply
the same guard to the related case noted around the second range, while
preserving the permission restoration and cleanup defer behavior.

In `@cmuxTests/SessionPersistenceTests.swift`:
- Around line 2566-2568: Clean up launcher scripts materialized by the
resume-startup tests around resumeStartupInput and
inlineResumeCommandResolvingLauncherScript. Configure these tests to use a
per-test temporary launcher directory and remove it during teardown, or
explicitly delete each generated script after inspection, including the
additional setup at the referenced second location.

In `@Sources/OneShotTerminalLauncherStore.swift`:
- Around line 18-31: Move the Logger initialization out of the
OneShotTerminalLauncherStore initializer into a file-scoped shared declaration
named logger, using nonisolated private let and the existing "com.cmuxterm.app"
subsystem and category. Remove the instance logger property and its initializer
assignment while leaving the remaining initialization unchanged.

In `@Sources/Workspace.swift`:
- Around line 1442-1444: Update the auto-resume path in Workspace around
restorableAgent?.resumeStartupInput to pass nil for restoringWorkingDirectory
when the saved agent cwd is missing or not enterable, matching
DockSplitStore+SessionRestore.swift; retain resumeSessionWorkingDirectory only
when it is valid for Ghostty to enter.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e74e3f85-bdc1-4208-9b2f-3a5de382ea40

📥 Commits

Reviewing files that changed from the base of the PR and between 8b087a9 and a18c9b5.

📒 Files selected for processing (19)
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/Session/WorkspaceSessionRestorePolicyService.swift
  • Packages/macOS/CmuxWorkspaces/Sources/CmuxWorkspaces/Session/WorkspaceSurfaceResumeBinding.swift
  • Packages/macOS/CmuxWorkspaces/Tests/CmuxWorkspacesTests/Session/WorkspaceSessionRestorePolicyServiceTests.swift
  • Sources/AgentRelaunchCommandBuilder.swift
  • Sources/DockSplitStore+SessionRestore.swift
  • Sources/OneShotTerminalLauncherStore.swift
  • Sources/RestorableAgentSession.swift
  • Sources/SessionPersistence.swift
  • Sources/SessionRestorableAgentSnapshot+Commands.swift
  • Sources/SessionRestoredTerminalCommandStore.swift
  • Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift
  • Sources/Workspace.swift
  • Sources/WorkspaceSurfaceResumeStartupLaunch+WorkingDirectory.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/AgentResumeReturnShellStartupTests.swift
  • cmuxTests/ForkParentFallbackResidualTests.swift
  • cmuxTests/SessionPersistenceTests.swift
  • cmuxTests/WorkspaceSplitStartupCommandTests.swift
  • cmuxTests/WorkspaceUnitTests.swift
💤 Files with no reviewable changes (2)
  • Sources/SessionRestoredTerminalCommandStore.swift
  • Sources/WorkspaceSurfaceResumeStartupLaunch+WorkingDirectory.swift

Comment thread cmuxTests/AgentResumeReturnShellStartupTests.swift
Comment thread cmuxTests/AgentResumeReturnShellStartupTests.swift Outdated
Comment thread cmuxTests/SessionPersistenceTests.swift Outdated
Comment thread Sources/OneShotTerminalLauncherStore.swift Outdated
Comment thread Sources/Workspace.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/OneShotTerminalLauncherStore.swift (1)

57-60: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Do not treat an inaccessible ancestor as a missing directory.

At line 59, cd -- /tmp/root/blocked/child fails because blocked is not searchable; [ ! -d /tmp/root/blocked/child ] also fails, so ! -d is false and the shell continues from the host cwd instead of failing. Drop the fallback when cd fails for access/readability, and only fall back when a path component is positively missing. Add a component-wise accessibility check in a subshell and cover this nested-inaccessible-cwd case.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Sources/OneShotTerminalLauncherStore.swift` around lines 57 - 60, Update the
working-directory command generation in OneShotTerminalLauncherStore to stop
treating an inaccessible ancestor as a missing directory. Replace the broad `[ !
-d ]` fallback with a subshell component-wise check that only permits
continuation when a path component is positively absent, while propagating
failures caused by inaccessible ancestors; add coverage for a nested
inaccessible working directory.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@Sources/OneShotTerminalLauncherStore.swift`:
- Around line 57-60: Update the working-directory command generation in
OneShotTerminalLauncherStore to stop treating an inaccessible ancestor as a
missing directory. Replace the broad `[ ! -d ]` fallback with a subshell
component-wise check that only permits continuation when a path component is
positively absent, while propagating failures caused by inaccessible ancestors;
add coverage for a nested inaccessible working directory.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d3e99fe3-c29d-41d2-ad10-b48f1b6d6be5

📥 Commits

Reviewing files that changed from the base of the PR and between a18c9b5 and 4937c2a.

📒 Files selected for processing (4)
  • Sources/OneShotTerminalLauncherStore.swift
  • Sources/RestorableAgentSession.swift
  • Sources/SurfaceResumeCommandCanonicalizer+PortableAgentExecutable.swift
  • cmuxTests/AgentResumeReturnShellStartupTests.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/Workspace.swift (1)

1353-1367: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve cwd: .ignore before applying a binding fallback.

A registered agent with cwd: .ignore can still have an approved local binding. These fallbacks then pass workingDirectory into the launcher and host shell, despite .ignore requiring no cwd guard or placement cwd.

  • Sources/Workspace.swift#L1353-L1367: pass nil as restoringWorkingDirectory when restorableAgent.registration?.cwd == .ignore, rather than falling back to a saved/current directory.
  • Sources/DockSplitStore+SessionRestore.swift#L181-L187: apply the same suppression and add coverage for local binding restore with .ignore.

Based on learnings, registrations with cwd: .ignore must suppress both the resume cwd guard and terminal working-directory placement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Sources/Workspace.swift` around lines 1353 - 1367, Update the startup restore
logic around candidateBindingWorkingDirectory and
sessionRestorePolicy.surfaceResumeStartupLaunch in
Sources/Workspace.swift:1353-1367 to pass nil whenever
restorableAgent.registration?.cwd == .ignore, before applying saved or
current-directory fallbacks. Apply the same suppression in
Sources/DockSplitStore+SessionRestore.swift:181-187 and add coverage for local
binding restoration with cwd: .ignore, ensuring both the resume cwd guard and
terminal working-directory placement are skipped.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@Sources/Workspace.swift`:
- Around line 1353-1367: Update the startup restore logic around
candidateBindingWorkingDirectory and
sessionRestorePolicy.surfaceResumeStartupLaunch in
Sources/Workspace.swift:1353-1367 to pass nil whenever
restorableAgent.registration?.cwd == .ignore, before applying saved or
current-directory fallbacks. Apply the same suppression in
Sources/DockSplitStore+SessionRestore.swift:181-187 and add coverage for local
binding restoration with cwd: .ignore, ensuring both the resume cwd guard and
terminal working-directory placement are skipped.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e24d92a3-c4c4-489e-ad04-8becd71f8e59

📥 Commits

Reviewing files that changed from the base of the PR and between 4937c2a and bfbead1.

📒 Files selected for processing (6)
  • Sources/DockSplitStore+SessionRestore.swift
  • Sources/OneShotTerminalLauncherStore.swift
  • Sources/Workspace.swift
  • cmuxTests/AgentResumeReturnShellStartupTests.swift
  • cmuxTests/SessionPersistenceTests.swift
  • cmuxTests/WorkspaceSplitStartupCommandTests.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/Workspace.swift (1)

3624-3624: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

Remove the time-based layout repair watchdog.

This introduces a two-second delayed teardown for unresolved rendering/focus work, so slow realization can be abandoned solely because the deadline elapsed. End the follow-up through explicit convergence or owner-lifecycle cancellation instead of a timer-driven repair path.

As per coding guidelines, “Do not introduce or materially expand timing or blocking repair paths such as … Task.sleep, polling … to paper over lifecycle, focus, rendering … races.”

Also applies to: 10364-10371

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Sources/Workspace.swift` at line 3624, Remove the
layoutFollowUpTimeoutScheduler and all timer-driven layout repair logic,
including the related follow-up path around the layout convergence handling. End
unresolved rendering/focus work only through explicit convergence or
owner-lifecycle cancellation, without introducing delayed teardown, Task.sleep,
polling, or other time-based fallbacks.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@Sources/Workspace.swift`:
- Line 3624: Remove the layoutFollowUpTimeoutScheduler and all timer-driven
layout repair logic, including the related follow-up path around the layout
convergence handling. End unresolved rendering/focus work only through explicit
convergence or owner-lifecycle cancellation, without introducing delayed
teardown, Task.sleep, polling, or other time-based fallbacks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b5ef8e82-5377-4b4c-b1ed-17b437bd95c3

📥 Commits

Reviewing files that changed from the base of the PR and between bfbead1 and 096ddda.

📒 Files selected for processing (4)
  • Sources/OneShotTerminalLauncherStore.swift
  • Sources/Workspace.swift
  • cmux.xcodeproj/project.pbxproj
  • cmuxTests/AgentResumeReturnShellStartupTests.swift

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmuxTests/AgentSessionAutoResumeSettingsTests.swift`:
- Around line 257-260: Extend the resume test around
resumeStartupInput(restoringWorkingDirectory:) to inspect the generated input
and assert that it contains remoteWorkingDirectory plus the corresponding cd
guard. Keep the existing restoredPanel.requestedWorkingDirectory assertion, but
verify the actual resume command input uses the remote cwd rather than only
checking surface metadata.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 185a8ab8-a5ba-43b0-af4d-a839df36c7d2

📥 Commits

Reviewing files that changed from the base of the PR and between 096ddda and 282e180.

📒 Files selected for processing (2)
  • Sources/Workspace.swift
  • cmuxTests/AgentSessionAutoResumeSettingsTests.swift

Comment thread cmuxTests/AgentSessionAutoResumeSettingsTests.swift
@austinywang
austinywang merged commit bddbd49 into main Jul 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant