Skip to content

CLI --help is ignored except as the first argument, and value flags can swallow it #483

Description

@pratikbuilds

Problem

--help / -h is only recognized as the first leftover token after a real verb (exec / run / resume / continue). Anywhere else it is either an unrecognized flag or, worse, the value of the preceding flag.

--providers is not a flag, so corbits --providers exits with unrecognized flag: --providers. Asking for help on the real flag is how this turns into a picker: corbits --provider --help stores "--help" as the provider name, lookup fails, and the TUI opens onboarding.

The same swallow hits every value-taking flag.

corbits --help lists --provider <name> and --model <id>. It does not dump the live catalog. Listing those is /model in the TUI. That absence is current design. Treating --help as a provider/model/cwd/config value is not.

Reproduction

These print help:

corbits --help
corbits -h
corbits exec --help
corbits resume --help
corbits resume --pick --help

These do not:

corbits --providers
# unrecognized flag: --providers

corbits --force --help
corbits --cwd . --help
corbits --provider fireworks --help
# unrecognized flag: --help

corbits resume -h
# '-h' is not a session id

Value flags consume --help instead of showing help:

corbits --provider --help
# onboarding picker (provider name is "--help")

corbits --model --help
# TUI starts with model "--help"

corbits --profile --help
# TUI starts with profile "--help"

corbits --cwd --help
# cwd becomes <pwd>/--help; TUI still launches

corbits --config --help
# --config file not found or empty: .../--help

--provider --force and --cwd -h fail the same way: the next token is taken as the value, not as a flag.

Notes

--pick / --list are only valid after resume / continue. --provider=name is not accepted. --no-workflow is parsed and is not listed in --help.

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