Skip to content

Introduce DesktopControlLease and integrate#14

Merged
ChrisPulman merged 1 commit into
mainfrom
EnableMultipleSessions
May 23, 2026
Merged

Introduce DesktopControlLease and integrate#14
ChrisPulman merged 1 commit into
mainfrom
EnableMultipleSessions

Conversation

@ChrisPulman
Copy link
Copy Markdown
Owner

Replace the single-instance guard with a DesktopControlLease that coordinates exclusive desktop-control actions while allowing multiple MCP processes per session.
Add DesktopControlLease implementation, wire it into ComputerRunToolRuntime (including test helpers Configure/ReplaceControlLeaseForTests), and use BeginDesktopControlInvocation/InvokeControl for input-changing tools in ComputerRunTools.
Update ComputerRunLifecycleOptions to expose control lock and lease duration (with defaults and env/config mappings), update Program to configure the lease from options, and remove SingleInstanceGuard.
Tests updated/expanded: new RuntimeMutationLock for serializing runtime mutations, new DesktopControlLease-focused tests and service stubs, and adjustments to integration tests to use test leases.
README updated to document the control lease behavior, new env vars (CODEX_COMPUTER_RUN_CONTROL_LOCK, CODEX_COMPUTER_RUN_CONTROL_LEASE_SECONDS), and test coverage counts.

Replace the single-instance guard with a DesktopControlLease that coordinates exclusive desktop-control actions while allowing multiple MCP processes per session. Add DesktopControlLease implementation, wire it into ComputerRunToolRuntime (including test helpers Configure/ReplaceControlLeaseForTests), and use BeginDesktopControlInvocation/InvokeControl for input-changing tools in ComputerRunTools. Update ComputerRunLifecycleOptions to expose control lock and lease duration (with defaults and env/config mappings), update Program to configure the lease from options, and remove SingleInstanceGuard. Tests updated/expanded: new RuntimeMutationLock for serializing runtime mutations, new DesktopControlLease-focused tests and service stubs, and adjustments to integration tests to use test leases. README updated to document the control lease behavior, new env vars (CODEX_COMPUTER_RUN_CONTROL_LOCK, CODEX_COMPUTER_RUN_CONTROL_LEASE_SECONDS), and test coverage counts.
@ChrisPulman ChrisPulman merged commit 8cfdfb1 into main May 23, 2026
1 of 2 checks passed
@ChrisPulman ChrisPulman deleted the EnableMultipleSessions branch May 23, 2026 15:37
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