Skip to content

Allow passthrough of provider and Codex CLI arguments via happy codex command #146

Open

Description

@FlamesCN

Feature Request

Background:
Currently, when using happy codex -- -p anyrouter (or similar), the provider selection argument (-p anyrouter) is visible in the happy process command line, but does not reach the underlying Codex instance. Instead, Codex always starts with the default provider configured in Codex's config file.

Problem:
Happy CLI does not passthrough arbitrary Codex CLI arguments (such as -p anyrouter) to the underlying Codex process. This makes it impossible to dynamically select a different provider or pass other Codex CLI flags at startup when using Happy as a wrapper, limiting flexibility for users who need to switch Codex providers or otherwise control Codex behavior via CLI options.

Proposed Solution:

  • Support passthrough of additional Codex CLI arguments when running happy codex, so that any extra arguments after a -- are forwarded and respected by the underlying Codex process (not just visible to happy).
  • For example, running happy codex -- -p anyrouter should ensure that the Codex process is started with -p anyrouter, overriding the default provider if specified.
  • This should work for any Codex CLI flags, not just -p, to match the passthrough style supported by other wrappers and aliases.

Benefits:

  • Enables dynamic selection of Codex providers and other runtime configuration without editing config files or using workarounds.
  • Brings happy codex behavior in line with power-user expectations for CLI wrappers.
  • Helps users who frequently switch between different Codex providers, improving workflow flexibility.

Context:
I tried multiple zsh aliases and function forms (e.g., happy codex -- -p anyrouter, happy codex -p anyrouter), but none successfully override the provider for Codex. The -p anyrouter argument only appears in the happy process command line, not in the actual Codex process. It appears that Happy CLI does not forward these arguments to Codex.

Thank you for considering this enhancement!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions