Skip to content

[bug] cli: unknown flags are silently ignored instead of rejected #59

Closed

Description

@smota

Split from #50 (item 8).

Summary

The argument parser (crates/meshloop-cli/src/args.rs) looks up known flags with flag_value and has_flag and ignores everything else. A typo or an unsupported flag is accepted without any message. For example, status --config x --db y drops both flags (args.rs:255), which is part of the cause of #46.

Expected

  • Each subcommand checks its arguments against the flags it defines and rejects anything else. The error names the flag and the subcommand, and exits non-zero (ok: false with --json).
  • Global flags such as --json and the origin flags stay accepted on every subcommand.

Relations

Touches the same parsing code as #46, which adds --config and --db to status. Land #46 first, or include its flag additions here, to avoid conflicts.

Acceptance criteria

  • Test: status --bogus → non-zero exit, and the message names --bogus and status.
  • Test: every subcommand's documented flags still parse. A table-driven test over the command list is enough.
  • Test: global flags are accepted on every subcommand.

🤖 Generated with Claude Code

Activity

  1. added
    bugSomething isn't working
    drafted-by:claudeIssue, plan, or spec drafted by Claude in the current session
    on Oct 7, 2026
  2. smota commented on Oct 7, 2026

    @smota
    OwnerAuthor

    Workflow status: implemented in #69 (branch work/supervision-surface, base main @ d058307). Executor: Meshloop with Claude Sonnet workers, orchestrated and reviewed by Claude Code (Opus 5.5). Plans accepted by @smota. xtask check passes on bad9d72. Next owner: an independent reviewer (for-review:), then a human merges.

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

    bugSomething isn't workingdrafted-by:claudeIssue, plan, or spec drafted by Claude in the current sessionfor-implementation:claudeImplementation routed to Claude

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions