Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

This enables running multiple mux desktop instances on the same machine without collisions by scoping both mux state and Electron userData per root.

What changed

  • Added a supported CLI flag --mux-root <path> (alias --root) that sets MUX_ROOT early and strips itself from argv for subcommand routing.
  • Desktop now derives Electron userData from the chosen mux root (<muxHome>/user-data) so the single-instance lock + localStorage are effectively per-root.
  • Legacy migration (~/.cmux → ~/.mux) is skipped when using a custom root to avoid side effects.
  • Added a built-in skill: mux-testing-mux.
  • Added debug command palette actions:
    • Debug: Launch Test Instance (creates <muxHome>/instances/<id> and spawns a new mux process with --mux-root)
    • Debug: Delete Test Instances… (cleanup)

How to use

  • Launch a second instance manually:
    • mux --mux-root /tmp/mux-test-1
  • Or from the desktop app command palette:
    • Debug: Launch Test Instance

Validation

  • make static-check
  • Added unit tests for argv parsing, userData resolution, and config sanitization.

Generated with mux • Model: openai:gpt-5.2 • Thinking: xhigh • Cost: $14.25

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 407860156b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike
Copy link
Contributor Author

@codex review

Addressed the port-collision concern by clearing apiServerPort in the isolated test instance config so spawned instances bind to a random available port.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd2815c062

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike
Copy link
Contributor Author

@codex review

Also updated consumeMuxRootFromArgv to treat --mux-root/--root --help (and other flag-like values) as a missing-value error, matching typical CLI parser behavior.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 044e5238d0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike
Copy link
Contributor Author

@codex review

Also updated test-instance spawning to override MUX_USER_DATA_DIR to <newRoot>/user-data, so isolation still works even if the parent mux process was launched with a custom userData dir.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5535769fe5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/mux-testing-pgt5 branch from 5535769 to 6c3ab37 Compare January 14, 2026 11:45
@ibetitsmike ibetitsmike force-pushed the mike/mux-testing-pgt5 branch from 1d7fed6 to c79012d Compare January 14, 2026 17:51
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