Skip to content

Add -- passthrough args to cmux new and cmux start#13

Closed
zandaleph wants to merge 1 commit intocraigsc:mainfrom
zandaleph:claude-args
Closed

Add -- passthrough args to cmux new and cmux start#13
zandaleph wants to merge 1 commit intocraigsc:mainfrom
zandaleph:claude-args

Conversation

@zandaleph
Copy link

Summary

  • Adds -- separator support to cmux new and cmux start so that any arguments after -- are forwarded directly to the claude invocation
  • Enables use cases like --dangerously-skip-permissions and other claude CLI flags that aren't exposed by cmux today
  • Updates help text for both commands with examples

Usage

# Launch with dangerous permissions bypass
cmux start iron -- --dangerously-skip-permissions

# Combine with existing -p flag
cmux new my-feature -p "implement the thing" -- --dangerously-skip-permissions

# Multiple claude args work too
cmux start iron -- --dangerously-skip-permissions --no-update-notifier

Motivation

When migrating from tools like gastown that pass extra flags to claude on startup, there was no way to forward arbitrary claude CLI flags through cmux. The -- convention is a standard Unix idiom for separating a wrapper's own arguments from those passed to a subprocess, making it guessable and consistent with tools like npm run, git, etc.

Test plan

  • cmux new --help and cmux start --help show updated usage with [-- <claude-args>]
  • cmux new <branch> (no --) still works as before
  • cmux start <branch> (no --) still works as before
  • cmux start <branch> -- --dangerously-skip-permissions passes the flag to claude
  • cmux new <branch> -p "prompt" -- --flag passes both prompt and flag correctly
  • cmux new -- --flag (no branch) shows usage error

🤖 Generated with Claude Code

Allows passing arbitrary flags to the claude invocation by placing them
after a -- separator, e.g.:
  cmux start my-branch -- --dangerously-skip-permissions
  cmux new my-branch -p "do the thing" -- --dangerously-skip-permissions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zandaleph
Copy link
Author

Closing in favor of #11 which covers the same ground. I implemented this independently and arrived at the same approach — can confirm it works well. One small suggestion for #11: adding an example line to the help text would help with discoverability, e.g. Example: cmux start my-branch -- --dangerously-skip-permissions.

@zandaleph zandaleph closed this Feb 28, 2026
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